Skip to content

All projects

Autonomous Quadcopter Navigation Using Computer Vision & CNN

An autonomous drone simulation integrating Webots, OpenCV, and a Convolutional Neural Network (CNN) to navigate predefined waypoints, classify camera-captured targets, and trigger destination-based landing. The CNN achieved 97.98% test accuracy across five image classes.

Screenshot of Autonomous Quadcopter Navigation Using Computer Vision & CNN

Problem

Autonomous drones need to interpret visual information and translate it into navigation decisions without continuous human intervention. Recognizing a destination from onboard camera images is challenging because images captured during flight differ in scale, framing, and visual quality from the data used to train an image classifier.

The objective was to develop a simulated quadcopter capable of following predefined waypoints, identifying designated visual targets using deep learning, and initiating landing when the required destination was recognized.

Approach

Developed a Mavic 2 Pro simulation in Webots and implemented a Python-based flight controller using GPS, inertial measurements, and gyroscope feedback. Configured proportional control for flight stabilization and waypoint-based navigation across five predefined locations.

Built and trained a Convolutional Neural Network using TensorFlow/Keras on 30,000 labeled grayscale images. The architecture combines three convolutional layers, max-pooling, a dense hidden layer, and a five-class softmax output. Trained the model for 10 epochs using the Adam optimizer and categorical cross-entropy loss.

Implemented an OpenCV image preprocessing pipeline to transform drone-captured images through grayscale conversion, manual cropping, erosion, Laplacian enhancement, and resizing to the CNN's required 28×28 input dimensions.

Integrated the saved CNN model with the drone controller, mapping predicted image classes to destination boxes. The controller uses these predictions to determine whether to continue navigating or initiate the landing sequence.

Outcome

Trained a five-class CNN that achieved 97.98% accuracy on a separate test set of 5,000 images after 10 training epochs. The final training accuracy reached 98.99%.

Implemented an integrated Webots simulation containing waypoint navigation, sensor-based flight stabilization, camera image capture, image preprocessing, CNN inference, and classification-triggered landing logic.

The repository includes the trained Keras model, simulation world, Python controller, experimental notebooks, and processed target images. Autonomous landing success rates and real-world flight performance were not formally benchmarked.

Highlights

  • Achieved 97.98% CNN accuracy on 5,000 test images
  • Trained a five-class CNN using 30,000 labeled grayscale images
  • Integrated deep learning inference into an autonomous drone controller
  • Implemented five-waypoint navigation with GPS and inertial sensor feedback
  • Developed an OpenCV pipeline with erosion and Laplacian image enhancement
  • Connected visual target classification to autonomous landing decisions

Notes

Developed a vision-guided autonomous quadcopter system in the Webots robotics simulator, integrating drone navigation, image processing, and deep learning into a single decision-making workflow.

Implemented a Python-based controller for a simulated Mavic 2 Pro drone using GPS, gyroscope, and inertial sensor data for flight stabilization and waypoint navigation. The drone captures images of target boxes, processes them using OpenCV, and uses a trained Convolutional Neural Network to identify their corresponding destinations.

Designed and trained a five-class CNN on 30,000 grayscale images, achieving 97.98% accuracy on a separate test set of 5,000 images. Developed a preprocessing pipeline incorporating grayscale conversion, region-of-interest cropping, morphological erosion, Laplacian enhancement, and resizing to 28×28 pixels.

Integrated the trained Keras model into the drone controller so that image classification results inform autonomous navigation decisions. When a predicted target matches the required destination, the controller initiates a landing sequence. The project demonstrates an applied combination of computer vision, deep learning, robotics simulation, and sensor-based control.