Git Product home page Git Product logo

tellodrone-with-keyboard-and-objectdetection's Introduction

TelloDrone-with-KeyBoard-and-Objectdetection

This repo allows you to control a Tello drone using your keyboard and perform object detection using a pre-trained model. The drone movements are controlled using the arrow keys and specific keys for takeoff, landing, and flips. The object detection is performed on the live video feed from the drone's camera.

Prerequisites

  • Python 3.x
  • getter module
  • djitellopy library
  • pygame library
  • cv2 (OpenCV) library
  • cvzone library

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/your-username/TelloDrone-with-KeyBoard-and-Objectdetection.git
  2. Install the required dependencies:

    pip install getter djitellopy pygame opencv-python cvzone

Usage

  1. Import the necessary modules and initialize the required components:

    import getter as kg
    from djitellopy import tello
    from time import sleep
    
    kg.init()
    
    drone = tello.Tello()
    drone.connect()
  2. Define the function to get keyboard input for drone control:

    def getKeyboardInput(isFlying):
        # ... implementation ...
        return [lr, fb, ud, yw, isFlying]
  3. Implement the drone control loop:

    while True:
        inputs = getKeyboardInput(isFlying)
        isFlying = inputs[4]
        drone.send_rc_control(inputs[0], inputs[1], inputs[2], inputs[3])
        sleep(0.01)
  4. Implement object detection using the Tello drone's camera:

    # ... import necessary modules ...
    
    thres = 0.50
    nmsThres = 0.2
    
    # ... load class names and pre-trained model ...
    
    while True:
        # ... get frame from drone's camera ...
    
        # ... perform object detection ...
    
        # ... display the detected objects ...
    
        # ... get keyboard input and control the drone ...
    
        # ... display the frame ...

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please create a GitHub issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Acknowledgments


tellodrone-with-keyboard-and-objectdetection's People

Contributors

sainavaneet avatar

Stargazers

Manisha Lingala avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.