{"id":18253967,"url":"https://github.com/williamcorsel/tenno","last_synced_at":"2025-07-06T01:04:36.017Z","repository":{"id":165274513,"uuid":"295678089","full_name":"williamcorsel/teNNo","owner":"williamcorsel","description":"Controller implementing obstacle avoidance for drones using an object detection CNN","archived":false,"fork":false,"pushed_at":"2021-06-08T15:51:46.000Z","size":14629,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T21:46:35.071Z","etag":null,"topics":["deep-learning","drones","obstacle-avoidance","sift","yolov4"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/williamcorsel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-15T09:25:56.000Z","updated_at":"2023-11-30T13:27:32.000Z","dependencies_parsed_at":"2023-06-19T18:36:29.347Z","dependency_job_id":null,"html_url":"https://github.com/williamcorsel/teNNo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/williamcorsel/teNNo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamcorsel%2FteNNo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamcorsel%2FteNNo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamcorsel%2FteNNo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamcorsel%2FteNNo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/williamcorsel","download_url":"https://codeload.github.com/williamcorsel/teNNo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamcorsel%2FteNNo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263833416,"owners_count":23517373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","drones","obstacle-avoidance","sift","yolov4"],"created_at":"2024-11-05T10:09:27.048Z","updated_at":"2025-07-06T01:04:35.946Z","avatar_url":"https://github.com/williamcorsel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# teNNo\n\nThe Size Expansion algorithm enables obstacle detection by tracking size changes of objects between frames. This repository contains the code used to perform the experiments performed in the Bachelor's thesis _\"YOLO-based Obstacle Avoidance for Drones\"_ at Leiden University. It contains a controller for the Ryze Tello drone that was used, enabling the streaming of video and drone control using the keyboard.\n\nSize Expansion uses object detection to find object in images from the drone's camera to avoid them. Multiple detection methods are included. These can be found in the `detectors` directory\n\n* **SIFT:** Uses SIFT feature matching to identify objects and calculate sizes. Described in the [paper](https://www.mdpi.com/1424-8220/17/5/1061) by Al-Kaff et al.\n* **Darknet:** Runs the [YOLOv4](https://github.com/AlexeyAB/darknet) model used in the thesis.\n* **TensorFlow:** Can run models found in the Tensorflow object detection [model zoo](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md).\n* **EfficientDet:** Test implementation of [EfficientDet]((https://github.com/zylo117/Yet-Another-EfficientDet-Pytorch)). Currently only detects objects\n\n## How to install\n\nThis program is written in Python3. Make sure Python3 and pip3 are installed correctly.\n\n### Base + SIFT Detector\n\nPackages needed for the main program:\n\n```bash\npip install -r requirements.txt\n```\n\nInstall the latest version of TelloPy from source: More information [here](https://github.com/hanyazou/TelloPy). Note: the version on PyPi is out of data and does not work!\n\n```bash\ngit clone https://github.com/hanyazou/TelloPy\ncd TelloPy\nsudo apt-get install python3-setuptools\npip install wheel\npython setup.py bdist_wheel\npip install dist/tellopy-*.dev*.whl --upgrade\n```\n\nOpenCV libraries (v4.3.0 used) can also be installed from source [here](https://github.com/opencv/opencv/releases/tag/4.3.0), together with the extra modules (opencv-contrib) necessary for SIFT [here](https://github.com/opencv/opencv_contrib/releases/tag/4.3.0). For install directions look [here](https://docs.opencv.org/4.3.0/d7/d9f/tutorial_linux_install.html). For installing into a Conda environment see [here](https://jayrobwilliams.com/files/html/OpenCV_Install.html). Installing via [PyPi](https://pypi.org/project/opencv-contrib-python/) might also be possible if the wheel is updated to at least v4.3.0. (Note: the most recent version of OpenCV-Python is now uploaded to PyPi)\n\nInstalling these packages will allow you run the main controller functionality and the SIFT obstacle detector.\n\n### Other detector modules\n\nOther detector modules can be found in the `detectors` directory. Each contains a separate README with install instructions\n\nUsing the gpu version of the CNN object detectors is highly recommended. For this you need to install [CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html).\n\n## How to use\n\nSimply run the following command to start the program:\n\n```bash\npython tenno.py\n```\n\nThe following flags are supported:\n\n|Option |Action|Choices|\n|---|---|---|\n|-d, --detector | Chooses object detector | {sift, yolodark, tf, eff} |\n|-z, --zfile | Adds a zone weight file for YOLO detector | Path to file |\n|-t, --test | Enables experiment mode | {ratio_size, ratio_kp, avoid} |\n|-o, --output | Output file of experiment results | Path to file |\n|-r, --record | Enables recording of every flight in test modes | |\n\nTo get full functionality using the object detector of choice call:\n\n```bash\npython tenno.py -d sift\npython tenno.py -d yolodark\n```\n\n### Keyboard controls\n\n|Key    | Action    |\n|---    |---        |\n|w, a, s, d| Move drone horizontally|\n|Space, Shift| Move drone vertically|\n|q, e | Turn in place|\n|o | Toggle detector on/off\n|l | Toggle logging on/off\n|p, 1 | Resets current position to (0,0,0)|\n|h | Sets waypoint to (0,0,0) |\n|r | Toggle video recording on/off |\n|2 | Toggle waypoint flying on/off |\n|3 | Reset position and start flying to waypoint with obstacle detection |\n| - | Toggle HUD on/off |\n| Esc | Land drone and quit program |\n\n### Test modes\n\nThe ratio_size and ratio_kp test modes enable the adjustments of hull size ratio and keypoint size ratio on the fly. Experiments are started using the '3' key. The drone flies forward, flying back when an obstacle is detected, outputting the distance to the obstacle.\n\n|Key    | Action    |\n|---    |---        |\n| m | Increase test ratio by 0.025 |\n| n | Decrease test ratio by 0.025 |\n\nThe avoid test enables the default threshold values. The test flies the drone forward, avoiding any detected obstacles.\n\n|Key    | Action    |\n|---    |---        |\n| Home | Confirm successful avoidance |\n| End | Confirm failed avoidance |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamcorsel%2Ftenno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamcorsel%2Ftenno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamcorsel%2Ftenno/lists"}