Local Crop Classifier — Edge CNN Architecture Study
Computer Vision & Edge AICompleted Research Study · 1,200+ Regional Images

Local Crop Classifier — Edge CNN Architecture Study

Computer vision models trained on clean laboratory datasets experience severe performance degradation when exposed to real-world farm and market conditions with harsh shadows, occlusions, and variable lighting.

My Role & Contribution

Solo Developer & Researcher: Curated and labeled 1,200+ regional crop photos (Karela, Parwal, etc.), implemented OpenCV background segmentation, trained six CNN variants in PyTorch, and built a Flask evaluation UI.

Proposed Solution

Captured and normalized 1,200+ vegetable photos under multiple real-world lighting conditions. Benchmarked lightweight depthwise-separable architectures against heavier residual models to pinpoint the optimal Pareto frontier between classification accuracy and edge inference latency.

  • Curated custom dataset of 1,200+ high-resolution photographs under variable outdoor and wholesale market lighting
  • Comparative benchmark across 6 network designs, evaluating accuracy, parameter footprint, and CPU latency
  • OpenCV preprocessing pipeline with HSV color segmentation and adaptive background isolation
  • Lightweight Flask web interface for real-time model validation and latency profiling

Architecture & Dataflow

Step 01

Camera Input

Chaotic wholesale market crop stream

→
Step 02

OpenCV Subtractor

Background leaf & shadow isolation

→
Step 03

HSV Segmenter

Vegetable color segment extraction

→
Step 04

PyTorch ResNet18

Deep transfer weights category inference

→
Step 05

Flask Server

Scored softmax metrics outputs

Engineering Trade-offs & Limitations

Rationale:Traded absolute top-1 laboratory accuracy for robust generalization across variable illumination through aggressive affine data augmentation and color-jitter transforms.

Results & Evaluation

Demonstrated viable edge classification performance on regional produce varieties, establishing reproducible guidelines for low-cost agricultural sorting prototypes.

Project Parameters

Timeline
Academic Computer Vision Study
Team Scope
Solo Developer
Primary Tech
PyTorch, OpenCV, Flask, Python

Technology Tags

PyTorchResNet18MobileNetOpenCVFlaskPython