Pyrovision: wildfire early detection
The increasing adoption of mobile phones have significantly shortened the time required for firefighting agents to be alerted of a starting wildfire. In less dense areas, limiting and minimizing this duration remains critical to preserve forest areas.
Pyrovision aims at providing the means to create a wildfire early detection system with state-of-the-art performances at minimal deployment costs.
Quick Tour
Automatic wildfire detection in PyTorch
You can use the library like any other python package to detect wildfires as follows:
from pyrovision.models import rexnet1_0x
from torchvision import transforms
import torch
from PIL import Image
# Init
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
tf = transforms.Compose([transforms.Resize(size=(448)), transforms.CenterCrop(size=448),
transforms.ToTensor(), normalize])
model = rexnet1_0x(pretrained=True).eval()
# Predict
im = tf(Image.open("path/to/your/image.jpg").convert('RGB'))
with torch.no_grad():
pred = model(im.unsqueeze(0))
is_wildfire = torch.sigmoid(pred).item() >= 0.5
Setup
Python 3.6 (or higher) and pip/conda are required to install PyroVision.
Stable release
You can install the last stable release of the package using pypi as follows:
pip install pyrovision
or using conda:
conda install -c pyronear pyrovision
Developer installation
Alternatively, 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:
git clone https://github.com/pyronear/pyro-vision.git
pip install -e pyro-vision/.
What else
Documentation
The full package documentation is available here for detailed specifications.
Demo app
The project includes a minimal demo app using Gradio
You can check the live demo, hosted on 🤗 HuggingFace Spaces 🤗 over here 👇
Docker container
If you wish to deploy containerized environments, a Dockerfile is provided for you build a docker image:
docker build . -t <YOUR_IMAGE_TAG>
Minimal API template
Looking for a boilerplate to deploy a model from PyroVision with a REST API? Thanks to the wonderful FastAPI framework, you can do this easily. Follow the instructions in ./api to get your own API running!
Reference scripts
If you wish to train models on your own, we provide training scripts for multiple tasks!
Please refer to the ./references folder if that's the case.
Citation
If you wish to cite this project, feel free to use this BibTeX reference:
@misc{pyrovision2019,
title={Pyrovision: wildfire early detection},
author={Pyronear contributors},
year={2019},
month={October},
publisher = {GitHub},
howpublished = {\url{https://github.com/pyronear/pyro-vision}}
}
Contributing
Please refer to CONTRIBUTING to help grow this project!
License
Distributed under the Apache 2 License. See LICENSE for more information.
Metadata
Release files for pyrovision 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyrovision-0.2.0.tar.gz | 28.6 kB | Without provenance | Details for pyrovision-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyrovision-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pyrovision-0.2.0-py3-none-any.whl |
Total release size: 59.3 kB
Release files / pyrovision-0.2.0.tar.gz
| Download URL | pyrovision-0.2.0.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8bc1415f6b334c27a3cc63d1fbc6d4190023697e8a0c3e6955665b105d6258be
|
|
BLAKE2b-256 checksum How to use checksums |
9e38da04dcf3a0910b942351b6dd58e295132d7447a4bef05441255cb38c1bf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Release files / pyrovision-0.2.0-py3-none-any.whl
| Download URL | pyrovision-0.2.0-py3-none-any.whl |
|---|---|
| Size | 30.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b90a87f04f28b96dc7d083d2c1040977df3aab7fd690b85735b6a835fe230a4d
|
|
BLAKE2b-256 checksum How to use checksums |
dce0dde49b8c2a2e89e93f4df3d109dfc9f4791e846b1aaff4dbea625cc3d9e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Security for pyrovision 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.