πŸš’Fire Hydrant Detection

An open-source YOLO object detection model for automatically detecting fire hydrants in street-level imagery.

Hugging Face YOLO Task Class


val_batch1_labels

πŸš’ Overview

This project provides a YOLO-based computer vision model designed to detect fire hydrants in street-level imagery.

The goal is to make it easier for GIS professionals, municipalities, utilities, researchers, and developers to automatically identify fire hydrants from imagery and support infrastructure inventory and mapping workflows.

The model was trained specifically for the visual characteristics of fire hydrants appearing in street-level imagery.

What can it do?

Given an image such as:

πŸ“· Street-level imagery

the model attempts to identify:

πŸš’ Fire Hydrant

and return its location using a bounding box and confidence score.


🎯 Model

Property Value
Architecture YOLO26n
Task Object Detection
Classes 1
Detected class Fire Hydrant
Image size 640 Γ— 640
Annotation format YOLO
Framework Ultralytics
Model file best.pt

πŸ“Š Performance

BoxR_curve confusion_matrix confusion_matrix_normalized labels BoxF1_curve BoxP_curve BoxPR_curve

results


πŸ“Έ Example Results

Fire Hydrant Detection

val_batch1_pred

val_batch2_pred

πŸš€ Quick Start

1. Install Ultralytics

pip install ultralytics

2. Download the model

Download best.pt from this repository

3. Run inference

  from ultralytics import YOLO
  
  # Load the fire hydrant detection model
  model = YOLO("best.pt")
  
  # Run detection
  results = model("street_view.jpg")
  
  # Display the result
  results[0].show()

4. Python Example

You can adjust the confidence threshold depending on your application. Ex : conf=0.25 will generally produce more detections, while conf=0.75 will require greater confidence before returning a detection.

from ultralytics import YOLO

model = YOLO("best.pt")

results = model.predict(
    source="street_view.jpg",
    conf=0.50,
    imgsz=640
)

for result in results:
    result.show()

πŸ—‚οΈ Dataset

The model was trained using a dataset of street-level images containing fire hydrants. Dataset characteristics Images: 1,123 Object class: Fire Hydrant Annotation format: YOLO bounding boxes Image source: Street-level imagery Viewing directions: North, South, East, and West

The dataset was created specifically for fire hydrant detection and infrastructure mapping applications.

⚠️ The original imagery used for training may be subject to third-party licensing and usage restrictions and is therefore not necessarily redistributed with this model.

πŸ‹οΈ Training

The model was trained using the Ultralytics YOLO framework.

    yolo detect train \
    data=dataset.yaml \
    model=yolo26n.pt \
    epochs=100 \
    imgsz=640

πŸ—ΊοΈ GIS & Utility Applications

This model can potentially support a variety of GIS and infrastructure workflows. (Current famous models like struggle to detect fire hydrants or simply do not have a class for it)

1. Municipal GIS

Automatically identify hydrants from street-level imagery and assist with updating infrastructure inventories.

2. Utility Mapping

Use computer vision to help locate hydrants that may be missing from existing GIS datasets.

3. Asset Inventory

Compare detected hydrants against existing GIS features to identify:

Potential missing hydrants Potential duplicate features Possible positional discrepancies Areas requiring field verification

4. Field Verification

Use model detections as a starting point for GIS technicians and field crews.

⚠️ Limitations

This model should be considered an assistive computer vision tool, not a replacement for field verification or authoritative GIS data.

Performance may vary depending on:

Image quality Lighting conditions Weather Camera angle Distance from the hydrant Hydrant design Vegetation Vehicles or other obstructions Image resolution Geographic location

Hydrants that are heavily occluded or visually different from those represented in the training data may be missed.

Always verify important infrastructure information against authoritative GIS or field data.

🌎 Geographic Considerations

The training imagery represents a particular geographic and environmental context.

Because fire hydrant designs, colors, installation practices, vegetation, road environments, and imagery characteristics vary between regions, performance should be evaluated before deploying the model in a new geographic area.

🀝 Contributing

Contributions are welcome.

Possible areas for contribution include:

Additional training images Improved annotations New geographic regions Model evaluation False-positive analysis False-negative analysis GIS integration Detection workflows

If you use this model in a project, feedback and performance results are appreciated

πŸ“œ License

This model is released under the MIT License.

Please review the licensing requirements of the underlying training imagery and any third-party components used with this project.

Downloads last month
19
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support