Implementation of YOLO v3 object detector in Tensorflow for classified detection of vehicals
YOLO paper is quiet hard to understand, along side that paper. This repo enables you to have a quick understanding of YOLO Algorithmn.
-
Clone this file
-
You are supposed to install some dependencies before getting out hands with these codes. bashrc $ cd tensorflow-yolov3 $ pip install -r ./docs/requirements.txt
-
Exporting loaded COCO weights as TF checkpoint(
yolov3_coco.ckpt
)【BaiduCloud】 bashrc $ cd checkpoint $ https://drive.google.com/file/d/1n3BShKTwnVgEm462YLHDOPWrQvedUUiW/view?usp=sharing $ tar all the .zip files $ cd .. $ python convert_weight.py $ python freeze_graph.py -
Then you will get some
.pb
files in the root path., and run the demo script bashrc $ python image_demo.py $ python video_demo.py # if use camera, set video_path = 0
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 make sure that x_max < width and y_max < height
Class names are required as follows:
person bycycle twowheeler truck car autorickshaw bus
To help you understand my training process, I made this demo of training IDD dataset
Download IDD trainval and test data bashrc
$ https://idd.insaan.iiit.ac.in/accounts/login/?next=/dataset/download/
Download IDD Dataset from this link -
Don't try to train from skretch as it will require computational power and will take masside amount of time bashrc $ cd checkpoint $ downloads weights from 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
Download COCO trainval and test data
$ wget http://images.cocodataset.org/zips/train2017.zip $ wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip $ wget http://images.cocodataset.org/zips/test2017.zip $ wget http://images.cocodataset.org/annotations/image_info_test2017.zip