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 (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2024-05-16T11:54:39.000Z (about 1 year ago)
- Last Synced: 2024-05-17T20:00:07.879Z (about 1 year ago)
- Topics: docker, image-classification, onnxruntime, python, raspberry-pi, wildfire
- Language: Python
- Homepage: https://pyronear.org/pyro-engine
- Size: 6.74 MB
- Stars: 7
- Watchers: 6
- Forks: 5
- Open Issues: 6
-
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 Imageengine = Engine()
im = Image.open("path/to/your/image.jpg").convert('RGB')
prediction = engine.predict(im)
```## Setup
Python 3.9 (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 cameraSo 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.40.1": {
"brand": "reolink",
"type": "ptz",
"credentials": [
{
"login": "dummy_login_1",
"password": "dummy_password_1",
"posid": 1
},
{
"login": "dummy_login_2",
"password": "dummy_password_2",
"posid": 2
},
{
"login": "dummy_login_3",
"password": "dummy_password_3",
"posid": 3
}
]
},
"169.254.40.3": {
"brand": "reolink",
"type": "static",
"credentials": [
{
"login": "dummy_login_4",
"password": "dummy_password_4"
}
]
}
}
```## 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.