Kunkun-Jia / TSR-SA

Repository for TSR-SA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A real-time and high-precision method for small traffic-signs recognition

This repo contains the official implementation(Based on Darknet) of TSR-SA: A real-time and high-precision method for small traffic-signs recognition.

TSR-SA

Paper | Code

Dataset

We use TT100K(Tsinghua-Tencent 100K) as dataset, and you need to convert the label format to YOLO format.

  1. Create the following folders in the root directory:
TSR-SA
└── VOC2007
    ├── Annotations
    ├── ImageSets
    │   └── Main
    ├── JPEGImages
    └── labels
  1. Put the images and labels into the corresponding folders according to the format of the VOC dataset.
  2. Use genfiles.py to generate training and test sets:
TSR-SA
|── VOC2007
|   ├── Annotations
|   ├── ImageSets
|   │   └── Main
|   ├── JPEGImages
|   └── labels
├── 2007_test.txt
└── 2007_train.txt
  1. The above is just a habit, you can follow your own habits, just modify the dataset path in cfg/tt100k.data.

Install

More details about install in Darknet.

Training

Mode

  • 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

Pre-training

Fine-tuning on TT100K

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

More command line usage about training

How to train with multi gpu

Testing

For image

./darknet detector test cfg/tt100k.data cfg/yolov4-tt100k.cfg backup/yolov4-tt100k_base.weights -ext_output test.jpg

For video

./darknet detector test cfg/tt100k.data cfg/yolov4-tt100k.cfg backup/yolov4-tt100k_base.weights -ext_output test.mp4

More command line usage about testing

How to use on the command line

Citation

@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}
}

About

Repository for TSR-SA

License:Other


Languages

Language:C 64.4%Language:Cuda 14.9%Language:C++ 12.8%Language:Python 3.2%Language:CMake 1.9%Language:PowerShell 1.7%Language:Shell 0.7%Language:Makefile 0.3%Language:C# 0.1%Language:Batchfile 0.1%