AI-powered fire detection system using Gemma 3N E4B vision model
Project description
FireSense
FireSense is a video feed analyzer that detects fires, powered by the Gemma 3N vision model.
Pipeline
Quick Start
Installation
# Install pypi package
pip install firesense
or
# Install from source code:
uv pip install -e .
Command Line Usage
# Analyze a YouTube video
firesense analyze <youtube_video_id>
# Launch demo with local server
firesense demo <youtube_video_id> --local
https://github.com/user-attachments/assets/b8fdba5b-bd2d-44c6-be4e-8fb6499b62a8
Ngrok Integration
# setup ngrok
ngrok config add-authtoken <your_ngrok_auth_key>
# Launch demo with local server and ngrok tunnel
firesense demo <youtube_video_id> --local --ngrok
Python Usage
from firesense import setup_model, infer
# Setup model
model, tokenizer = setup_model()
# Run inference
inference_result = infer(model, tokenizer, system_prompt, user_prompt, image_path)
Features
- 🚀 Fast Development: Leverages uv for 10-100x faster dependency installation
- 📦 Modern Packaging: PEP 621 compliant with pyproject.toml
- 🔍 Type Safety: Full mypy strict mode support (uv run mypy src)
- ✅ Testing: Comprehensive pytest setup with coverage
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and checks (
make check) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Testing
# Install the project with development dependencies using:
uv pip install -e ".[dev]"
# Run the tests with:
uv run pytest
Type Safety
# Full mypy strict mode support
uv run mypy src
Releasing
New releases are manually pushed to pypi:
make publish
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file firesense-0.10.2.tar.gz.
File metadata
- Download URL: firesense-0.10.2.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60d378e65bd77a4eaff2a02f04a934ac5e01bf0682638e3d0e52850982a2cbc
|
|
| MD5 |
3f1931f670e70699185e15c0ff0ff1d0
|
|
| BLAKE2b-256 |
e40a099a7868cf4bb446a35081798e2c3d051b80a507e69bc34d931028e6bd93
|
File details
Details for the file firesense-0.10.2-py3-none-any.whl.
File metadata
- Download URL: firesense-0.10.2-py3-none-any.whl
- Upload date:
- Size: 75.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00e789bd3018655edfe79cea3608a14e386e60fe2cc43148edb45da41318947f
|
|
| MD5 |
d1e73e9edbadd988fe80f9ae7a51c7fe
|
|
| BLAKE2b-256 |
c207aa4f391d528739112725411aa5f719e314959166f2a6f4bc6e6e968059e4
|