You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MobileNetV3-Small species model (Models/species_mobilenetv3.pth) was merged in but is not yet wired into the FastAPI scan pipeline. The /api/v1/scan endpoint currently returns freshness data only; it does not run species classification.
Goal
Connect the pre-trained .pth model to the scan endpoint so the API response includes species classification alongside freshness scores.
Acceptance Criteria
backend/species_classifier.py created — loads Models/species_mobilenetv3.pth at startup (not on every request) using torch.load with map_location='cpu'
/api/v1/scan response extended with a new species object:
Problem
The MobileNetV3-Small species model (
Models/species_mobilenetv3.pth) was merged in but is not yet wired into the FastAPI scan pipeline. The/api/v1/scanendpoint currently returns freshness data only; it does not run species classification.Goal
Connect the pre-trained
.pthmodel to the scan endpoint so the API response includes species classification alongside freshness scores.Acceptance Criteria
backend/species_classifier.pycreated — loadsModels/species_mobilenetv3.pthat startup (not on every request) usingtorch.loadwithmap_location='cpu'/api/v1/scanresponse extended with a newspeciesobject:{ "species": { "name": "Rohu Carp", "confidence": 0.945, "top3": [ { "name": "Rohu Carp", "confidence": 0.945 }, { "name": "Catla Carp", "confidence": 0.038 }, { "name": "Mrigal Carp", "confidence": 0.017 } ] } }torch.no_grad()for performancenull, not a 500 error)backend/tests/test_species_classifier.pySupported Species (10 classes)
Rohu Carp, Catla Carp, Mrigal Carp, Pangas, Basa, Tilapia, Pomfret, Kingfish, Mackerel, Sardine
Notes
Models/species_mobilenetv3.pth(6.0 MB, MobileNetV3-Small, 94.5% val accuracy)