Stop Sign Detection
This part utilize a Google Coral accelerator and a pre-trained object detection model by Coral project to perform stop sign detection. If the donkey car see a stop sign, it will override the
pilot/throttle to 0. In addition, a bounding box will be annotated to the
To use this part, you must have:
How to use
Put the following lines in
STOP_SIGN_DETECTOR = True STOP_SIGN_MIN_SCORE = 0.2 STOP_SIGN_SHOW_BOUNDING_BOX = True
Install Edge TPU dependencies
Follow this instruction to install and setup Google Coral on Pi 4
In addition, install the dependency on your dev pc or pi4 like this
pip3 install https://dl.google.com/coral/edgetpu_api/edgetpu-2.14.0-py3-none-any.whl
Detecting other objects
Since the pre-trained model are trained on coco, there are 80 objects that the model is able to detect. You can simply change the
stop_sign_detector.py to try.
Since SSD is not good at detecting small objects, the accuracy of detecting the stop sign from far away may not be good. There are some ways that we can make enhancement but this is out of the scope of this part.