A REST API service that uses Google's CameraTrapAI SpeciesNet model for species detection in camera trap images.
- FastAPI-based REST service with Swagger documentation
- Species detection using CameraTrapAI's SpeciesNet model
- Docker support with GPU acceleration
- Simple POST endpoint for image analysis
Upload an image to get species detection results.
Request:
- Method: POST
- Content-Type: multipart/form-data
- Body: image file
Response:
{
"success": true,
"detections": [
// Detection results from SpeciesNet model
]
}-
Install dependencies:
pip install -r requirements.txt
-
Run the service:
uvicorn app:app --reload --host 0.0.0.0 --port 8000
The service is included in the main docker-compose.yml file. To run it:
docker-compose up speciesnetOnce running, access the Swagger documentation at:
- Python 3.10+
- NVIDIA GPU (recommended)
- CUDA support for TensorFlow
- Docker with NVIDIA Container Toolkit (for containerized deployment)