2016年You Only Look Once实现,包含所有源码注释并解决一些原作者编码中的bug,供源码学习交流使用
$ pip install -r requirements.txt
- Clone yolo_tensorflow repository
$ git clone https://github.com/leaving-voider/YOLOv1_tensorflow.git
$ cd YOLOv1_tensorflow
- Download Pascal VOC dataset and YOLO_small.ckpt to correct catalogue automatically
# (if needed)
# !chmod x download_data.sh
$ ./download_data.sh
where YOLO_small.ckpt file will be pt in data/weights
- Modify configuration in
yolo/config.py
such as batch size
- Training
- with GPU
$ python train.py --weights YOLO_small.ckpt --gpu 0
- without GPU
$ python train.py
- Test
$ python test.py --weights ./data/pascal_voc/output/2021_02_02_07_43/weights/yolo.ckpt-15 --img ./images/emotion.jpg