SelfDrivingDrone is an AI software system that implements state-of-the-art object detection algorithms, including Faster R-CNN and SSDlite, to fly a drone through an obstacle course. It is written in Python and powered by the djitellopy and simple-pid libraries.
Example of SelfDrivingDrone execution. Watch the complete video here.
The goal of SelfDrivingDrone is to provide a high-quality, high-performance code for all those who want to fly their Tello drones through any obstacle course.
SelfDrivingDrone exploits fine-tuned implementations of the following object detection algorithms:
- Faster R-CNN: Slow, but extremely precise.
- SSDlite: Fast, but less precise than Faster R-CNN. Best option for users lacking a dedicated graphics card.
- Haar Cascade Classifier: Fast, but less precise than SSDlite.
Requirements:
- Python3, Dji Tello drone
# SELF_DRIVING_DRONE=/path/to/clone/SelfDrivingDrone
git clone https://github.com/gabrimatx/SelfDrivingDrone $SELF_DRIVING_DRONE
pip install -r $SELF_DRIVING_DRONE/requirements.txt
During installation, you will be provided with 3 pre-trained models designed for Object Recognition on the obstacle depicted below. Additionally, you will receive a way to run them automatically through the main.py
file.
Please, note that any obstacles of similar shape will be suitable to be recognized by our models, but the color of the paper may have a small impact on the results.
Choose one of the following lines based on the model of your choice:
# SELF_DRIVING_DRONE=/path/to/clone/SelfDrivingDrone
python main.py cascade
python main.py ssdlite
python main.py faster-rcnn
$SELF_DRIVING_DRONE
-
If no parameter is passed through the command line to the
main.py
file, the default executed model will be the SSDlite model. -
the default executed model can be changed at will in the
main.py
file, simply by changing the value of thedefault_model
variable amongCascade
,SSDlite
andfaster-RCNN
. (the assignments are case insensitive)
As a finishing touch, 2 real time windows are initiated, each operating on the same dedicated thread. These windows serve the purpose of visualizing the following:
- The live video feed captured by the drone, with bounding boxes drawn around any obstacles present in the scene.
- A graphical representation, comprised of 3
matplotlib.subplots
, that illustrates the difference between each input variable and its corresponding setpoint over time.
We're a group of three hard-working university students at Sapienza University of Rome. SelfDrivingDrone is a project that we have undertaken as part of our academic curriculum, specifically designed to fulfill the requirements of one of our examinations - AI Lab: Computer Vision and NLP.
The entire process has been nothing short of stimulating and fulfilling, and we sincerely hope that our passion and dedication shine through in the final outcome. For any clarifications or further information regarding the project, please feel free to reach out to us.
SelfDrivingDrone is released under the MIT License.