How nnaajjeebb12/cocohusk works
HuskTech is an offline-first Flutter app for classifying coconut-husk maturity from photos. Users analyze gallery or batch images, or use Android’s live camera; predictions pass through an on-device TFLite classifier and rejection checks, then are saved for history review. Model management supports bundled, custom, and optional cloud-updated models. The graph also includes documented logging and guidance capabilities. Dart implementation details were not sampled, so some links among those modules are shown as unverified rather than asserted as inspected calls.
Main entry points: main.dart App shell · model_manager.dart Model manager · inference_engine.dart TFLite inference · live_camera_page.dart Live camera
Components 19
User interaction
- App shell
lib/main.dart - Photo input
lib/main.dart - Live camera
lib/live_camera_page.dart - Model guide
lib/main.dart - Stage help
lib/main.dart
Prediction
- TFLite inference
lib/inference_engine.dart - Rejection checks
lib/inference_engine.dart - Class labels
assets/model/class_names.txt - Rejection config
assets/model/rejection_config.json
Model lifecycle
- Bundled model
assets/model/coconut_husk_quality_model.tflite - Model manager
lib/model_manager.dart - Custom model file
- Cloud model service
- Model cache
lib/model_manager.dart
History and logs
- History store
lib/history_store.dart - History trends
lib/history_trends_view.dart - Logging
lib/app_logger.dart - Log viewer
lib/log_page.dart
Other components
- App user
Connections 22
- App user → App shell: uses
README.md - App shell → Photo input: offers
README.md - Photo input → TFLite inference: analyzes photos
- App shell → Live camera: opens
README.md - Live camera → TFLite inference: runs inference
README.md - Live camera → App shell: hands off capture
README.md - App shell → TFLite inference: requests predictions
- TFLite inference → Rejection checks: passes outputs
README.md - Rejection checks → Rejection config: reads stats
README.md - TFLite inference → Class labels: uses labels
- Model manager → Bundled model: resolves fallback
README.md - Model manager → Custom model file: loads selection
README.md - Model manager → Cloud model service: fetches updates
README.md - Model manager → Model cache: caches download
README.md - App shell → Model manager: manages models
README.md - Model manager → TFLite inference: provides model
- App shell → History store: saves predictions
README.md - History store → History trends: supplies history
- App shell → Logging: records logs
- Log viewer → Logging: displays logs
README.md - App user → Model guide: reads guide
README.md - App user → Stage help: views explanations
README.md