The YOLO algorithm framework uses two

Source: Internet
Author: User

6,VOC Data Set Training model

1) Download Data set

The website provides some VOC data, which is based on 2007 to 2012, and you can download it at the following address:

wget https://pjreddie.com/media/files/voctrainval_11-may-2012.tarwget https: // Pjreddie.com/media/files/voctrainval_06-nov-2007.tar wget https://pjreddie.com/media/files/voctest_06-nov-2007.tartar XF voctrainval_11-may-. Tar tar XF voctrainval_06-nov-. Tar tar XF voctest_06-nov-. Tar

The data can be stored in the vocdevkit/directory

2) Generate Identification tags

The identification tag must be a. txt file in the following format:

<object-class> <x> <y> <width> 

Object-class is the name of the category

The remaining elements are pixels associated to the picture, and the width and height of the

By downloading the voc_label.py available on the website we can quickly generate this file and download it to the scripts/directory:

wget https://pjreddie.com/media/files/voc_label.pypython voc_label.py

After a few minutes, the corresponding file is generated to be stored in:

vocdevkit/voc2007/labels/or vocdevkit/voc2012/labels/below:

ls 2007_test.txt   Vocdevkit2007_train.txt  voc_label.py2007_val.txt    voctest_06-nov-.  Tar2012_train.txt  voctrainval_06-nov-.  Tar2012_val.txt    voctrainval_11-may-.  Tar

We can combine the files we really want to train into one:

cat 2007_train.txt 2007_val.txt 2012_*.txt > Train.txt

3) Modify the data that the configuration points to (Pascal data)

In the Cfg/voc.data, point to the configuration data:

1  -  2 Train  = <path-to-voc>/train.txt  3 valid  = <path-to-voc>  2007_test.txt  4 names = data/voc.names  5 backup = Backup

<path-to-voc> is the point of your data set

4) Download weights for pre-trained convolution

The weight of the convolution here is imagenet pre-training provides:

wget https://pjreddie.com/media/files/darknet19_448.conv.23

You can also generate your own weights by downloading the pre-trained Darknet19 448x448 model (https://pjreddie.com/darknet/imagenet/#darknet19_448), performing the following naming:

./darknet partial Cfg/darknet19_448.cfg darknet19_448.weights darknet19_448.conv.

5) Training Model

./darknet Detector Train Cfg/voc.data cfg/yolo-voc.cfg darknet19_448.conv.

7, using Coco to train YOLO model

Coco DataSet, I have not used, specifically can see http://cocodataset.org/#overview understand

1) Get Coco Data Set

Download Coco's datasets and tags, which can be executed directly from the scripts/get_coco_dataset.sh script:

CP Scripts/get_coco_dataset. SH DATACD databash get_coco_dataset. SH

So the tags and datasets are there.

2) pointing to the configuration data set

In the Cfg/coco.data configuration file, configure:

1  the  2 Train  = <path-to-coco>/trainvalno5k.txt  3 valid  = <path-to-coco >/5k.txt  4 names = data/coco.names  5 backup = Backup

<path-to-coco> is your specific path to pointing

Also need to configure your dataset to be used for training is not tested, default is the configuration of the test, in Cfg/yolo.cfg:

[net]# testing# Batch=1# subdivisions=1# trainingbatch= subdivisions=8....

3) Training Model

./darknet Detector Train Cfg/coco.data cfg/yolo.cfg darknet19_448.conv.

4) Enable GPUs to perform training and speed up

./darknet Detector Train Cfg/coco.data cfg/yolo.cfg darknet19_448.conv.0,1,  2,3

5) Training pauses or starts from breakpoints

0,1,2,3

8, the official special statement

If you use their frame, you must explain the source of the frame in the comments, and you can paste the following comment directly into the comment:

@article {redmon2016yolo9000,  title={yolo9000:better, Faster, stronger},  author={ Redmon, Joseph and Farhadi, Ali},  journal={arxiv preprint arXiv:1612.08242},  year ={}}

Reference Address: https://pjreddie.com/darknet/yolo/

Paper Address: https://arxiv.org/abs/1612.08242

The YOLO algorithm framework uses two

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.