Grading Methods Definition

After thoroughly producing the dataset of images, it is time to establish additional definitions that will determine the AI model's behavior. An AI model is comprised of two main components: a .onnx file, which contains the weights that will classify the images, and a .json file, which describes the model and its parameters. The process of creating an AI model involves not only defining the classes of defects but also setting up the grading system associated with the model. Follow the steps below to create the definitions for the grading methods:

  1. Name the desired grading method.

  2. Number the classes starting from zero.

  3. Define the relationship between seed amount and the value of defects for each class, creating the columns number of seeds, value, and equivalent defect. For example, considering the SCA methodology, a full black defect is counted as 1 seed per defect, resulting in 1 equivalent defect per seed classified as such. An immature seed is counted as 5 seeds per defect, resulting in 0.2 equivalent defects per seed classified as such.

  4. Establish inverse relationships for certain classes, if applicable. For instance, a single stone occurrence accounts for 5 equivalent defects.

  5. Include sub-classifications related to size, if necessary. In cases where grading systems are divided into size-related sub-classifications, describe these intermediary divisions and the rules for size definition, related to area or screen size. Subdivided classes should have the same class index.

  6. Classes that are not defective should be classified as value o.

  7. Repeat the above process for as many grading systems as desired. Ensure the table includes all classes for each grading method.

Example of COB Methodology

Below is an example of how to structure the COB methodology for incorporation into the AI model. This includes naming the grading method, naming the classes, defining the relationship between seed amount and defect value, and finally its resulting equivalence of defects.

Classificação Oficial Brasileira (COB)

Class
Defect Name
Seeds
Value
Equivalent Defects

0

Black

1

1

1

1

Broken

5

1

0.2

2

Floater

5

1

0.2

3

Fox Bean

1

0

0

4.1

Husk Medium

3

1

0.33

4.2

Husk Large

1

1

1

5

Immature

5

1

0.2

6

Insect Damaged

5

1

0.2

7

Ok

1

0

0

8

Parchment

2

1

0.5

9

Pod

1

1

1

10.1

Stones Small

1

1

1

10.2

Stones Medium

1

2

2

10.3

Stones Large

1

5

5

11

Shell

3

1

0.33

12

Sour

1

2

0.5

Last updated