How brindapuri/ai-based-animal-recognition works
This is a camera-trap animal-recognition web app. Users upload images, run YOLOv8 to separate animal from no-animal images, then classify detected animals with a choice of ResNet or ViT. The app also supports classification charts, CSV download, sorting images into folders, and testing custom ResNet weights. The README documents the frontend/backend workflow; source excerpts show backend model calls and filesystem outputs. Some endpoint wiring and frontend request details were omitted, so those links are documented at the product level rather than inferred per endpoint.
Main entry points: app.py Upload and API routes · ML.py Model inference helpers · App.js Workflow interface · index.js React bootstrap
Components 16
Web interface
- Workflow interface
flask-webapp/DeployAnmialDetection/animalDetection/frontend/src/App.js - React bootstrap
flask-webapp/DeployAnmialDetection/animalDetection/frontend/src/index.js - Performance reporting
flask-webapp/DeployAnmialDetection/animalDetection/frontend/src/reportWebVitals.js
Flask service
- Upload and API routes
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Animal detection
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - ResNet classification
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - ViT classification
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Charts and CSV
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Image sorting
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - ResNet weight check
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py
Inference models
- Model inference helpers
flask-webapp/DeployAnmialDetection/animalDetection/backend/ML.py - Model weights and labels
flask-webapp/DeployAnmialDetection/animalDetection/backend/weights
Results and files
- Uploaded images
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Image result data
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - CSV and sorted folders
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py
Other components
- Researcher
Connections 23
- Researcher → Workflow interface: uploads images
README.md - Workflow interface → Upload and API routes: sends requests
README.md - React bootstrap → Workflow interface: renders
flask-webapp/DeployAnmialDetection/animalDetection/frontend/src/index.js - React bootstrap → Performance reporting: invokes
flask-webapp/DeployAnmialDetection/animalDetection/frontend/src/index.js - Upload and API routes → Uploaded images: saves uploads
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Upload and API routes → Animal detection: dispatches
README.md - Animal detection → Model inference helpers: calls YOLO
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Upload and API routes → ResNet classification: dispatches
README.md - Upload and API routes → ViT classification: dispatches
README.md - ResNet classification → Model inference helpers: calls ResNet
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - ViT classification → Model inference helpers: calls ViT
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Model inference helpers → Model weights and labels: loads models
flask-webapp/DeployAnmialDetection/animalDetection/backend/ML.py - Animal detection → Image result data: updates results
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - ResNet classification → Image result data: writes results
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - ViT classification → Image result data: writes results
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Upload and API routes → Charts and CSV: dispatches
README.md - Charts and CSV → Image result data: reads results
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Charts and CSV → CSV and sorted folders: writes CSV
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Upload and API routes → Image sorting: dispatches
README.md - Image sorting → Image result data: reads results
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Image sorting → CSV and sorted folders: copies images
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - Upload and API routes → ResNet weight check: dispatches
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py - ResNet weight check → Model inference helpers: loads and tests
flask-webapp/DeployAnmialDetection/animalDetection/backend/app.py