Raahimamjad.com

Fruit Qual

At school, I always enjoyed exploring the concepts of derivates and integrals and understood the importance of calculus in interpreting how quantities change and accumulate over time. This encouraged me to develop the software, FruitQual, which is a fruit segmentation program for detecting the type of fruit (Apple, Banana, Orange), and, infers its quality based on shelf life, colour/texture and size using computer vision. This program can be used to address labour shortages in farms.

Fruit Segmentation Specs:

  • Trained custom instance segmentation with MaskRCNN to identify fruits
  • Cascaded with EfficientNet-BO custom trained on fruit quality classification
  • DEMO – Fruit Quality Analysis
  • Production quality deployment with Torch-serve, for near real-time analysis.
  • Trying to solve the problem of fruit analysis in batch processing, which otherwise is a manual process requiring a lot of man-power.
  •  

Mathematical models

  • Convolution Neural Network(s): CNNs are used for feature extraction and processing in the early layers of the network.
  • Region Proposal Networks (RPN): The RPN in Mask R-CNN is responsible for proposing potential object bounding box locations within the image. It employs anchor boxes and regression to generate region proposals.
  • Bounding Box Regression: Refining the bounding box coordinates generated by the RPN. This involves predicting adjustments to the coordinates of the proposed bounding boxes to align them more accurately with the objects.
  • Class Classification: The model performs class classification using softmax activation to assign a class label to each detected object.
  • Binary Cross-Entropy Loss: For mask prediction, this model typically uses binary cross-entropy loss. This loss function measures the dissimilarity between predicted masks and ground truth masks.
  • Backpropagation: It involves calculating gradients with respect to the loss function and updating the model’s weights using optimization algorithms like stochastic gradient descent (SGD).

This project is an amalgamation of Instance Segmentation (Identifying and localising the fruits) and Image classification (Good fruit v/s bad fruit). The classification is done using Google’s patented family of convolutional neural networks named EfficientNet (BO).

When I started this project in 2021, I was faced with challenges such as needing human-annotated data and a set of machine-learning algorithms that fit; however, I have been constantly improving it. As a newbie to the field, the introduction to image classification has helped me understand how to train a model from scratch and the significance of exploratory data analysis. Eventually, I would like to take this model to a 3D level incorporating stereoscopic vision and triangulation to get relative distance and depth data, which can be an additional input allowing it to understand the ruggedness and texture of the fruit and, as a result, significantly fewer false positives. 

Please click button below to run the software. The repository is set with documentation on how to run:

X