This repo contains the official implementation(Based on Darknet) of TSR-SA: A real-time and high-precision method for small traffic-signs recognition.
We use TT100K(Tsinghua-Tencent 100K) as dataset, and you need to convert the label format to YOLO format.
- Create the following folders in the root directory:
TSR-SA
└── VOC2007
├── Annotations
├── ImageSets
│ └── Main
├── JPEGImages
└── labels
- Put the images and labels into the corresponding folders according to the format of the VOC dataset.
- Use
genfiles.py
to generate training and test sets:
TSR-SA
|── VOC2007
| ├── Annotations
| ├── ImageSets
| │ └── Main
| ├── JPEGImages
| └── labels
├── 2007_test.txt
└── 2007_train.txt
- The above is just a habit, you can follow your own habits, just modify the dataset path in
cfg/tt100k.data
.
More details about install in Darknet.
- YOLOv4 baseline of TT100K:
cfg/yolov4-tt100k_base
- Introduce low-level features + increase detection fine-grained:
cfg/yolov4-tt100k-neck_head
- RFB-cross:
cfg/yolov4-tt100k-neck_head_rfb-c
- Download the pre-trained weights file under TSR-SA: yolov4.conv.137
Depending on the mode you want, choose the corresponding cfg file and use the following command to train:
- To train on Linux use command:
./darknet detector train cfg/tt100k.data cfg/yolov4-tt100k.cfg yolov4.conv.137
- For training on Linux with mAP:
./darknet detector train cfg/tt100k.data cfg/yolov4-tt100k.cfg yolov4.conv.137 -map
./darknet detector test cfg/tt100k.data cfg/yolov4-tt100k.cfg backup/yolov4-tt100k_base.weights -ext_output test.jpg
./darknet detector test cfg/tt100k.data cfg/yolov4-tt100k.cfg backup/yolov4-tt100k_base.weights -ext_output test.mp4
How to use on the command line
@article{chen2022real,
title={A real-time and high-precision method for small traffic-signs recognition},
author={Chen, Junzhou and Jia, Kunkun and Chen, Wenquan and Lv, Zhihan and Zhang, Ronghui},
journal={Neural Computing and Applications},
volume={34},
number={3},
pages={2233--2245},
year={2022},
publisher={Springer}
}