How bhagyashreemohalkar/smartwasteai works
SmartWasteAI is a browser-based waste classifier: users upload an image, receive a category and confidence, then see disposal guidance and session analytics. The frontend checks API health and sends the image to FastAPI; the backend stores the image, invokes inference, logs prediction metadata, and returns the result. The README documents these capabilities, but the model artifact and class-name file are not in the tree, so their paths are unavailable; deployment details are not mapped as runtime components.
Main entry points: script.js Client workflows · main.py FastAPI routes · index.html Upload and results UI · inference.py Image preprocessing and prediction
Components 12
Web experience
- Upload and results UI
frontend/index.html - Client workflows
frontend/script.js - Disposal guidance
frontend/script.js - History and analytics
frontend/script.js
Inference API
- FastAPI routes
backend/main.py
Classification
- Image preprocessing and prediction
backend/inference.py - MobileNetV2 model
- Class-name mapping
Cloud records
- Amazon S3
- Amazon DynamoDB
Other components
- User
- Browser local storage
Connections 17
- User → Upload and results UI: uploads image
- Upload and results UI → Client workflows: drives workflow
- Client workflows → Browser local storage: reads and writes
- Client workflows → FastAPI routes: checks health
- Client workflows → FastAPI routes: posts image
- FastAPI routes → Amazon S3: stores image
- FastAPI routes → Image preprocessing and prediction: requests prediction
- FastAPI routes → Amazon DynamoDB: writes metadata
- FastAPI routes → Client workflows: returns prediction
- Image preprocessing and prediction → MobileNetV2 model: runs inference
- Image preprocessing and prediction → Class-name mapping: reads class names
- Client workflows → Disposal guidance: selects recommendation
- Client workflows → History and analytics: updates session stats
- Disposal guidance → Upload and results UI: renders advice
- History and analytics → Upload and results UI: renders history
- Client workflows → Upload and results UI: renders result
- User → History and analytics: views analytics