A Dockerized system that watches an RTSP video stream for fume / dark smoke using a LOCAL vision‑language model, stores results in InfluxDB, and exposes them through a lightweight web dashboard.
- 📡 RTSP live‑stream frame extraction
- 🤖 AI analysis using an Ollama VLM (recommended: Qwen2.5-VL)
- 📈 Data storage in InfluxDB v1
- 🌐 Web interface to view detections and history
- 🔒 HTTPS support via your own
cert.pemandkey.pem
Web page example:
Before using this project, you must install/configure the following:
Install Docker for your OS:
https://docs.docker.com/get-docker/
Install InfluxDB v1.x and note your credentials Fill the file accordingly
- Must be installed on the host machine
- Must be accessible from inside Docker → listen on 0.0.0.0
- Install from: https://ollama.ai
To expose Ollama:
ollama serve --host 0.0.0.0Recommended model:
ollama pull qwen2.5vlgh repo clone Coldness00/Fumes-Detector
cd Fumes-DetectorThese are required for HTTPS access. At the root of the repo, put:
cert.pem
key.pem
This command line will create them for 10years.
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3650 -nodes
You must edit docker-compose.yml before running the stack.
Below are fields you MUST understand and adapt:
FOLDER_PATH=/app/images
DB_PATH=/app/data/processed_images.db
Machine’s local IP + port
Example:
http://192.168.1.15:9822
Use only if routing through a reverse proxy.
Otherwise: leave it commented.
Time between image captures (seconds).
- Lower = faster detection
- Higher load on CPU/GPU
Recommended to keep as provided.
You can tweak, but preserve formatting.
Defaults are safe, but can be adjusted if needed.
Friendly camera display name.
Your RTSP address including ID and password if required.
Adjust host, port, database, username, password.
Timezone (example):
TZ=Europe/Paris
You must map local folders to the container:
./images:/app/images
./data:/app/data
These store:
- extracted frames
- processed database
Adjust if running multiple instances.
Run the stack:
docker compose up -dCheck logs:
docker compose logs -fOpen:
http://<BASE_URL>:<PORT> -> http://192.168.1.15:9822
https://<BASE_URL>:<PORT>
If using self‑signed certificates, your browser may show a warning—this is expected.
.
├── data/ <- local DB and persistent data
├── images/ <- extracted frames
├── main.py <- main application
├── db.py <- database handler
├── docker-compose.yml
├── Dockerfile
├── cert.pem / key.pem
└── requirements.txt
You can find enclosed an example of a Grafana Dashboard, copy/paste as a new dashboard, then edit the entites name accorgindlgy.
Feel free to open an Issue or request enhancements.
Contributions and suggestions are always welcome! 🚀