Skip to content

SmokerX/YOLO_v2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO_v2

This is implementation of YOLO v2 with TensorFlow.

Installation

  1. Clone YOLO_tiny repository

    $ git clone https://github.com/leeyoshinari/YOLO_v2.git
    $ cd YOLO_v2
  2. Download Pascal VOC2007 dataset, and put the dataset into data/Pascal_voc.

    if you download other dataset, you also need to modify file paths.

  3. Download weights file yolo_weights for COCO, and put weight file into data/output.

    Or you can also download my training weights file YOLO_v2 for VOC.

  4. Modify configuration into yolo/config.py.

  5. Training

    $ python train_val.py
  6. Test

    $ python test_val.py

Darknet-19

Darknet-19 has 19 convolutional layers, it's faster than yolo_v2. If you use darknet-19, you need some modifications. It's easy to modify.

Please download Darknet-19 weights file for VOC from darknet-19.

Training on Your Own Dataset

To train the model on your own dataset, you should need to modify:

  1. Put all the images into the Images folder, put all the labels into the Labels folder. Select a part of the image for training, write this part of the image filename into train.txt, the remaining part of the image filename written in test.txt. Then put the Images, Labels, train.txt and test.txt into data/dataset. Put weight file in data/output.

  2. config.py modify the CLASSES.

  3. train.py replacefrom pascal_voc import Pascal_voc with from preprocess import Data_preprocess, and replace pre_data = Pascal_voc() with pre_data = Data_preprocess().

Requirements

  1. Tensorflow
  2. OpenCV

About

最好的TensorFlow实现版本

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%