π Aerial Search & Rescue: Human & Red Buoy Detection System
A fine-tuned Segment Anything 2 (SAM2) and YOLOv8 aerial search and rescue platform for flood disaster response. It performs real-time aerial human segmentation, hybrid non-circular red buoy detection, human-buoy proximity status tracking, center target reticle positioning, and exports 3 separate mission coordinate breakdown tables for drone payload dropping.
π Key Features
- Fine-Tuned SAM2 Human Segmentation:
- High-precision SAM2 segmentation powered by fine-tuned weights (
best_model.pt,latest_model.pt).
- High-precision SAM2 segmentation powered by fine-tuned weights (
- YOLOv8 Aerial Human & Flood Detectors:
yolov8_human.pt: Fine-tuned aerial human detector for high-altitude drone imagery.yolov8_flood.pt: YOLOv8-OBB model for water surface area ROI filtering.
- Hybrid Red Buoy Detector:
- Adaptive Multi-Spectrum HSV & shape-agnostic engine designed for real-world non-circular, oblong, tubular, multi-shaded red/orange buoys under sun glare, shadows, and water spray.
- Ready-to-load support for fine-tuned
yolov8_buoy.pt.
- Human-Buoy Proximity Status & Target Reticles:
- Classifies targets into π¨ Humans WITHOUT Buoy (Priority Drop Targets) vs. β Humans WITH Buoy Nearby (Serviced).
- High-visibility warning red bounding boxes with center target crosshairs for precision buoy drops.
- 3 Separate Mission Coordinate Data Breakdown:
- Interactive pandas DataFrames exportable for drone mission navigation.
π Repository & Model Weights Structure
.
βββ app.py # Streamlit Web App & Interactive Dashboard
βββ inference.py # Headless CLI Inference & Evaluation Script
βββ train_yolo.py # YOLOv8 Fine-Tuning Script
βββ train_detector.py # MobileNet Faster R-CNN Detector Training
βββ train.py # SAM2 Training Pipeline
βββ coco_loader.py # COCO Annotations Dataset Loader
βββ preprocess.py # SAM2 Data Preprocessing
βββ requirements.txt # Python Dependencies
β
βββ best_model.pt # Fine-tuned SAM2 Model Weights (Best)
βββ latest_model.pt # Fine-tuned SAM2 Model Weights (Latest)
βββ yolov8_human.pt # Fine-tuned YOLOv8 Human Detector
βββ yolov8_flood.pt # Fine-tuned YOLOv8-OBB Flood Area Detector
βββ sam2_hiera_tiny.pt # SAM2 Base Tiny Checkpoint
βββ sam2_hiera_small.pt # SAM2 Base Small Checkpoint
π Quick Start on Any Machine
1. Clone & Set Up Virtual Environment
git clone https://huggingface.co/YOUR_USERNAME/YOUR_REPO_NAME
cd YOUR_REPO_NAME
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On Linux/macOS:
source .venv/bin/activate
pip install -r requirements.txt
2. Install SAM2 Package
git clone https://github.com/facebookresearch/segment-anything-2.git sam2_repo
cd sam2_repo
pip install -e .
cd ..
3. Launch Streamlit Dashboard
streamlit run app.py
π License & Citation
Developed for Search & Rescue flood disaster relief. Powered by PyTorch, Ultralytics YOLOv8, and Meta AI SAM2.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support