Precision Agriculture: Automated Grading and Sorting of Carrots Using Computer Vision

In a paper published in the Journal of Food Engineering, researchers proposed a framework for automated inspection systems in the food industry, focusing on the geometric properties of agricultural products using computer vision.

Study: Precision Agriculture: Automated Grading and Sorting of Carrots Using Computer Vision. Image Credit: zentradyi3ell / Shutterstock
Study: Precision Agriculture: Automated Grading and Sorting of Carrots Using Computer Vision. Image Credit: zentradyi3ell / Shutterstock

Background

Carrots are popular root vegetables known for their numerous health benefits. Their global production has been steadily increasing over the years. However, traditional methods of grading and sorting carrots based on size can be imprecise and challenging, especially when dealing with different carrot varieties and shapes.

While the manufacturing industry has successfully implemented automated optical inspection (AOI) using artificial intelligence (AI) for various products, optical inspection in the agricultural industry still requires improvement due to the variations in raw products and difficulties in accurately quantifying each item.

The current work aims to address these challenges by introducing image-processing techniques for grading and sorting carrots. By incorporating both RGB and depth information from a depth sensor, the proposed framework enables precise identification of the geometric properties of carrots. Essential techniques such as object detection, semantic segmentation, and object tracking are employed to overcome the obstacles in real time.

This research’s contributions include creating a new dataset, proposing an artificial intelligence-automated optical inspection (AI-AOI) system to approximate the geometric properties of a carrot, incorporating a depth camera to obtain depth information on the target object, and conducting comprehensive experimentation to evaluate the feasibility and practicality of the framework.

Related work

Several recent studies have explored similar topics. One study focused on volume estimation of carrots using artificial neural networks (ANNs) and manual measurements, while another aimed to classify different types of carrots using convolutional neural networks (CNNs). Another work explored tasks such as classification, grading, and shape approximation of carrots using the ShuffleNet architecture.

Other studies discussed the volume estimation of cherry tomatoes using machine learning and the volume estimation of mango fruits using 3D shape analysis. Estimation of sweet onion volume using an RGB-D sensor and volume estimation of chicken eggs using depth images were also explored. These studies demonstrated promising results but had limitations, such as the need for human intervention, challenges with lighting conditions, and limitations in capturing irregular shapes.

Proposed method

T the current study's objective is to determine each carrot's geometric properties, including length, width, area, and volume. The proposed framework includes several components, such as hardware equipment setup, carrot image acquisition, RGB image processing, depth image processing, and training of neural networks (ANN and CNN) for estimating geometric properties.

Hardware equipment setup: This involves the use of a conveyor system, a depth sensor, and other peripherals to acquire images and data. Both RGB and depth information for each carrot were captured on the conveyor system during the process of carrot image acquisition.

RGB image processing: Various techniques, such as semantic segmentation, object detection, and tracking were applied during the experiment. Semantic segmentation was achieved using the DeepLabv3+ algorithm, while object detection was performed using the YOLOv4-tiny structure. Object tracking utilized the Kalman filter for precise spatial position prediction.

Depth image processing involves null pixel fill-in, carrot separation, and orientation adjustment. While null pixel fill-in replaces missing depth values using neighboring pixels, carrot separation distinguishes individual carrots using semantically segmented masks and bounding boxes. Orientation adjustment aligns carrots vertically using erosion morphological operations and linear curve fitting.

Training neural networks: Geometric property approximation is achieved through neural network-based models. An ANN estimates the width and length, while a CNN estimates the volume. The networks are trained on datasets of samples with ground-truth measurements.

The proposed framework combines hardware setup, image processing techniques, and neural networks to accurately estimate the geometric properties of carrots.

Experiments and results

