Thanks to the availability of the technology and the knowledge to utilize it, the Artificial Intelligence can be tested in all parts of the world. I was recently on vacation on my hometown, Gjakova, and decided to test AI for object detection in real-life traffic situations.
I wanted the test to be based on local conditions, so I decided to do two test cases:
- Detection of uncommon vehicles
- Detection of objects on crowded traffic lanes
I took pictures of two vehicles that might not be so common on the streets of big cities, i.e. San Francisco, but that are quite so common in Gjakova: a multi cultivator and a circular saw vehicle.
I was offered a ride on a circular saw vehicle and filmed a busy street in town where moving cars, parked cars, trucks, bikes and pedestrians shared the same lane.
Technical approach
As object detection system I used YOLO (You Only Look Once) V3. I installed it on my Windows computer together with relevant requirements: CUDA, OpenCV and cuDNN.
For images and the video, I used the MS COCO dataset with a yolov3
pre-trained model.
On images, I started with a threshold of 0,25 and decreased it gradually in order to compare the prediction results.
My computer has a GPU with CC 5.0 and the prediction process took around 300 milli-seconds per image.
The prediction process for the two and half minute’s video took around seven minutes since the algorithm prediction went frame by frame.
Result
With the threshold of 0,25 the circular saw vehicle was identified as a truck (see the photo at the beginning of the article) while the multi cultivator was not detected at all. Other vehicles and persons were correctly detected.
With a lower threshold of 0,1 the algorithm was able to detect the multi cultivator as a truck. The number of detected cars increased but also, I got the red car driver and two false detection of persons.
On the video, the algorithm performed well and was able to detect objects on the lane and on the pavement. In some cases, the algorithm was able to detect people inside the vehicles. However, it had a few doubts when deciding on a couple of objects like:
- SUV (car/truck)
- concrete pump vehicle (truck/train)
- lawn mower (bicycle/motorbike/truck)
Conclusion
Object detection algorithms are an essential part of autonomous vehicles, which in the near future might be present in all corners of the world. It is thereby crucial that those algorithms are able to detect location specific vehicles, ex multi cultivators, rickshaws, tuk-tuks, …
Inclusion of above-mentioned vehicles in AI datasets will happen as a community effort or as commercial projects. I am planning to contribute to this process next time I am in Gjakova by collecting and annotating images of multi cultivators and circle saw vehicles.
YOLOv3 proved to be a very fast object detection system and performs well on real-life traffic situations. As with any other AI approach, test-and-adjust is the best way to reach optimal results.
Credit: BecomingHuman By: Halil Radogoshi