资源简介
视觉处理(test_shape.py)
代码片段和文件信息
import os
import sys
import random
import math
import numpy as np
import skimage.io
import matplotlib
import matplotlib.pyplot as plt
from mrcnn.config import Config
from mrcnn import utils
import mrcnn.model as modellib
from mrcnn import visualize
import cv2
from mrcnn.model import log
# 修改为自己的识别类别
class_names = [‘BG‘ ‘plane‘]
width=600
height=800
class ShapesConfig(Config):
“““Configuration for training on the toy shapes dataset.
Derives from the base Config class and overrides values specific
to the toy shapes dataset.
“““
# Give the configuration a recognizable name
NAME = “shapes“
# Train on 1 GPU and 8 images per GPU. We can put multiple images on each
# GPU because the images are small. Batch size is 8 (GPUs * images/GPU).
GPU_COUNT = 1
IMAGES_PER_GPU =1
# Number of classes (including background)
NUM_CLASSES = 1 + 1 # background + 3 shapes
# Use small images for faster training. Set the limits of the small side
# the large side and that determines the image shape.
IMAGE_MIN_DIM = 128
IMAGE_MAX_DIM = 128
# Use smaller anchors because our image and objects are small
RPN_ANCHOR_SCALES = (8 16 32 64 128) # anchor side in pixels
# Reduce training ROIs per image because the images are small and have
# few objects. Aim to allow ROI sampling to pick 33% positive ROIs.
TRAIN_ROIS_PER_IMAGE = 32
# Use a small epoch since the data is simple
STEPS_PER_EPOCH = 10
# use small validation steps since the epoch is small
VALIDATION_STEPS = 2
class InferenceConfig(ShapesConfig):
# Set batch size to 1 since we‘ll be running inference on
# one image at a time. Batch size = GPU_COUNT * IMAGES_PER_GPU
GPU_COUNT = 1
IMAGES_PER_GPU = 1
- 上一篇:网页视频并合并(2heiPage.py)
- 下一篇:深度学习YOLOv3分类算法
相关资源
- python实现SGBM图像匹配算法
- ROF图像降噪处理python程序
- Programming Computer Vision with Python.pdf
- OpenCV Python 计算机视觉 官方教程中文
- 《机器学习-使用OpenCV和Python进行智能
- python利用opencv进行相机标定(教程)
- OpenCV+3计算机视觉++Python语言实现 高清
- python计算机视觉编程programming compute
- OpenCV3计算机视觉_Python语言实现 _刘波
- OpenCV3计算机视觉Python语言实现源代码
- opencv_python‑3.4.3‑cp37‑cp37m‑win_amd
- OPENCV入门书籍:opencv3机器视觉Python语
- python计算机视觉编程完整版.rar
- OpenCV3 计算机视觉 Python语言实现
- python计算机视觉.pdf
- LBPH算法人脸识别代码.rar
- simplecv实用机器视觉+OpenCV-Python-Totur
- 计算机视觉素材.part1.rar
- Python计算机视觉编程(含源码+python计
- python计算机视觉-Bag-Of-Word.zip
- OpenCV3计算机视觉Python语言实现(第二
- Python 计算机视觉编程中文版PDF
- opencv3机器视觉python语言实现.zip
- Python计算机视觉编程完整版PDF
- opencv3计算机视觉 python实现
- Python计算机视觉配套的代码及数据
- OpenCV3计算机视觉Python语言实现(第二
- OpenCV 3计算机视觉:Python语言实现
- OpenCV 3计算机视觉:Python语言实现——
- OpenCV 3计算机视觉 Python语言实现第二
评论
共有 条评论