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 the Coral Edge TPU get started instructions to install the necessary software. For the RaspberryPi follow the Linux instructions.
The stop sign detector uses a pre-compiled model, so we only need the inference runtime to make this work. However, if you are creating your own model then you will need the Edge TPU Compiler on your RaspberryPi (or Linux laptop if you are training on that). Note that the compiler only runs on Linux.
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.
Getting this to work without the Coral Edge TPU
There is an issue in the Github for making this work without the Coral Edge TPU. If you get this working please submit a pull request.