Object Detection
ultralytics
fire-hydrant
fire-hydrants
yolo
yolo26
gis
geospatial
computer-vision
street-view
infrastructure
Instructions to use JuanJEstrada/fire-hydrant-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use JuanJEstrada/fire-hydrant-detector with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("JuanJEstrada/fire-hydrant-detector") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
| 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. | |
| [](https://huggingface.co/) | |
| [](https://github.com/ultralytics/ultralytics) | |
| [](#) | |
| [](#) | |
| --- | |
|  | |
| ## ๐ 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 | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| --- | |
| ## ๐ธ Example Results | |
| ### Fire Hydrant Detection | |
|  | |
|  | |
| # ๐ 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. | |