DefendIntelligence/vessel-detection
3
1---2title: Vessel Detection3sdk: gradio4app_file: app.py5python_version: 3.116pinned: false7license: mit8---9 1011 12# Vessel Detection13 14Gradio Space for detecting vessels in satellite imagery with a fine-tuned YOLOv8 model.15 16The main demo example is a multi-vessel satellite patch with 14 detections at the default confidence threshold.17 18## Links19 20- Live Space: https://huggingface.co/spaces/DefendIntelligence/vessel-detection21- Model repository: https://huggingface.co/DefendIntelligence/vessel-detection22- Direct model download: https://huggingface.co/DefendIntelligence/vessel-detection/resolve/main/models/best.pt23 24## Model25 26- Local file expected by the app: `models/best.pt`27- Checkpoint source: `train-20260417T124314Z-fad9d3ed_best.pt`28- Run source: `infer-b88a2887`29- Training name: `super-visible-y8s-newlabels-focuslite-e45`30- Family: YOLOv8s31- Main dataset: `sentinel-2-rgb`32- Local index mAP50: `0.7912`33 34The GitHub repository does not store `best.pt`. Use the bootstrap command below and it will download the model from Hugging Face.35 36## Run Locally37 38```bash39git clone https://github.com/anisayari/vessel-detection.git40cd vessel-detection41python run_local.py42```43 44Windows shortcut:45 46```powershell47.\start.ps148```49 50macOS/Linux shortcut:51 52```bash53bash start.sh54```55 56The script creates a local `.venv`, installs `requirements.txt`, downloads `models/best.pt` from Hugging Face, then starts Gradio at `http://127.0.0.1:7860`.57 58Useful options:59 60```bash61python run_local.py --download-only62python run_local.py --skip-install63python run_local.py --host 0.0.0.0 --port 786064```65 66## Use The App67 681. Upload an RGB satellite image or select an example.692. Adjust the confidence threshold if needed.703. Click `Detect vessels`.71 72The app tiles large images before inference so small vessels remain visible to the model.73 74## Hugging Face Deployment75 76```bash77git init78git lfs install79git remote add origin https://huggingface.co/spaces/DefendIntelligence/vessel-detection80git add .81git commit -m "Add YOLOv8 satellite boat detector Space"82git push -u origin main83```84 85If the Space already exists, clone it and copy this folder's contents to the Space repository root.86 