数据集的收集,处理

PASCAL VOC dataset:

PASCAL stands for pattern analysis, statistical modelling and computational learning. It is an EU Network of Excellence funded under the IST Programme of the European Union

The PASCAL Visual Object Classes (VOC) challenge is a benchmark in visual object category recognition and  detection,  providing  the  vision  and  machine  learning communities with a standard dataset of images and annotation, and standard evaluation procedures. Organised annually from 2005 to present, the challenge and its associated dataset  has  become  accepted  as the benchmark  for  object detection.

数据集说明参考:http://www.cnblogs.com/wyuzl/p/7891895.html





数据集的收集:

positive set

negative set

training set

test set

validation set


数据集的处理:

mirror

rotation


mirror 处理

水平镜像:沿平行于x轴的中线翻转

垂直镜像:沿平行于y轴的中线翻转

python例子如下:

import os
import cv2

path='C:/data/data_180129/camera_2/dataset/dataset_1/format/'
path1='C:/data/data_180129/camera_2/dataset/dataset_1/format/flip/'
files = os.listdir(path)
i = 1

for file in files:
    img=cv2.imread(path+file,cv2.IMREAD_UNCHANGED)       
    if img is not None:
        img_v_flip=cv2.flip(img,1)
        img_h_flip=cv2.flip(img,0)
        cv2.imwrite(path1+'img_v_flip_'+file,img_v_flip)
        cv2.imwrite(path1+'img_h_flip_'+file,img_h_flip)
        i +=1
参考:http://enthusiaststudent.blogspot.com/2015/01/horizontal-and-vertical-flip-using.html

数据集的收集,处理_第1张图片

你可能感兴趣的:(深度学习)