File size: 2,217 Bytes
4153edc 02bd7f9 4153edc f509ff3 4153edc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
---
license: apache-2.0
base_model:
- prithivMLmods/Fire-Detection-Engine
pipeline_tag: image-classification
library_name: transformers.js
tags:
- Fire-Detection-engine
- Precision-98
---
![ccccccccccccccccccccccccccc.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/WP5cejlMirz3t6o2_YzVQ.png)
# **Fire-Detection-Engine-ONNX**
The **Fire-Detection-Engine** is a state-of-the-art deep learning model designed to detect fire-related conditions in images. It leverages the **Vision Transformer (ViT)** architecture, specifically the `google/vit-base-patch16-224-in21k` model, fine-tuned on a dataset of fire and non-fire images. The model is trained to classify images into one of the following categories: "Fire Needed Action," "Normal Conditions," or "Smoky Environment," making it a powerful tool for detecting fire hazards.
```python
Classification report:
precision recall f1-score support
Fire Needed Action 0.9708 0.9864 0.9785 808
Normal Conditions 0.9872 0.9530 0.9698 808
Smoky Environment 0.9818 1.0000 0.9908 808
accuracy 0.9798 2424
macro avg 0.9799 0.9798 0.9797 2424
weighted avg 0.9799 0.9798 0.9797 2424
```
![download.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/kDS5cVee2ZVOv92rY0lGw.png)
# **Mappers**
```python
Mapping of IDs to Labels: {0: 'Fire Needed Action', 1: 'Normal Conditions', 2: 'Smoky Environment'}
Mapping of Labels to IDs: {'Fire Needed Action': 0, 'Normal Conditions': 1, 'Smoky Environment': 2}
```
# **Key Features**
- **Architecture**: Vision Transformer (ViT) - `google/vit-base-patch16-224-in21k`.
- **Input**: RGB images resized to 224x224 pixels.
- **Output**: Binary classification ("Fire Needed Action" or "Normal Conditions" or "Smoky Environment").
- **Training Dataset**: A curated dataset of fire place conditions.
- **Fine-Tuning**: The model is fine-tuned using Hugging Face's `Trainer` API with advanced data augmentation techniques.
- **Performance**: Achieves high accuracy and F1 score on validation and test datasets. |