The experiment utilized a database consisting of 3120 images from 10 videos, with a resolution of 640 x 480. The geometric properties of the carrots were measured before video acquisition. Model training was performed using MATLAB 2022a with specific settings. Pre-trained models like ResNet-18 and CSPDarknet53 were fine-tuned, and a 10-fold cross-validation scheme was employed. Performance metrics included accuracy, Intersection over Union, Dice coefficient, precision, recall, F1-score, RMSE, MAPE, and mean absolute error.

The average error rates in the estimation of geometric properties such as length, width, and volume were 1.85%, 2.51%, and 5.35%, respectively. The model performed well for length and width predictions, with some outliers. The volume prediction had a slightly higher error rate due to data bias. Video analysis showed variations in performance across videos. The correlation between actual and predicted values had a high R-square. The proposed framework demonstrated accurate property prediction in real-world conditions.

Conclusion

The present study introduces a novel technique for estimating the geometric characteristics of agricultural products using a depth camera and deep learning algorithms. The proposed pipeline achieved an average error rate of under 5% when tested on 20 carrots, employing image processing techniques such as DeepLabv3+ and YOLOv4-tiny.

The present study's findings showcase the potential for live surveillance of conveyor systems in the farming industry, thereby making a substantial contribution to the advancement of Industry 4.0 and the ongoing digital transformation process. Future research can explore applying the framework to other products, improving prediction results and computation time with advanced image processing algorithms, and enhancing real-time processing through IoT integration.

Journal reference:
Dr. Sampath Lonka

Written by

Dr. Sampath Lonka

Dr. Sampath Lonka is a scientific writer based in Bangalore, India, with a strong academic background in Mathematics and extensive experience in content writing. He has a Ph.D. in Mathematics from the University of Hyderabad and is deeply passionate about teaching, writing, and research. Sampath enjoys teaching Mathematics, Statistics, and AI to both undergraduate and postgraduate students. What sets him apart is his unique approach to teaching Mathematics through programming, making the subject more engaging and practical for students.

Citations

Please use one of the following formats to cite this article in your essay, paper or report:

  • APA

    Lonka, Sampath. (2023, July 12). Precision Agriculture: Automated Grading and Sorting of Carrots Using Computer Vision. AZoAi. Retrieved on December 22, 2024 from https://www.azoai.com/news/20230712/Precision-Agriculture-Automated-Grading-and-Sorting-of-Carrots-Using-Computer-Vision.aspx.

  • MLA

    Lonka, Sampath. "Precision Agriculture: Automated Grading and Sorting of Carrots Using Computer Vision". AZoAi. 22 December 2024. <https://www.azoai.com/news/20230712/Precision-Agriculture-Automated-Grading-and-Sorting-of-Carrots-Using-Computer-Vision.aspx>.

  • Chicago

    Lonka, Sampath. "Precision Agriculture: Automated Grading and Sorting of Carrots Using Computer Vision". AZoAi. https://www.azoai.com/news/20230712/Precision-Agriculture-Automated-Grading-and-Sorting-of-Carrots-Using-Computer-Vision.aspx. (accessed December 22, 2024).

  • Harvard

    Lonka, Sampath. 2023. Precision Agriculture: Automated Grading and Sorting of Carrots Using Computer Vision. AZoAi, viewed 22 December 2024, https://www.azoai.com/news/20230712/Precision-Agriculture-Automated-Grading-and-Sorting-of-Carrots-Using-Computer-Vision.aspx.

Comments

The opinions expressed here are the views of the writer and do not necessarily reflect the views and opinions of AZoAi.
Post a new comment
Post

While we only use edited and approved content for Azthena answers, it may on occasions provide incorrect responses. Please confirm any data provided with the related suppliers or authors. We do not provide medical advice, if you search for medical information you must always consult a medical professional before acting on any information provided.

Your questions, but not your email details will be shared with OpenAI and retained for 30 days in accordance with their privacy principles.

Please do not ask questions that use sensitive or confidential information.

Read the full Terms & Conditions.

You might also like...
Researchers Supercharge Depth Estimation Models, Achieving 200x Faster Results with New Fix