Skip to content
Eric Liu edited this page Jun 9, 2020 · 42 revisions

MobileNet-YOLO

The purpose of this project was provide a platform which can change backbone easily. So I select the caffe framework and write down my training history here.

Enjoy it

Build

  1. Install dependency
  2. Following below command
> git clone https://github.com/eric612/MobileNet-YOLO.git 
> cd $MobileNet-YOLO_root/
> mkdir build`
> cd build
> cmake ..
> make -j4
> make pycaffe

Build in Docker

docker pull eric612/mobilenet-yolo
docker run -it eric612/mobilenet-yolo

Run demo

> cd $caffe_root/
> sh scripts/demo_yolo_lite.sh

Training

Download lmdb

Unzip into $caffe_root/

Please check the path exist

"$caffe_root\examples\VOC0712\VOC0712_trainval_lmdb"

"$caffe_root\examples\VOC0712\VOC0712_test_lmdb"

Download pre-trained weights, and save at $caffe_root\models\MobileNet

> cd $caffe_root/
> sh scripts/train_yolov3_lite.sh

Train your own dataset

How to create lmdb

Modify classes , thanks for PiyalGeorge

Parameter-tuning

Generate anchors to increase performance

An example python code to generate yolo prototxt

Model pruning

https://github.com/eric612/MobileNet-YOLO/issues/167

Knowledge Transfer

I use the following training path to improve accuracy , and decrease lite version trainning time

  • First , train MobileNet-YOLOv3 on coco dataset (IOU_0.5 : 40.2 mAP) How to use
  • Second , train MobileNet-YOLOv3-Lite on coco dataset , pretrain weights use the first step output (IOU_0.5 : 38.9 mAP)
  • Finally , train MobileNet-YOLOv3-Lite on voc dataset , pretrain weights use the second step output (76.3 mAP)

YOLOv3-Tiny

See issue #16

Edge computing

ncnn,tensortRT,jetson tx 2 , ... , my collection link

Others

Subtract and normalize

Error message

undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0' and others

https://github.com/BVLC/caffe/issues/1559