caffe-yolov2-windows
Reference
Modifications
- caffe training
- add pre-trained model
- fix bugs
- windows support
- vehicle detection
Configuring and Building Caffe
Requirements
- Visual Studio 2013 or 2015
- CMake 3.4 or higher (Visual Studio and Ninja generators are supported)
- Anaconda
The build step was the same as MobileNet-SSD-windows
> cd $caffe_root/script
> build_win.cmd
GPU Building
config build_win.cmd "CPU_ONLY" = 0
Usage
convert model
cd examples
- convert yolo.cfg to yolo.prototxt
- convert yolo weights to caffemodel
Detection
cd caffe_root
- Download pre-trained caffmodel , save at location $caffe_root/models/yolo/
- examples\yolo_detection.cmd
If load success , you can see the image window like this
Trainning
There has two ways for training your dataset
- training with caffe (recommand)
- training with darknet project and convert the weights to caffemodel
training with caffe
Prepare data option 1(recommand)
Save lmdb at location $caffe_root\data\yolo\
Prepare data option 2
Put your dataset into $caffe_root\data\yolo\VOCdevkit
> cd $caffe_root\data\yolo
> python get_list.py
Check files label_map.txt,trainval.txt,test_2007.txt are all correct
> cd $caffe_root\data\yolo
> create_dataset.cmd
Run training
> cd $caffe_root
> examples\yolo_train.cmd
Training with darknet project
Note
- There has no data augmentation code inside (ex.hue,rotation) , note the training mAp was bad
- I still try to train a good caffemodel , currently ,the deploy model was just show how to do training
Future
- Add MobileNet-YOLO
- Data augmentation