https://github.com/pyronear/pyro-engine
Wildfire detection on edge devices
https://github.com/pyronear/pyro-engine
docker image-classification onnxruntime python raspberry-pi wildfire
Last synced: 3 months ago
JSON representation
Wildfire detection on edge devices
- Host: GitHub
- URL: https://github.com/pyronear/pyro-engine
- Owner: pyronear
- License: apache-2.0
- Created: 2020-09-03T06:08:11.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2025-07-22T09:32:00.000Z (3 months ago)
- Last Synced: 2025-07-27T06:35:09.257Z (3 months ago)
- Topics: docker, image-classification, onnxruntime, python, raspberry-pi, wildfire
- Language: Python
- Homepage: https://pyronear.org/pyro-engine
- Size: 7.04 MB
- Stars: 9
- Watchers: 5
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

# PyroEngine: Wildfire detection on edge devices
PyroEngine provides a high-level interface to use Deep learning models in production while being connected to the alert API.
## Quick Tour
### Running your engine locally
You can use the library like any other python package to detect wildfires as follows:
```python
from pyroengine.core import Engine
from PIL import Image
engine = Engine()
im = Image.open("path/to/your/image.jpg").convert('RGB')
prediction = engine.predict(im)
```
## Setup
Python 3.11 (or higher) and [pip](https://pip.pypa.io/en/stable/)/[conda](https://docs.conda.io/en/latest/miniconda.html) are required to install PyroEngine.
### Developer installation
If you wish to use the latest features of the project that haven't made their way to a release yet, you can install the package from source:
```shell
git clone https://github.com/pyronear/pyro-engine.git
pip install -e pyro-engine/.
```
### Full docker orchestration
In order to run the project, you will need to specify some information, which can be done using a `.env` file.
This file will have to hold the following information:
- `API_URL`: the URL of the API where to send alerts
- `CAM_USER`: the username to access the camera
- `CAM_PWD`: the password to access the camera
So your `.env` file should look something like this:
```
API_URL=https://api.pyronear.org
CAM_USER=my_dummy_login
CAM_PWD=my_dummy_pwd
```
Additionally, you'll need a `./data` folder which contains:
- `credentials.json`: a dictionary with the IP address of your cameras as key, and dictionary with entries `login` & `password` for their Alert API credentials
- `model.onnx`: optional, will override the model weights download from HuggingFace Hub
- `config.json`: optional, will override the model config download from HuggingFace Hub
### Example of `credentials.json`:
```json
{
"169.254.7.1": {
"brand": "reolink",
"type": "static",
"token": "",
"azimuth": 322,
"id": 9,
},
"169.254.7.2": {
"brand": "reolink",
"type": "static",
"token": "",
"azimuth": 251,
"id": 10,
},
"169.254.7.3": {
"brand": "reolink",
"type": "ptz",
"token": "",
"focus_position": 700,
"id": 11,
"poses": [
0,
1,
2,
3,
],
"azimuths": [
0,
90,
180,
270
]
}
}
```
## Documentation
The full package documentation is available [here](https://pyronear.org/pyro-engine/) for detailed specifications.
## Contributing
Please refer to [`CONTRIBUTING`](CONTRIBUTING.md) if you wish to contribute to this project.
## Credits
This project is developed and maintained by the repo owner and volunteers from [Pyronear](https://pyronear.org/).
## License
Distributed under the Apache 2 License. See [`LICENSE`](LICENSE) for more information.