dronefreak / dji-tello-object-detection-segmentation

This Git repo allows to implement the state-of-the-art MaskRCNN algorithm for instance segmentation on the video feed from DJI-Tello drone.
MIT License
48 stars 14 forks source link
computer-vision dji-tello image-segmentation mask-rcnn

Mask-RCNN

Implement Real-Time Semantic Segmentation with Mask_RCNN.

Requirements

The algorithm has been tested on the above mentioned configuration, but I'm pretty sure that other combinations would also work effectively. But please make sure that you have TF/Keras combination as mentioned above. Opencv 3.4 would suffice.

This implementation would work better if you have a GPU in your system and use CUDA-accelerated learning. In a MSI laptop with 1050Ti (4 GB with 768 cuda cores), i5-8220 and 8GB RAM, the FPS obtained is 4.637.

Also, in order to test it on a Tello, make sure that you have the drone turned on and connected to its WiFi network. Once you esecute this code, press TAB to take-off and BACKSPACE to land. Other manual navigation commands are given in the header of the python code.

Getting Started

Make sure you have installed TelloPy from https://github.com/hanyazou/TelloPy.

Install Dependencies (Not Mentioned Above)

$ sudo -H pip3 install -r requirements.txt
$ sudo -H pip3 install av opencv-python
$ sudo -H pip3 install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

Using pre-trained weights for MS COCO

It is included in {telloCV-masked-rcnn.py} that downloading the pre-trained weights for MS COCO.

Run Demonstration

$ python3 telloCV-masked-rcnn.py

Alternatively, you could download the weights file from here.

Mask RCNN COCO Object detection and segmentation