Instructions to use prithivMLmods/Fire-Detection-Engine with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Fire-Detection-Engine with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="prithivMLmods/Fire-Detection-Engine") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("prithivMLmods/Fire-Detection-Engine") model = AutoModelForImageClassification.from_pretrained("prithivMLmods/Fire-Detection-Engine", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files7 unmodified lines89101112139 unmodified lines232425267 unmodified lines- Fire-Detection-engine- Precision-98---```Classification report:9 unmodified linesweighted avg 0.9799 0.9798 0.9797 2424```7 unmodified lines891011121314151617189 unmodified lines2829303132333435363738394041424344454647487 unmodified lines- Fire-Detection-engine- Precision-98---# **Fire-Detection-Engine**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.```Classification report:9 unmodified linesweighted avg 0.9799 0.9798 0.9797 2424```# **Mappers**```pythonMapping 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.
README.md+23-1