[Paper Review] Facilitated machine learning for image-based fruit quality assessment
This paper proposes a simplified, GPU-free machine learning approach for image-based fruit quality assessment using pre-trained Vision Transformers (ViTs), specifically DINO ViT, as off-the-shelf feature extractors. It achieves competitive classification accuracy—within 1% of fine-tuned CNNs—using only one-third the training data, enabling low-resource deployment in decentralized postharvest supply chains.
Image-based machine learning models can be used to make the sorting and grading of agricultural products more efficient. In many regions, implementing such systems can be difficult due to the lack of centralization and automation of postharvest supply chains. Stakeholders are often too small to specialize in machine learning, and large training data sets are unavailable. We propose a machine learning procedure for images based on pre-trained Vision Transformers. It is easier to implement than the current standard approach of training Convolutional Neural Networks (CNNs) as we do not (re-)train deep neural networks. We evaluate our approach based on two data sets for apple defect detection and banana ripeness estimation. Our model achieves a competitive classification accuracy equal to or less than one percent below the best-performing CNN. At the same time, it requires three times fewer training samples to achieve a 90% accuracy.
Motivation & Objective
- Address the challenge of deploying machine learning in decentralized, low-resource postharvest supply chains with limited data and computational power.
- Overcome the high data and hardware demands of training Convolutional Neural Networks (CNNs) from scratch or via fine-tuning.
- Demonstrate that pre-trained Vision Transformers can serve as effective, ready-to-use feature extractors for fruit quality tasks without retraining.
- Enable small-scale stakeholders—such as cold chain operators and farmer cooperatives—to adopt AI-based quality assessment using smartphone images.
- Contribute to Green AI by reducing computational demands and increasing inclusivity in agricultural AI applications.
Proposed method
- Utilize self-supervised pre-trained Vision Transformers (DINO ViT-S/8 and DINO ViT-B/8) as fixed feature extractors without any fine-tuning on domain data.
- Extract image embeddings from the final layer of the ViT encoder and reduce dimensionality using Principal Component Analysis (PCA).
- Train a simple, lightweight classifier (e.g., SVM or logistic regression) on the PCA-reduced ViT features for classification tasks.
- Evaluate performance on two real-world datasets: apple defect detection (CASC IFW) and banana ripeness estimation.
- Compare results against state-of-the-art CNNs (ResNet50, VGG-11) that are fine-tuned on the same data, using the same evaluation protocol.
- Visualize feature distributions using PCA to analyze class separability and robustness to noise and background variation.
Experimental results
Research questions
- RQ1Can pre-trained Vision Transformers serve as effective, zero-fine-tuning feature extractors for fruit quality assessment in low-data regimes?
- RQ2How does the performance of off-the-shelf ViT features compare to fine-tuned CNNs in terms of classification accuracy on small, real-world fruit image datasets?
- RQ3To what extent can ViT-based models achieve high accuracy with significantly fewer training samples compared to CNNs?
- RQ4How robust are ViT embeddings to image noise, lighting variation, and background clutter in real-world agricultural imaging?
- RQ5Can the latent space of DINO-learned ViT features enable better linear separability of quality classes than CNN features?
Key findings
- The DINO ViT-based approach achieved classification accuracy within 1% of the best-performing fine-tuned CNNs on both the apple defect detection and banana ripeness estimation datasets.
- The ViT-based model reached 90% accuracy with only one-third the number of training samples required by CNNs, demonstrating superior data efficiency.
- PCA visualization of DINO ViT embeddings revealed a clear distribution shift between healthy and damaged apple classes, indicating robustness to lighting and background noise.
- The first principal component of DINO ViT features showed stronger class separation than those from ResNet50 or VGG-11, suggesting better linearization of relevant visual features in the embedding space.
- The method enables high-performance fruit quality assessment on standard CPUs without GPU access, significantly lowering the barrier to entry for small-scale operators.
- The results indicate that DINO ViT embeddings are highly expressive and suitable for integration with tabular data (e.g., sensor or supply chain metadata) in hybrid modeling pipelines.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.