--- license: cc-by-sa-4.0 library_name: ultralytics pipeline_tag: object-detection tags: - yolo - yolov8 - ultralytics - object-detection - poles - towers - streetlevel - openstreetmap - infrastructure datasets: - hotosm/streetlevel-poles base_model: Ultralytics/YOLOv8 --- # streetlevel-poles-yolov8s YOLOv8s object detector for utility **poles** and **towers** in street-level imagery. Trained on the [Street-level Poles & Towers](https://huggingface.co/datasets/hotosm/streetlevel-poles) dataset as part of the HOT-OSM YOLO experiments (curated by UC Berkeley Code For Good cohort). This is the **50-epoch YOLOv8s** model from the original project deliverable. For a lightweight 10-epoch sanity-check baseline, see the related [`kshitijrajsharma/streetlevel-poles-yolo11n`](https://huggingface.co/kshitijrajsharma/streetlevel-poles-yolo11n). ## Classes `0: pole`, `1: tower` ## Metrics Best epoch (39 of 49; early-stopped from a 50-epoch schedule, patience 10), **validation split**, `imgsz=640`: | metric | value | |-----------|------:| | mAP@50 | 0.685 | | mAP@50-95 | 0.278 | | precision | 0.672 | | recall | 0.686 | > **Note on comparability.** These are validation-split metrics logged by > Ultralytics during training. The related yolo11n baseline reports > **test-split** metrics (mAP@50 = 0.332), so the two numbers are **not** > directly comparable. A matched test-split evaluation of this model can be > added - see `results.csv` for the full per-epoch training history. Artifacts: `results.png`, `confusion_matrix.png`, `confusion_matrix_normalized.png`, `pr_curve.png`, `f1_curve.png`, `val_pred_sample.jpg`, `results.csv`. ## Training - Base weights: `yolov8s.pt` (Ultralytics) - Epochs: 50 configured, stopped at 49 (early stopping, patience 10), best epoch 39 - Image size: 640, batch: 16, seed: 42 - Full training code: `training_notebook.ipynb` (original HOT-OSM notebook) ## Files | file | description | |------|-------------| | `best.pt` | best-epoch weights (recommended for inference) | | `last.pt` | final-epoch weights | | `metrics.json` | training config + best-epoch validation metrics | | `data.yaml` | Ultralytics dataset config (class names) | | `results.csv` | full per-epoch training/validation metrics | | `training_notebook.ipynb` | end-to-end training notebook | | `*.png`, `val_pred_sample.jpg` | evaluation plots and a sample prediction | ## Inference ```python from huggingface_hub import hf_hub_download from ultralytics import YOLO weights = hf_hub_download( repo_id="hotosm/streetlevel-poles-yolov8s", filename="best.pt", ) model = YOLO(weights) results = model("street_image.jpg") results[0].show() ``` ## Related repositories - Dataset: [`hotosm/streetlevel-poles`](https://huggingface.co/datasets/hotosm/streetlevel-poles) - Lightweight baseline (10-epoch yolo11n): [`kshitijrajsharma/streetlevel-poles-yolo11n`](https://huggingface.co/kshitijrajsharma/streetlevel-poles-yolo11n) - Demo Space (runs the yolo11n baseline): [`kshitijrajsharma/streetlevel-poles-detector`](https://huggingface.co/spaces/kshitijrajsharma/streetlevel-poles-detector) ## License Released under **CC-BY-SA-4.0**, matching the dataset. Training imagery derives from Panoramax / OpenStreetMap-sourced street-level images; share-alike compatibility is preserved.