--- title: Innomium Ember emoji: ๐Ÿ”ฅ colorFrom: red colorTo: yellow sdk: static app_file: index.html pinned: false license: apache-2.0 ---
Innomium logo # Innomium Ember ### Ultra-light YOLO fire, smoke, and extinguisher detection for safety monitoring and edge vision. **90% accuracy ยท 3 classes ยท 9.8 MB ONNX ยท Runs in browser & on edge** [![Live Demo](https://img.shields.io/badge/Live_Demo-Open_Space-1565FF?style=for-the-badge)](https://huggingface.co/spaces/innomium/fire-detection) [![Model Size](https://img.shields.io/badge/Model-9.8_MB-001530?style=for-the-badge)](./weights.onnx) [![Accuracy](https://img.shields.io/badge/Accuracy-90%25-1565FF?style=for-the-badge)](#performance)
--- ## Overview **Innomium Ember** is a cutting-edge YOLO-based fire hazard detector โ€” very light, very strong, and built for real-world safety scenes. Detect **fire**, **smoke**, and **fire extinguisher** with a compact **~9.8 MB ONNX** model that runs on CPU, edge hardware, or directly in the browser. | | | |---|---| | **Classes** | fire ยท smoke ยท fire extinguisher | | **Accuracy** | 90% | | **Model format** | ONNX | | **Model size** | ~9.8 MB | | **Input size** | 640 ร— 640 | | **Inference** | Browser (WASM) ยท Python ยท Edge CPU/GPU | | **Post-processing** | Per-class NMS ยท Smoke merge ยท Color-prior filters | --- ## Performance Ember classifies fire hazards in outdoor and industrial scenes with per-class bounding boxes and confidence scores.
| Input | Ember Output | |:---:|:---:| | Fire safety scene โ€” input frame | Scene with all three hazard classes detected | | Raw camera frame | Class labels + confidence scores |
**What this demonstrates:** - All three hazard classes in one scene: **fire**, **smoke**, and **fire extinguisher** - Per-class NMS without cross-class suppression - Flame detections up to 77% alongside smoke (36%) and extinguisher (31%) - Suitable for outdoor events, safety drills, warehouses, and industrial sites --- ## Key Features - **Multi-class YOLO** โ€” Fire, smoke, and fire extinguisher with class ID remapping from the ONNX head. - **Per-class NMS** โ€” Hard NMS applied independently per class to preserve overlapping hazard types. - **Smoke merge** โ€” Fragmented smoke boxes merge into coherent plumes for cleaner alerts. - **Color-prior filters** โ€” Borderline fire and extinguisher detections are validated against expected pixel appearance. - **Privacy-first demo** โ€” The live Space runs inference entirely in your browser. No frames are uploaded. --- ## Use Cases | Sector | Application | |--------|-------------| | **Industrial** | Warehouse and factory fire/smoke monitoring | | **Commercial** | Kitchen, server room, and office hazard detection | | **Outdoor** | Wildfire perimeter, campsite, and bonfire flame detection | | **Safety** | Fire extinguisher location verification in camera views | --- ## Live Demo Try Ember directly in your browser: **[https://huggingface.co/spaces/innomium/fire-detection](https://huggingface.co/spaces/innomium/fire-detection)** 1. Open the Space 2. Upload an image or click **Load Example** 3. View detections with class labels and confidence scores --- ## Repository Structure ``` โ”œโ”€โ”€ index.html # Marketing site + interactive demo โ”œโ”€โ”€ main.js / detector.js # Browser inference (ONNX Runtime Web) โ”œโ”€โ”€ weights.onnx # ONNX model weights (Git LFS) โ”œโ”€โ”€ app.py # Python FireDetector for batch / server use โ”œโ”€โ”€ example_input.png # Sample input frame โ”œโ”€โ”€ example_output.png # Sample detection output โ””โ”€โ”€ innomium_icon.svg # Innomium logo ``` --- ## Local Python Usage ```bash pip install -r requirements.txt ``` ```python from pathlib import Path import cv2 from app import FireDetector detector = FireDetector(Path(".")) image = cv2.imread("example_input.png") boxes = detector.predict_image(image) for box in boxes: print(detector.class_names[box.cls_id], box.conf) ``` ### Batch inference ```python results = detector.predict_batch([image], offset=0, n_keypoints=0) for frame in results: print(frame.frame_id, len(frame.boxes)) ``` --- ## Model Pipeline 1. **Letterbox preprocess** โ€” Resize and pad to model input (640ร—640) 2. **ONNX inference** โ€” YOLO multi-class fire hazard detection 3. **Class remap** โ€” Map model head order to `[fire, smoke, fire extinguisher]` 4. **Per-class NMS** โ€” Independent hard NMS per hazard class 5. **Smoke merge & fire suppress** โ€” Merge fragmented smoke; suppress nested fire duplicates 6. **Color filters** โ€” Validate borderline fire/extinguisher boxes against pixel appearance --- ## About Innomium Innomium builds cutting-edge computer vision models for mission-critical environments โ€” where accuracy, latency, and deployability all matter. **Very light. Very strong. Built for safety.** --- ## License Apache 2.0