Implementation of YOLO v3 object detector in Tensorflow for Fire and Smoke detection. The full details are in this paper. In this project we cover several segments as follows:
- YOLO v3 architecture
- Training tensorflow-yolov3 with GIOU loss function
- Basic working demo
- Training pipeline
- Detection result
YOLO paper is quick hard to understand, along side that paper. This repo enables you to have a quick understanding of YOLO Algorithmn.
$ python demo.py
Two files are required as follows:
xxx/xxx.jpg 18.19,6.32,424.13,421.83,20 323.86,2.65,640.0,421.94,20
xxx/xxx.jpg 48,240,195,371,11 8,12,352,498,14
# image_path x_min, y_min, x_max, y_max, class_id x_min, y_min ,..., class_id
fire
smoke
Then edit your ./core/config.py
to make some necessary configurations
__C.YOLO.CLASSES = "./data/classes/Fire.names"
__C.TRAIN.ANNOT_PATH = "./data/my_data/fire_train.txt"
__C.TEST.ANNOT_PATH = "./data/my_data/fire_val.txt"
Here are two kinds of training method:
$ python train.py
$ tensorboard --logdir ./data
$ cd checkpoint
$ wget https://github.com/YunYang1994/tensorflow-yolov3/releases/download/v1.0/yolov3_coco.tar.gz
$ tar -xvf yolov3_coco.tar.gz
$ cd ..
$ python convert_weight.py --train_from_coco
$ python train.py
$ python evaluate.py
$ cd mAP
$ python main.py -na
The pre-trained model can be download in baidu pan. 提取码:tvm6