← CSC 416 Machine Learning and Data Science
Deep Learning and Crop Disease Computer Vision
Notes
Computer Vision in Applied Machine Learning
Computer vision extracts high-level semantic representations from digital images and unstructured video arrays. Traditional pipelines relied on handcrafted feature descriptors such as Scale-Invariant Feature Transform and Histogram of Oriented Gradients paired with support vector machines. Modern solutions employ end-to-end deep learning, where hierarchical representations are learned automatically directly from raw pixel intensity tensors.
Architecture of Convolutional Neural Networks
Convolutional Neural Networks (CNNs) process grid-like topology by utilizing parameter sharing and spatial translation invariance. Convolutional layers apply learnable filter kernels across spatial dimensions, producing activation feature maps that capture local patterns such as edges and textures in early layers, and complex organ structures in deeper layers. Pooling layers reduce spatial resolution to constrain parameter counts and provide translational invariance. Fully connected layers then map extracted latent features to output softmax probability distributions.
Addressing Overfitting and Data Scarcity
Training deep networks from scratch requires vast collections of labeled images. In specialized domains, practitioners employ transfer learning, leveraging pre-trained backbones such as ResNet or MobileNet trained on ImageNet. The base layers remain frozen as general feature extractors, while task-specific classification heads are fine-tuned. Data augmentation strategies such as random rotations, flips, scaling, and color jittering artificially expand training diversity and prevent memorization.
Practical example
A research team at a Kenyan agricultural university develops an offline Android application to diagnose tomato late blight and leaf curl virus for smallholder farmers in Kirinyaga County.
Field conditions introduce severe image variance, including erratic sunlight, varying camera sensor qualities from affordable smartphones, and background noise such as red volcanic soil and farm tools. The researchers collect a localized dataset of four thousand leaf images labeled across three classes: healthy, late blight, and tomato leaf curl virus.
To allow inference on resource-constrained mobile devices without constant internet connectivity, the team selects MobileNetV2 as the feature extractor due to its lightweight depthwise separable convolutions. They apply extensive geometric augmentation to simulate varied smartphone orientations and ambient shadows.
Using categorical cross-entropy loss and the Adam optimizer, the classifier achieves a ninety-four percent macro-averaged F1-score. The model is converted into a quantized TensorFlow Lite flatbuffer format under fifteen megabytes. A farmer in Mwea snaps a photo of an afflicted tomato leaf, and the model instantly flags late blight with ninety-six percent confidence, suggesting an immediate copper-based fungicide spray schedule.
Quiz
1. What is the primary computational benefit of using depthwise separable convolutions in MobileNet architectures?
2. Why is transfer learning particularly advantageous for agricultural diagnosis tasks in developing regions?
3. What property of convolutional layers allows them to detect visual patterns regardless of their position in the image frame?
Sign in to submit and securely grade your quiz.