JuanJEstrada's picture
Update README.md
29948e9 verified
|
Raw
History Blame Contribute Delete
6.99 kB
---
license: mit
library_name: ultralytics
pipeline_tag: object-detection
tags:
- object-detection
- fire-hydrant
- fire-hydrants
- yolo
- yolo26
- gis
- geospatial
- computer-vision
- street-view
- infrastructure
---
# ๐Ÿš’Fire Hydrant Detection
### An open-source YOLO object detection model for automatically detecting fire hydrants in street-level imagery.
[![Hugging Face](https://img.shields.io/badge/Hugging%20Face-Model-yellow)](https://huggingface.co/)
[![YOLO](https://img.shields.io/badge/YOLO-26-blue)](https://github.com/ultralytics/ultralytics)
[![Task](https://img.shields.io/badge/Task-Object%20Detection-green)](#)
[![Class](https://img.shields.io/badge/Class-Fire%20Hydrant-red)](#)
---
![val_batch1_labels](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/yJP32V4_Am_41iFdCM_Ar.jpeg)
## ๐Ÿš’ 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](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/pm5Y5BM3jTp8oeFgkc62f.png)
![confusion_matrix](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/qk5OychNJdkANQCCsQtX7.png)
![confusion_matrix_normalized](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/YE1N9wQzg8YCAtrXjGPb2.png)
![labels](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/eSwtAJFHm8_zF_G8m5R_r.jpeg)
![BoxF1_curve](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/jj39fuV7WP7I9OGJGgh9f.png)
![BoxP_curve](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/Mge3ZQd7duITtJe3i15fB.png)
![BoxPR_curve](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/KeXWOxjt7yoConHZd2rAf.png)
![results](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/7DHX82m7LHryJEsviwZUQ.png)
---
## ๐Ÿ“ธ Example Results
### Fire Hydrant Detection
![val_batch1_pred](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/SPd_O5xWgIwM8lB9Vf0IN.jpeg)
![val_batch2_pred](https://cdn-uploads.huggingface.co/production/uploads/6a85c37d567565e7056b19d9/YxIe1tEUs3HMUf9TZ5au_.jpeg)
# ๐Ÿš€ Quick Start
## 1. Install Ultralytics
```bash
pip install ultralytics
```
## 2. Download the model
Download **best.pt** from this repository
## 3. Run inference
```bash
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.
```bash
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.
``` bash
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.