Logo Lanfrica

PatrickIIT/zanzibar-clove-grading-cv

Domain:

agriculture

Record type:

project
Creator:
Pat
Host:
Developing a Computer Vision system using CNNs to automate the classification of Zanzibar cloves into official grades, addressing industry reliance on subjective manual labor. # Zanzibar Clove Grading — Decomposed Multi-Task Vision Framework Official code, models, dataset, and mobile application for the M.Tech thesis: > **"Decomposed Multi-Task Vision for Auditable Agricultural Grading: > A Study on Rule-Based Clove Classification"** > Patrick Vincent Ndowo — IIT Madras Zanzibar Campus, June 2026 > Supervisor: Dr. Innocent Nyalala --- ## The Problem This Solves Prior computer vision work on clove quality assessment treated grading as a single-step image classification task: feed one clove image into a CNN, get a grade label out. This achieves high accuracy on benchmark test sets but is **structurally incapable** of replicating what the Zanzibar State Trading Corporation (ZSTC) actually does during grading — an ordered, multi-step procedure involving batch examination, counting of *mpeta* (fermented cloves), proportion estimation, and deterministic application of official quantitative thresholds. This repository contains a framework that **closes that gap** by mirroring the ZSTC procedural logic computationally, producing grade decisions that are not only accurate but independently verifiable by a ZSTC officer without any specialised AI knowledge. --- ## Results at a Glance | Mode | Model | Accuracy | Deployment | |---|---|---|---| | Single-Clove (High-Precision) | YOLOv8-seg + Context-Aware ResNet-18 | **99.45%** | Android / Offline | | Batch-Clove (Efficiency) | EfficientNet-Lite0 INT8 TFLite | **84.56%** | Android / Offline | | Single-Clove Backbone (standalone) | Context-Aware ResNet-18 | **99.02%** | — | | Best Monolithic Baseline | ResNet-50 / ResNet-101 / DenseNet-201 / EfficientNet-B2 | **99.71%** | — | | Classical ML Baseline | SVM-RBF (93-dim CIELAB + GLCM features) | **96.23%** | — | > The 22-architecture benchmark is the most comprehensive evaluation of deep > learning models for clove grading published to date. --- ## Key Features - **Dual-path decomposed framework** - *Single-clove mode*: YOLOv8-seg gener …