- Drone Detection System
- Features
- Dataset
- Files
- Example Outputs
- Getting Started
- Usage
- Training
- Acknowledgments
- Contact
- Troubleshooting
- Future Improvements
- License
This is a Python-based drone detection system that utilizes YOLO (You Only Look Once) for object detection on a custom-trained drone dataset. It can detect drones in real time using a webcam or in video files. This project was created using OpenCV and YOLOv8.
-
Real-time drone detection using a webcam
-
Drone detection on pre-recorded video files
-
Custom YOLOv8 model trained on a drone detection dataset
The model was trained on a custom drone detection dataset from Kaggle's YOLO Drone Detection Dataset.
data.yaml
: Dataset configuration file for YOLOv8 training.drone.mp4
: Example video file for testing the detection.main.py
: Script for training the dataset.predict_video.py
: Script for detection on a video file.predict_webcam.py
: script for real-time detection using a webcam.yolov8n_trained.pt
: Trained YOLOv8 model for drone detection.
Here are some example outputs from the drone detection system:
- Description: An example of drone detection using a webcam.
- Output:
- Description: An example of drone detection on a pre-recorded video.
- Output: https://github.com/user-attachments/assets/092f8b2b-c220-4f24-851d-97a08353f136
Ensure that Python 3.12.7 is installed on your machine.
- Clone the repository:
git clone https://github.com/bhavishyasingla1/drone_detection.git cd drone_detection
- Install dependencies:
pip install -r requirements.txt
-
Running Detection on Webcam:
Run the following command:
python predict_webcam.py
This will open your webcam and start detecting drones in real-time.
-
Running Detection on a Video File:
Modify
video_path
inpredict_video.py
to your desired video file path:video_path = 'path/to/your/video.mp4'
Run the script:
python predict_video.py
Output: Detected videos will be saved as
output.mp4
in the same directory as the script.
To train the model on your dataset, ensure data.yaml
is correctly configured, and then run main.py
using the following command:
python main.py
the output yolov8n_trained.pt
will be saved in same directory as the script.
You can refer to the Kaggle YOLO Drone Detection Dataset for the dataset used. Watch Computer Vision Engineer - YouTube Video to learn how to train your own custom dataset.
- OpenCV for computer vision functionalities.
- YOLOv8 for object detection framework.
- Kaggle for providing the dataset.
If you have any questions or feedback, feel free to reach out:
- Email: [email protected]
- GitHub: Bhavishyasingla1
-
ModuleNotFoundError: Ensure all dependencies are installed using
pip install -r requirements.txt
. -
Performance issues: Make sure your machine meets the required specifications for running YOLOv8.
-
Implement multi-drone detection capabilities.
-
Enhance model accuracy with more diverse datasets.
-
Create a user interface for easier interaction.
This project is licensed under the MIT License - see the LICENSE file for details.