Quantitative Analysis Methodology using Computer Vision#
At Ceresia Vision, we have developed an objective fruit quality analysis system based on Computer Vision and Deep Learning technologies. Our process transforms a digital image into measurable and actionable data through a semantic segmentation model.
The process is based on two key phases:
Model Training: An extensive dataset of fruit images is used, previously annotated at the pixel level by experts. Each pixel is classified into categories of interest (e.g., healthy fruit, rotten fruit, leaf, branch, soil, etc.). This dataset is used to train a Convolutional Neural Network (CNN), which learns to identify and differentiate these categories autonomously.
Inference: During operation at the client’s facility, the trained model receives a new image and performs inference. In milliseconds, it generates a “segmentation mask,” where each pixel of the original image is classified into one of the learned categories. This mask is the basis for calculating our objective indexes.
From this segmentation, we have defined two main metrics:
Ceresia Sanitary Index (CSI)#
The Ceresia Sanitary Index (CSI) is a quantitative metric, on a normalized scale, that represents the aggregate phytosanitary state of a fruit batch. Its goal is to provide a single numerical value that summarizes the overall health of the raw material.
The calculation is derived directly from the segmentation mask generated by the AI model. It is computed as the proportion of pixels classified as “healthy fruit” versus the total pixels that make up the fruit in the image. Pixels corresponding to defects (rot, mechanical damage, diseases, over-ripeness, or extreme unripeness) penalize the index.
The conceptual formula is as follows:
$$ CSI = \left( 1 - \frac{\sum P_{\text{defects}}}{\sum P_{\text{fruit total}}} \right) \times 100 $$Where:
- \(P_{\text{defects}}\) are the fruit pixels classified with any type of defect.
- \(P_{\text{fruit total}}\) is the total set of pixels classified as fruit.
A CSI value close to 100 indicates a batch of maximum health, while a lower value signals a significant presence of defects.
Ceresia Harvest Quality Index (CHQI)#
The Ceresia Harvest Quality Index (CHQI) is a metric designed to evaluate the efficiency and care of the harvesting process. It quantifies the presence of foreign materials or Unwanted Material (UM) in the batch, such as leaves, branches, stems, or soil. A low CHQI can be indicative of an overly aggressive or deficient harvest.
This index is calculated by relating the number of pixels corresponding to the fruit with the pixels classified as foreign materials.
The conceptual formula is:
$$ CHQI = \left( 1 - \frac{\sum P_{\text{foreign materials}}}{\sum P_{\text{fruit total}} + \sum P_{\text{foreign materials}}} \right) \times 100 $$Where:
- \(P_{\text{foreign materials}}\) are the pixels classified as leaves, branches, etc.
- The denominator represents the sum of all relevant harvested material.
A CHQI value close to 100 implies a clean, high-quality harvest. Monitoring this index allows our clients to evaluate the practices of their growers and optimize the quality of the raw material entering their facilities.