一、目标检测常见数据集
1.VOC:
官网:The PASCAL Visual Object Classes Homepage (ox.ac.uk)
VOC2012:http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar
VOC2007:http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar
2.COCO:
官网:
COCO - Common Objects in Context (cocodataset.org)
COCO2017val:http://images.cocodataset.org/zips/val2017.zip
COCO2017val annotations:http://images.cocodataset.org/annotations/stuff_annotations_trainval2017.zip
复制链接到迅雷下载更快
二、数据集标注
1.在线标注
2.软件标注:精灵标注助手-人工智能数据集标注工具 (jinglingbiaozhu.com)
三、用pytorch加载COCO数据集
import torchvision
from PIL import ImageDraw
coco_dataset=torchvision.datasets.CocoDetection(root="train2017/train2017",
annFile="annotations_trainval2017/annotations/instances_train2017.json")
image,info=coco_dataset[0]
image_handler=ImageDraw.ImageDraw(image)
for annotation in info:
x_min,y_min,width,height=annotation['bbox']
image_handler.rectangle(((x_min,y_min),(x_min+width,y_min+height)))
image.show()
四、用pytorch加载自己数据集
import torchvision
from PIL import ImageDraw
coco_dataset=torchvision.datasets.CocoDetection(root="image/mydataset",
annFile="image/instances_default.json")
image,info=coco_dataset[0]
image_handler=ImageDraw.ImageDraw(image)
for annotation in info:
x_min,y_min,width,height=annotation['bbox']
image_handler.rectangle(((x_min,y_min),(x_min+width,y_min+height)))
image.show()