- It consists of 3,849 photos collected from various sources, from the Internet or from videos taken on highways and roads in Hanoi.
- Various data enhancement techniques from Roboflow API and available augmentation methods of YOLO were used.
- It includes 4 types of vehicles: car, bike, bus, truck. With the number of instances for each class as follows: 9,087 cars, 6,278 bikes, 1,138 buses, 3,976 trucks.
- The dataset is divided according to the ratio: 70/20/10.
- All images are processed in the standard size of 640x640 before being used for training.
- Three models were trained: YOLOv5n, YOLOv7, and YOLOv8n, using pre-trained models available in open-source, with a training of 100 epochs on the same dataset.
- They were trained on Google Colab with a GPU configuration of Tesla K80 and 12GB of RAM.
- They were tested on a MacBook Pro 2015 with an Intel Core i5 Dual Core CPU and 16GB of RAM.
Model | params (M) | FLOPs (B) | Size | Speed (ms) | mAP@50 | mAP@50-95 |
---|---|---|---|---|---|---|
YOLOv5n | 1.9 | 4.5 | 640 | 104.6 | 96.2% | 67.5% |
YOLOv8n | 3.2 | 8.7 | 640 | 178.3 | 96.8% | 70.9% |
- In this problem, traffic congestion classification is determined through the calculation of the ratio x between the total area of bounding boxes surrounding the detected vehicles (V) and the area of the region of interest (R), assuming that each pixel is a unit of area.
- The region of interest is the area where the detection and counting of vehicles will be performed. It is drawn immediately after running the program.
- Below is the area of the region of interest, R.
The result indicates a normal traffic state.
The result indicates a traffic congestion state.