An AI-powered system for detecting, annotating, and analyzing wildlife in camera trap images. The project combines user-friendly annotation interfaces with a robust backend API and database system to facilitate creation of training datasets for machine learning models.
This system allows researchers to:
- Manage large collections of camera trap images
- Annotate wildlife with bounding boxes and species labels
- Export annotations in standard formats (YOLO, COCO) for ML training
- Track annotation progress across multiple datasets
- Analyze wildlife behavior patterns and habitat usage
This project is critically important for our state's wildlife conservation efforts. It provides essential data for understanding biodiversity, monitoring endangered species, and implementing effective conservation strategies.
- Image Management: Index, upload, and organize camera trap images
- Species Cataloging: Maintain database of wildlife species with metadata
- Annotation Interfaces: Multiple UI options for bounding box creation
- Export Functionality: Generate datasets in YOLO and COCO formats
- Microhabitat Analysis: Analyze vegetation and environmental conditions
- Behavioral Tracking: Monitor wildlife activity patterns
WildlifeDetectionSystem/
├── api/ # Flask backend
│ ├── app/ # Application source
│ │ ├── models/ # Database models
│ │ ├── routes/ # API endpoints
│ │ ├── services/ # Business logic
│ │ ├── static/ # Static files (annotation UIs)
│ │ ├── templates/ # HTML templates
│ │ └── utils/ # Helper utilities
│ ├── config.py # Configuration
│ ├── debug/ # Debugging tools
│ ├── instance/ # Instance data (contains SQLite DB)
│ └── run.py # Application entry point
├── data/ # Data storage
│ ├── raw_images/ # Original camera trap images
│ ├── processed_images/ # Standardized images
│ ├── annotations/ # Annotation data directory
│ └── export/ # Export directory for ML data
├── docs/ # Documentation
├── scripts/ # Utility scripts
└── requirements.txt # Python dependencies
- Python 3.8+
- pip
- SQLite
-
Clone the repository
git clone https://github.com/yourusername/WildlifeDetectionSystem.git cd WildlifeDetectionSystem -
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up the database
cd api export FLASK_APP=run.py flask shell >>> from app.models.models import db >>> db.create_all() >>> exit()
-
Run the server
flask run
-
Access the annotation interface Open a web browser and navigate to: http://127.0.0.1:5000/advanced-annotator
- Select a folder from the dropdown
- Draw a box around wildlife by clicking and dragging
- Select the species from the right panel
- Adjust the box if needed
- Navigate between images with Previous/Next buttons
- Mark "No Animals Present" for empty images
- Submit annotations with the "Submit & Next" button
- B - Box tool
- S - Select tool
- Delete - Delete annotation
- F - Fit to screen
- +/- - Zoom in/out
- 1-9 - Select species
- Left/Right arrows - Navigate images
Use the API endpoints:
- COCO format: GET /api/annotations/export
- YOLO format: GET /api/annotations/export/yolo?output_dir=./data/export
- Identify complete animals in good conditions
- Integrate with existing labeled image database
- Basic differentiation of target species
- Recognize partial silhouettes and characteristic features
- Improve identification of blurry silhouettes of similar species (wolf/jackal)
- Adapt to various imaging conditions
- Integrate environmental factors
- Seasonal and annual activity patterns (not monthly)
- Species interaction tracking and chronological analysis
- Behavioral pattern recognition
- Microhabitat analysis including vegetation and environmental conditions
Detailed documentation can be found in the docs directory.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Project developed in collaboration with Prof. Peeva
- Inspired by needs in wildlife conservation research
- Based on camera trap technology for non-invasive wildlife monitoring