In COCO dataset produced Darknet training set

tags: Depth learning training data set ready

MS COCO this blog mainly as a data set, create Darknet training set

COCO CV data set is a database, which contains a database comprising a plurality of tasks object detection, keypoints estimation, semantic segmentation, image caption and other required

Download MS COCO 2017 Nian version of the data set, a total of about 25G and pictures about 1.5G annotation files, annotation file format is json format, storing the target category (a total of 80 classes) all in the picture, the precise target bounding box coordinate and segmentation contour information and other targets.

You can go to the official website: http: //cocodataset.org/ but the link does not seem useful

Gives the Thunder Download:

Pictures (images):

http://images.cocodataset.org/zips/train2017.zip

http://images.cocodataset.org/zips/test2017.zip

http://images.cocodataset.org/zips/val2017.zip

Comments (annotations):

http://images.cocodataset.org/annotations/stuff_annotations_trainval2017.zip

http://images.cocodataset.org/annotations/image_info_test2017.zip

http://images.cocodataset.org/annotations/annotations_trainval2017.zip

The download is complete, unzip the screenshot below:


Darknet is a C language and open source neural network framework written in CUDA with, currently based target detection algorithm yolov1 darknet implemented, yolov2 and yolov3 have certain advantages in target detection classification areas, mainly yolo network is end-to-end of , simple, fast detection speed. Within a specific algorithm've had a lot of related instructions, please refer to themselves.

Extraction script has been uploaded to the [email protected]: ChriswooTalent / COCO_forYOLO.git in

There are four python script:

   batch_split_annotation_foryolo.py: Batch coco annotation file parsing, separating the whole annotation file for each image into a single annotation file;

   split_annotation_foryolo.py:Separating the operative part of the data file, in batch_split_annotation_foryolo will call;

   create_JEPG_dir.py: All the training images, image verification, test copy of the image to the next JPEGImages folder, only calling once;

   create_yolo_list.py:  The previously isolated annotation file, generating a training image, the verification image, a test image index file.

Return to the topic, Darknet have certain requirements for the training set, now mainly explain how COCO-based data sets produced Darknet training set.

1. First concentration COCO extracted from the image data set annotation target yolo algorithm requires the bounding box information;

Install python 2.7 and related dependencies, you can run

Run python batch_split_annotation_foryolo.py (note modify the program absolute path)

Get label information darknet training needed


   

2. darknet binding source, taking into account the rules darknet read image and corresponds to the label (which may be re-write the code, this step is not performed), it is necessary to copy all the images to a

The next JPEG file folder, then the label generated in step one folder to the next stage and JPEG unified directory;

This script needs to be called only once:

   

    

3. The resulting set of training images, an image verification image set and a test set of path index set train.txt, val.txt, test.txt;

Run python create_yolo_list.py (note modify the program absolute path)

Generating a training set of images, image sets, and verification test image set

     

4. The integration path so that the normal call Darknet framework code and training;

1.label JPEGImages in folders and folders under the same level;

2. coco resume a folder, the folder is placed below train.txt, val.txt, test.txt;

3. Create coco.data file, specify the training image index file address, create coco.names document, which is classified COCO all data sets;

      


4. coco folder, coco.data file, coco.names file with the code copied to the darknet training script folder, create a script training, start training

We can see the start of training normally, if you need to reach the level of training of yolov3, take a long time to wait, upload a right to use the training dataset weight of coco result of pattern detection, the detection of small targets yolov3 is very big advantage:

  


The first brother original, if there is badly written, not right, Daniel pointed to the brightest hope, grateful, AI started going to the pit, the depth learning avid interest in this application an image of hope Daniel guidance.


Intelligent Recommendation

DarkNet Yolov3 Dataset Weights File Training

YOLOV3 Data Set Training See the article before suggesting to go to the official websitehttps://pjreddie.com/darknet/ The above is a relatively official practice Below is the data set made from others...

VOC dataset format to COCO data set format

When doing a project, sometimes it is not sure that the algorithm model is best to perform on my dataset, so you may need to run a few models and then compare and analyze, but many models have differe...

YOLOv5 COCO data set training |

Code used:YOLOv5 in PyTorch The code:Custom data set official tutorial Tribute to the boss! Environment setup Environment setup data preparation COCO data set download COCO data set txt format label d...

Data set split, COCO dataset convert to VOC dataset

Share the commonly used processing code of the data set. Remember to change your own path when using. Ann_dir is the JSON file path of Coco, and img_dir is the picture path. If the Chinese output with...

【Coco dataset】

Since the recent task model needs to use the COCO data set format, it can only be converted to the XML format of existing data. I checked the information of many XML to COCO data sets on the Internet....

More Recommendation

Cityscapes dataset and COCO dataset

Cityscapes dataset and COCO dataset A brief overview of two public data sets. Article Directory Cityscapes dataset and COCO dataset Cityscapes dataset COCO data set info field images field license fie...

Coco dataset to vCO dataset

COCO dataset to VOC dataset COCO data set and VOC data set format You can read my previous article: https://blog.csdn.net/m0_64229606/article/details/124917579 COCO dataset to VOC dataset Still shit m...

[Dataset] Introduction to COCO Dataset

Author :Horizon Max Programming skills:Various operation summary Machine Vision:Will be magic OpenCV Deep Learning:Simple Getting Started PyTorch Neural Networks:Classic network model Algorithm:No mat...

mmdetection uses a custom coco format dataset for training and testing

table of Contents 1. Introduction to mmdetection 2. Environmental installation 1. Installation tutorial 2. Run the demo to test whether the environment is successfully installed Three, training custom...

Use coco dataset, faster rcnn class method training error resolution

problem: Under the caffe framework, using the coco dataset to train faster rcnn methods, I get the following error: the reason: Overlaps==[] caused by gt_boxes being empty. Solution: Delete images wit...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top