Welcome to the AI-Driven UAV Collision & Intrusion Detection System! This innovative project, developed for a Hackathon, leverages cutting-edge AI technologies to enhance safety in UAV (Unmanned Aerial Vehicle) operations. By integrating YOLOv8 object detection with advanced collision prediction algorithms, this system provides real-time monitoring, intrusion alerts, and comprehensive flight path analysis to prevent accidents and ensure secure airspace management.
Whether you're a drone enthusiast, aviation professional, or developer interested in AI applications, this project offers a robust framework for UAV safety solutions.
- 🕵️ AI-Powered Detection: Utilizes YOLOv8 for accurate drone detection in videos and images.
- 📊 Flight Path Simulation: Generates synthetic UAV flight paths with realistic data (latitude, longitude, altitude, speed).
⚠️ Collision Prediction: Implements algorithms to predict potential collisions and calculate minimum distances.- 🚨 Intrusion Alerts: Monitors restricted areas and triggers alerts for unauthorized intrusions, logging to JSON files.
- 📈 2D Visualization: Interactive plots for flight paths, alerts, and detection results using Matplotlib.
- 🌐 Streamlit Dashboard: User-friendly web interface for real-time monitoring and data visualization.
- 📝 Comprehensive Logging: Detailed logs for collision and intrusion events in JSONL format.
- Python 3.10 or higher
- Git
-
Clone the Repository:
git clone https://github.com/GajulaRakeshBabu/AI-Driven-UAV-Collision-Intrusion-Detection-System.git cd AI-Driven-UAV-Collision-Intrusion-Detection-System/uav-safety -
Install Dependencies:
pip install -r requirements.txt
-
Prepare Data:
- Place sample videos/images in
data/(e.g.,sample.mp4orsample.jpgfor YOLO testing).
- Place sample videos/images in
-
YOLO Object Detection Demo:
python scripts/run_yolo_demo.py
- Detects objects in sample video/image.
- Results saved in
runs/predict/.
-
Generate Synthetic Flight Paths:
python scripts/generate_flights.py
- Creates CSV files in
data/and plots inruns/.
- Creates CSV files in
-
Collision Check:
python scripts/check_collision.py
- Analyzes flight paths for collision risks.
-
Dataset Generation (Week-2):
python scripts/dataset.py
- Generates advanced flight datasets.
-
Visualization & Intrusion Detection:
python scripts/visualize.py
- Visualizes paths, checks intrusions, saves alerts.
-
YOLO Drone Detection:
python scripts/yolo_demo.py
- Specialized drone detection demo.
streamlit run streamlit_app.pyAccess the dashboard at http://localhost:8501 for interactive monitoring.
uav-safety/
├── data/
│ ├── alerts.json # Intrusion alerts
│ ├── flight1.csv # Synthetic flight data
│ ├── flight2.csv
│ └── sample.mp4 # Test video
├── scripts/
│ ├── check_collision.py # Collision prediction
│ ├── dataset.py # Data generation
│ ├── generate_flights.py # Flight path creation
│ ├── run_yolo_demo.py # YOLO demo
│ ├── visualize.py # Path visualization
│ └── yolo_demo.py # Drone detection
├── runs/
│ ├── flight_paths.png # Flight plots
│ ├── paths.png # Alert plots
│ └── predict/ # YOLO results
├── logs/
│ ├── collision.jsonl # Collision logs
│ └── intrusion.jsonl # Intrusion logs
├── requirements.txt # Dependencies
├── streamlit_app.py # Dashboard app
└── README.md # This file
Run tests to ensure everything works:
python -m pytest tests/We welcome contributions! Here's how you can help:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/amazing-feature. - Commit changes:
git commit -m 'Add amazing feature'. - Push to branch:
git push origin feature/amazing-feature. - Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
We would like to express our sincere gratitude to the following individuals, organizations, and communities for their invaluable contributions to this project:
- Ultralytics: For developing and maintaining YOLOv8, the powerful object detection model that serves as the foundation for our AI-driven detection system.
- The Open-Source Community: For providing essential libraries and frameworks, including Streamlit for the dashboard, Pandas and NumPy for data manipulation, Matplotlib for visualization, OpenCV for computer vision, and Flask for web integration.
- Pexels: For supplying the high-quality images used in our project documentation and promotional materials.
- Hackathon Organizers and Sponsors: For creating the platform and resources that enabled the development of innovative solutions for UAV safety and airspace management.
We are also grateful to our mentors, peers, and the broader aviation and AI communities for their inspiration, feedback, and ongoing support in advancing the field of unmanned aerial vehicle safety.
For questions or collaborations:
- Author: Gajula Rakesh Babu
- Email: grakesh2605@gmail.com
- GitHub: https://github.com/GajulaRakeshBabu
⭐ If you find this project helpful, please give it a star!