Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model:
|
| 4 |
+
- prithivMLmods/Fire-Detection-Engine
|
| 5 |
+
pipeline_tag: image-classification
|
| 6 |
+
library_name: transformers
|
| 7 |
+
tags:
|
| 8 |
+
- Fire-Detection-engine
|
| 9 |
+
- Precision-98
|
| 10 |
+
---
|
| 11 |
+

|
| 12 |
+
|
| 13 |
+
# **Fire-Detection-Engine**
|
| 14 |
+
|
| 15 |
+
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.
|
| 16 |
+
|
| 17 |
+
```python
|
| 18 |
+
Classification report:
|
| 19 |
+
|
| 20 |
+
precision recall f1-score support
|
| 21 |
+
|
| 22 |
+
Fire Needed Action 0.9708 0.9864 0.9785 808
|
| 23 |
+
Normal Conditions 0.9872 0.9530 0.9698 808
|
| 24 |
+
Smoky Environment 0.9818 1.0000 0.9908 808
|
| 25 |
+
|
| 26 |
+
accuracy 0.9798 2424
|
| 27 |
+
macro avg 0.9799 0.9798 0.9797 2424
|
| 28 |
+
weighted avg 0.9799 0.9798 0.9797 2424
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
# **Mappers**
|
| 35 |
+
|
| 36 |
+
```python
|
| 37 |
+
Mapping of IDs to Labels: {0: 'Fire Needed Action', 1: 'Normal Conditions', 2: 'Smoky Environment'}
|
| 38 |
+
|
| 39 |
+
Mapping of Labels to IDs: {'Fire Needed Action': 0, 'Normal Conditions': 1, 'Smoky Environment': 2}
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
# **Key Features**
|
| 43 |
+
- **Architecture**: Vision Transformer (ViT) - `google/vit-base-patch16-224-in21k`.
|
| 44 |
+
- **Input**: RGB images resized to 224x224 pixels.
|
| 45 |
+
- **Output**: Binary classification ("Fire Needed Action" or "Normal Conditions" or "Smoky Environment").
|
| 46 |
+
- **Training Dataset**: A curated dataset of fire place conditions.
|
| 47 |
+
- **Fine-Tuning**: The model is fine-tuned using Hugging Face's `Trainer` API with advanced data augmentation techniques.
|
| 48 |
+
- **Performance**: Achieves high accuracy and F1 score on validation and test datasets.
|