Skip to content

RakeshBabuGajula/AI-Driven-UAV-Collision-Intrusion-Detection-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚁 AI-Driven UAV Collision & Intrusion Detection System

Screenshot 2025-10-05 231307

Python License: MIT Streamlit

πŸ“‹ Description

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.

✨ Key Features

  • πŸ•΅οΈ 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.

πŸ› οΈ Installation

Prerequisites

  • Python 3.10 or higher
  • Git

Steps

  1. 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
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Prepare Data:

    • Place sample videos/images in data/ (e.g., sample.mp4 or sample.jpg for YOLO testing).

πŸš€ Usage

Running Individual Scripts

  1. YOLO Object Detection Demo:

    python scripts/run_yolo_demo.py
    • Detects objects in sample video/image.
    • Results saved in runs/predict/.
  2. Generate Synthetic Flight Paths:

    python scripts/generate_flights.py
    • Creates CSV files in data/ and plots in runs/.
  3. Collision Check:

    python scripts/check_collision.py
    • Analyzes flight paths for collision risks.
  4. Dataset Generation (Week-2):

    python scripts/dataset.py
    • Generates advanced flight datasets.
  5. Visualization & Intrusion Detection:

    python scripts/visualize.py
    • Visualizes paths, checks intrusions, saves alerts.
  6. YOLO Drone Detection:

    python scripts/yolo_demo.py
    • Specialized drone detection demo.

Launch Streamlit Dashboard

streamlit run streamlit_app.py

Access the dashboard at http://localhost:8501 for interactive monitoring.

πŸ“Έ Screenshots

Flight Path Visualization

Screenshot 2025-10-05 223543

UAV Paths with Alerts

Screenshot 2025-10-05 223708

Streamlit Dashboard

Screenshot 2025-10-05 224145 Screenshot 2025-10-05 224205

πŸ“ Project Structure

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

πŸ§ͺ Testing

Run tests to ensure everything works:

python -m pytest tests/

🀝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature/amazing-feature.
  3. Commit changes: git commit -m 'Add amazing feature'.
  4. Push to branch: git push origin feature/amazing-feature.
  5. Open a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

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.

πŸ“ž Contact

For questions or collaborations:


⭐ If you find this project helpful, please give it a star!

About

AI-Driven UAV Collision & Intrusion Detection System enhances drone safety by combining YOLOv8 object detection, synthetic flight path generation, collision prediction, and intrusion alerts. A real-time Streamlit dashboard consolidates risks and events, ensuring safer UAV operations in congested airspaces.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages