Deep Learning | Transfer Learning | YOLOv8 | Streamlit
This project builds a complete AI pipeline to classify aerial objects as Bird or Drone, and optionally detect them in real-world images using YOLOv8. The system supports image classification, object detection, and a deployable Streamlit UI.
-
Custom CNN baseline
-
Transfer Learning:
- EfficientNetB0
- ResNet50V2
- MobileNetV2 (best performer)
-
Achieved up to 97% accuracy
-
Includes confusion matrix, precision, recall, and F1-score
-
YOLOv8n model trained on 3,319 labeled images
-
Detects and labels multiple birds/drones in a single frame
-
Outputs bounding boxes + class labels
-
Achieved:
- mAP50 ≈ 0.82
- Precision ≈ 0.82–0.85
- Recall ≈ 0.77–0.79
- Upload an image
- Select Classification or YOLO Detection
- Get predicted class + confidence score
- See bounding boxes for YOLO detection
Bird_Vs_Drone/
│
├── notebooks/
│ ├── 01_EDA.ipynb
│ ├── 02_Custom_CNN.ipynb
│ ├── 03_Transfer_Learning.ipynb
│ ├── 04_YOLO_Training.ipynb
│
├── models/
│ ├── best_custom_cnn.h5
│ ├── best_mobilenet.keras
│ ├── best_effnetb0.keras
│ ├── best_resnet50v2.keras
│ ├── best.pt # YOLO weights
│
├── app/
│ ├── app.py # Streamlit App
│ ├── utils.py
│ ├── requirements.txt
│
├── object_detection_Dataset/
│ ├── train/images
│ ├── train/labels
│ ├── val/images
│ ├── val/labels
│ ├── test/images
│ ├── test/labels
│
├── classification_dataset/
│ ├── train/bird, drone
│ ├── val/bird, drone
│ ├── test/bird, drone
│
└── README.md
- Accuracy: 69%
- F1-score: 0.72
- 8–10 hidden layers
| Model | Accuracy | Precision | Recall | F1-score |
|---|---|---|---|---|
| EfficientNetB0 | 0.972 | 0.968 | 0.968 | 0.968 |
| ResNet50V2 | 0.972 | 0.968 | 0.968 | 0.962 |
| MobileNetV2 | 0.972 | 0.968 | 0.968 | 0.968 |
⭐ MobileNetV2 selected as best model for deployment (fastest + lightest).
- mAP50: 0.82+
- mAP50-95: ~0.53
- Precision: 0.82–0.85
- Recall: 0.77–0.79
Outputs example:
Bird detected at (x,y) with 0.91 confidence
Drone detected at (x,y) with 0.87 confidence
pip install -r requirements.txt
streamlit run app.py
-
Upload an image
-
Choose:
- Classification Mode — MobileNet prediction
- YOLO Detection Mode — Bounding box detection
-
View results instantly
- Resize to 224×224 for classification
- Resize to 640×640 for YOLO
- Normalize pixel values
- Data augmentation applied
- Custom CNN baseline → moderate accuracy
- Transfer Learning → high accuracy
- YOLOv8n → bounding-box detection
- Confusion matrices
- Training curves
- mAP & precision-recall metrics
- Side-by-side model comparison
- Streamlit web app
- Easy to upload images
- Real-time YOLO inference
- 🛫 Airport bird-strike prevention
- 🕊 Wildlife monitoring
- 🎥 Security & defense surveillance
- 📡 Unmanned aerial vehicle detection
- 🔬 Environmental research
- Python, TensorFlow, Keras
- Transfer Learning
- YOLOv8 (Ultralytics)
- OpenCV
- NumPy, Pandas, Matplotlib, Seaborn
- Streamlit
- Google Colab
MIT License
Pull requests are welcome. For major changes, please open an issue first.
Created by Omi Feel free to connect or share feedback!
If you want, I can also generate: ✅ A professional project thumbnail ✅ A requirements.txt ✅ A video script for your README Just say the word.