How glucasbakker-source/cv-hackathon-airi works
FruitControl is an offline fruit-station and delivery-basket auditing app. Operators submit a photo, review fruit detections and counts, compare them with a display plan, estimate weight and nutrition, and optionally save or export the scene. The graph also preserves the documented dataset/model workflow. Backend and frontend links are grounded in excerpts and README statements; some UI component interactions and unsampled ML details are not shown, so those connections are omitted.
Main entry points: App.tsx App workflow · main.py HTTP API and inference · train_yolo26.py Model training · audit_dataset.py Dataset audit
Components 23
Operator experience
- App workflow
frontend/src/App.tsx - Camera capture
frontend/src/components/CameraCaptureModal.tsx - Photo and demos
frontend/src/components/UploadAndDemos.tsx - Detection review
frontend/src/components/DetectionViewport.tsx - Plan comparison
frontend/src/components/StatsAndDisplayPlan.tsx - Nutrition panel
frontend/src/components/NutritionPanel.tsx - History panel
frontend/src/components/HistoryPanel.tsx - Model information
frontend/src/components/ModelInfoPanel.tsx - Threshold controls
frontend/src/components/ThresholdControls.tsx - Application header
frontend/src/components/Header.tsx - Report and image export
frontend/src/utils/export.ts
Local application service
- API client
frontend/src/api.ts - HTTP API and inference
app/main.py - Scene history
app/db.py
Model and data workflow
- Dataset audit
ml/audit_dataset.py - Banned-image guard
ml/banned_images.py - Open-image pool
ml/download_open_pool.py - Model training
ml/train_yolo26.py - ONNX input sizing
ml/onnx_input.py - Batch inference
ml/batch_infer.py
Shared interfaces
- Fruit and response types
frontend/src/types.ts - Fruit and plan defaults
frontend/src/constants.ts
Other components
- Operator
Connections 15
- Operator → App workflow: uses
README.md - App workflow → API client: requests
frontend/src/App.tsx - API client → HTTP API and inference: calls API
README.md - HTTP API and inference → Scene history: reads and writes
app/main.py - App workflow → Report and image export: calculates portion
frontend/src/App.tsx - App workflow → History panel: loads and saves scenes
frontend/src/App.tsx - App workflow → Model information: loads model details
frontend/src/App.tsx - App workflow → API client: gets prediction
frontend/src/App.tsx - Dataset audit → Banned-image guard: checks images
ml/audit_dataset.py - Model training → Banned-image guard: guards dataset
ml/train_yolo26.py - Dataset audit → Model training: audit then train
README.md - Model training → Batch inference: train then infer
README.md - Open-image pool → Dataset audit: feeds dataset
- ONNX input sizing → Batch inference: sizes model input
ml/batch_infer.py - HTTP API and inference → ONNX input sizing: uses input sizing
app/main.py