AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.66k stars 7.96k forks source link

How to get COCO Dataset #5629

Closed elementdl closed 4 years ago

elementdl commented 4 years ago

Hi,

I'm an electronic engineer and I'm working on a custom program for Object Detection. I'm using YOLOV3.

I saw that YOLOV3 uses COCO dataset.

My goal is to customize YOLO so that he can recognize specific classes, so I need to train him with differents datasets (not only COCO).

I want to uses some classes from the COCO dataset so I just needed to be sure how it works.

With this link : http://cocodataset.org/#download, there is several dataset.

I have to take the 2017 Train Images [118K/18GB] in order to train my YOLO, right?

Did I have to download 2017 Train/Val annotation [241MB] too?

I also saw that it's possible to use a COCO API. Let's say I don't want to download no the entire dataset but only some category, is it possible by using the COCO API?

I asked directly on the website of COCO but I didn't get any response.

Sincerely,

AlexeyAB commented 4 years ago

Try to modify and use these Python scripts: https://github.com/ssaru/convert2Yolo

elementdl commented 4 years ago

Hello again @AlexeyAB,

I tried to use convert2yolo for specific classes but it didn't worked. I wrote a coco.names with only the classes I wanted to keep and I got this error :

COCO parsing : 100.0% complete

Yolo Generating Result : False, msg : ERROR : 'hot dog' is not in list, moreInfo : <class 'ValueError'> Format.py

Hot dog is not a class that I write in the coco.names.

Is there a program that convert the COCO dataset for YOLO with the possibility to choose the classes you want to keep?