|
1 |
| -# byte-tracker-yolov3 |
| 1 | + |
| 2 | +Description |
| 3 | +============= |
| 4 | + |
| 5 | +#### - ByteTrack |
| 6 | +- |
| 7 | + |
| 8 | +#### - Yolov3 |
| 9 | +- You only look once (YOLO) is one of the the powerful and real-time 1-stage object detection systems. |
| 10 | +- Improved features compared to yolov2: FPN,shortcut connection, logistic regression etc. |
| 11 | +- More details: [YOLOv3: An Incremental Improvement](https://arxiv.org/pdf/1804.02767.pdf) |
| 12 | + |
| 13 | +Contents |
| 14 | +============= |
| 15 | + |
| 16 | +#### - Yolov3 Train/inference |
| 17 | +- Train yolov3 model |
| 18 | +- Detect image |
| 19 | + |
| 20 | +#### - Yolov3 TensorRT Engine |
| 21 | +- Convert yolov3 Pytorch weigths to TensorRT engine |
| 22 | +- Real-time inference with yolov3 TensorRT engine |
| 23 | + |
| 24 | +#### - Config files |
| 25 | +- yolov3_config.ini: yolov3 model parameters |
| 26 | +- train_config.ini: yolov3 train parameters |
| 27 | +- tensorrt_config.ini: yolov3 tensorrt parameters |
| 28 | + |
| 29 | +Yolov3 Run Environments with TensorRT 7.2.2 & Pytorch |
| 30 | +============= |
| 31 | + |
| 32 | +#### - Docker with TensorRT |
| 33 | +- https://docs.nvidia.com/deeplearning/tensorrt/container-release-notes/rel_20-12.html#rel_20-12 |
| 34 | + |
| 35 | +#### - Docker pull |
| 36 | +``` |
| 37 | +docker pull qbxlvnf11docker/tensorrt_20.12_yolov3:latest |
| 38 | +``` |
| 39 | + |
| 40 | +#### - Docker run |
| 41 | +``` |
| 42 | +nvidia-docker run -it --name yolov3_tensorrt -v {yolo-v3-tensorrt-repository-path}:/workspace/Yolov3 -w /workspace/Yolov3 qbxlvnf11docker/tensorrt_20.12_yolov3:latest bash |
| 43 | +``` |
| 44 | + |
| 45 | +How to use |
| 46 | +============= |
| 47 | + |
| 48 | +#### - Build Yolov3 def cfg |
| 49 | +``` |
| 50 | +./create_model_def.sh {class_num} {cfg_name} |
| 51 | +``` |
| 52 | + |
| 53 | +#### - Download Pretrained Yolov3 Weights |
| 54 | +``` |
| 55 | +./download_weights.sh |
| 56 | +``` |
| 57 | + |
| 58 | +#### - Detect image with Yolov3 |
| 59 | +- Params: refer to config files and parse_args() |
| 60 | +``` |
| 61 | +python main.py --mode yolov3-detection-img |
| 62 | +``` |
| 63 | + |
| 64 | +#### - Train Yolov3 Model |
| 65 | +- Params: refer to config files and parse_args() |
| 66 | +``` |
| 67 | +python train.py --mode yolov3-train |
| 68 | +``` |
| 69 | + |
| 70 | +#### - Build TensorRT engine |
| 71 | +- Params: refer to config files and parse_args() |
| 72 | +``` |
| 73 | +python yolov3_convert_onnx_tensorrt.py --yolov3_config_file_path ./config/yolov3_config.ini --tensorrt_config_file_path ./config/tensorrt_config.ini |
| 74 | +``` |
| 75 | + |
| 76 | +Build Dataset |
| 77 | +============= |
| 78 | + |
| 79 | +#### - Download COCO2014 dataset |
| 80 | +``` |
| 81 | +./get_coco_dataset.sh |
| 82 | +``` |
| 83 | + |
| 84 | +#### - Build Data json files |
| 85 | +- Building data json for optimizing yolov3 |
| 86 | +- In train process, read builded data json file and get train data |
| 87 | +- Params: refer to parse_args() |
| 88 | +``` |
| 89 | +python yolov3_convert_onnx_tensorrt.py --target coco2014 --data_folder_path ./data/train_data/coco --save_folder_path ./data/data_json/coco |
| 90 | +``` |
| 91 | + |
| 92 | +#### - Format of data json files |
| 93 | +- parsing_data_dic['class_format'] = type of class ('name' or 'id') |
| 94 | +- parsing_data_dic['label_scale'] = scale of label ('absolute' or 'relative') |
| 95 | +- parsing_data_dic['image_list'] = [{'id'-image id, 'image_file_path'-image file path}, ...] |
| 96 | +- parsing_data_dic['object_boxes_list'] = [{'image_id'-image id, 'object_box_num'-number of the object per image, 'object_box_id_list'-[object box id, ...], 'object_name_list'-[object name, ...], 'object_box_list'-[[center x, center y, box_width, box_height], ...], 'object_box_size_list'-[object box size, ...], }, ...] |
| 97 | +- parsing_data_dic['image_num'] = number of the image |
| 98 | +- parsing_data_dic['object_boxes_num'] = [number of the total objects, ...] |
| 99 | + |
| 100 | +References |
| 101 | +============= |
| 102 | + |
| 103 | +#### - ByteTrack Paper |
| 104 | +``` |
| 105 | +@article{ByteTrack, |
| 106 | + title={ByteTrack: Multi-Object Tracking by Associating Every Detection Box}, |
| 107 | + author={Yifu Zhang et al.}, |
| 108 | + journal = {arXiv}, |
| 109 | + year={2018} |
| 110 | +} |
| 111 | +``` |
| 112 | + |
| 113 | +#### - Yolov3 Paper |
| 114 | +``` |
| 115 | +@article{yolov3, |
| 116 | + title={YOLOv3: An Incremental Improvement}, |
| 117 | + author={Redmon, Joseph and Farhadi, Ali}, |
| 118 | + journal = {arXiv}, |
| 119 | + year={2018} |
| 120 | +} |
| 121 | +``` |
| 122 | + |
| 123 | +#### - ByteTrack Pytorch |
| 124 | + |
| 125 | +https://github.com/ifzhang/ByteTrack |
| 126 | + |
| 127 | +#### - Yolov3 with TensorRT |
| 128 | + |
| 129 | +https://github.com/qbxlvnf11/yolo-v3-tensorrt |
| 130 | + |
| 131 | +Author |
| 132 | +============= |
| 133 | + |
| 134 | +#### - LinkedIn: https://www.linkedin.com/in/taeyong-kong-016bb2154 |
| 135 | + |
| 136 | +#### - Blog URL: https://blog.naver.com/qbxlvnf11 |
| 137 | + |
| 138 | +#### - Email: qbxlvnf11@google.com, qbxlvnf11@naver.com |
| 139 | + |
0 commit comments