How ai-lab-makerere/ibean works
Project type and purpose
• This is an open dataset repository (no application code).
• Purpose: collect, version, and serve field-taken leaf images of bean plants in three classes for ML model training and mobile inference.
Main components
a. Source Control & Metadata
– GitHub repo (“ibean”) holding README, LICENSE and pointers to data.
– Metadata store (could be in-repo CSV/JSON or huggingface dataset metadata).
b. Data Storage
– GCP Storage Buckets: train.zip, validation.zip, test.zip.
– Huggingface Dataset host.
c. Data Ingestion & Preprocessing
– ETL/Preprocessing step (e.g., a Jupyter notebook, Apache Beam, or local script).
d. Model Training Environment
– Compute (e.g., local GPU, cloud VM, or managed service).
– Framework (TensorFlow or PyTorch).
– Experiment tracking / model registry (e.g., MLflow, Weights & Biases).
e. Model Evaluation
– Validation & Test datasets.
– Reporting (confusion matrix, accuracy).
f. Model Deployment / Inference
– Model packaging (e.g., TensorFlow Lite or ONNX for mobile).
– Mobile app (Android/iOS) that loads the packaged model.
g. End User
– Farmer in the field using the mobile app.
Relationships and data flows
– “git clone” or metadata pointers trigger download from GCP buckets / Huggingface.
– Raw images ingested, annotated metadata read.
– Preprocessed tensors/images fed into training job.
– Trained model is versioned and stored.
– Selected model exported to mobile-friendly format.
– Packaged model bundled into app or fetched at runtime.
– User snaps a leaf image, inference runs on-device, prediction displayed.
Architectural patterns & principles
• Data-centric design: clear separation between raw data, preprocessing, and model artifacts.
• Versioning: track dataset versions (train/val/test splits) and model versions independently.
• Modularity: each stage (ingest, train, deploy) is a separate component/service.
• Edge inference: deploy a lightweight model on mobile devices for offline use.
Capturing essential details
• Don’t just show “Data” – explicitly name the buckets and splits.
• Hosting of the dataset on Huggingface as a parallel access point.
• That the mobile app operates offline, so the packaged model is embedded or cached.