Convolutional Neural Network Model for Variety Classification and Seed Quality Assessment of Winter Rapeseed

The main objective of this study is to develop an automatic classification model for winter rapeseed varieties, to assess seed maturity and damage based on seed colour using a convolutional neural network (CNN). A CNN with a fixed architecture was built, consisting of an alternating arrangement of five classes Conv2D, MaxPooling2D and Dropout, for which a computational algorithm was developed in the Python 3.9 programming language, creating six models depending on the type of input data. Seeds of three winter rapeseed varieties were used for the research. Each imaged sample was 20.000 g. For each variety, 125 weight groups of 20 samples were prepared, with the weight of damaged or immature seeds increasing by 0.161 g. Each of the 20 samples in each weight group was marked by a different seed distribution. The accuracy of the models’ validation ranged from 80.20 to 85.60%, with an average of 82.50%. Higher accuracy was obtained when classifying mature seed varieties (average of 84.24%) than when classifying the degree of maturity (average of 80.76%). It can be stated that classifying such fine seeds as rapeseed seeds is a complex process, creating major problems and constraints, as there is a distinct distribution of seeds belonging to the same weight groups, which causes the CNN model to treat them as different.


Introduction
Rapeseed (Brassica napus L.) is the second largest source of vegetable oil in the world, after soya, and the first on the European continent [1][2][3][4][5][6]. According to a report by the United States Department of Agriculture Foreign Agricultural Service [7] global rapeseed seeds production for the 2021/2022 season amounted to 73.86 million tones. Eurostat [8] and the International Grains Council report, that European Union countries produced over twenty million tons of seeds. This means that EU rapeseed production, although 9% lower than the record in 2020/2021, is more than 5% higher compared to the average of the last five years [8].
The value of rapeseed seeds, which are a raw material in the oil industry, is strictly dependent on both the harvesting technology (maturity, amount of damage) and the conditions and method of postharvest handling, especially drying, cleaning, transport, and storage. Therefore, from the technological value point of view, an immensely important problem in rapeseed production is the reduction of seed quality losses. Mechanical damages also cause the initiation of unfavorable chemical and biological transformations in the seeds, which result, inter alia, from their morpho-anatomical structure and chemical composition [2,3,[9][10][11].
Sensors 2023, 23, 2486 3 of 16 method was also used by Zhang et al. [56] to determine the soluble protein content, the sugar content Zhang et al. [57], and Bao et al. [58], in turn, to detect glutamic acid in rapeseed leaves. Olivos-Trujillo et al. [59] used a near-infrared spectroscopy method (NIR) and image analysis to determine fat content and other qualitative parameters of rapeseed seeds. In this study, the authors presented three predictive models, of which the ANN-based (Artificial Neural Networks) model had the highest accuracy. Zhang et al. [60] used hyperspectral imaging and leaves images, in turn, to estimate quickly rapeseed seeds yield. Image analysis is also a good method to assess plants' nutrition level, estimate the number of micro-and macronutrients, and a great tool to support the decision-making process of mineral fertilization in precision agriculture conditions [61]. The development of artificial intelligence and the use of CNNs in agricultural practice allows rapid and highly accurate identification of objects and non-destructive diagnostics of real-world models, including plant materials. CNN models are essential in the application of 'Agriculture 4.0' technology and digital data analysis. With this in mind, the authors have set themselves the main objective of developing an automatic classification model for winter rapeseed varieties, using a CNN, based on a seed maturity evaluation and seed damage expressed threw a seed coat colour. In this study, an attempt was made to develop a CNN structure, an algorithm describing this structure in order to facilitate the identification of oilseed rape seeds and their degree of damage. In agricultural practice, the ability to quickly assess the degree of seed damage is important in terms of storage and suitability for the processing industry.

Data Set Preparation
Seeds of three winter rapeseed varieties were used for this study, i.e., Atora F1, Californium, and Graf F1, which were obtained from Dłoń (51 • 41 23 N, 17 • 04 10 E) the experimental station of the Poznań University of Life Science. The experimental plots were characterized by soil quality class III, heavy soil type, and good rye complex of agricultural suitability. Mean annual temperature 9.93 • C, sum of precipitation in the whole year 553.67 mm. Seeds were cleared on the sieves and at this time all foreign bodies such as dust, soil residues, stones, and siliques were removed from the samples. Then, the seeds were stored in paper bags at room temperature (20-25 • C). Each imaged sample had a weight of 20.000 g, which allowed it to cover tightly the bottom of the plate, and for each variety 125 weight groups were prepared, with the weight of damaged or immature seeds increasing by 0.161 g in each group. The partitioning thresholds were determined by the laboratory scale range and its minimal weighed amount, which was 160 mg. There were, in turn, 20 samples of the same weight in each group (i.e., 20.000 g), but with differently spread rapeseed seeds. Imaged samples were labelled with a code containing the variety symbol and a sequence number, i.e., atora.0-atora.2499, californium.0-californium.2499, and graf.0-graf.2499. A detailed list of sample codes and seed weights are shown in Table 1. Rapeseed seed images were taken with a digital camera, which had a 4288 × 3216 (14 million) pixel sensor and a 1/2.3 inch class sensor. The camera was equipped with a 36× optical zoom lens and its shortest focal length was 24 mm, corresponding to the largest aperture of 1:2.9. Seed imaging was performed at maximum zoom and the imaging surface was at a distance of 40 cm from the lens. Imaging was performed in a chamber illuminated by three light sources, at 800 lumens, with a black and non-reflective surface. The image files were stored in the camera's internal memory, and saved in 96 dpi resolution (2139 × 1888) size in the computer's memory ( Figure 1).

Defining Seeds Classification Criteria
In optical object recognition and classification, it is very important to select appropriate features of the analyzed image, which should describe them unambiguously. The analyzed images of rapeseed seeds contain small-size, low-contrast objects, which was a determinant in the selection of their resolution. In the classification and recognition

Defining Seeds Classification Criteria
In optical object recognition and classification, it is very important to select appropriate features of the analyzed image, which should describe them unambiguously. The analyzed images of rapeseed seeds contain small-size, low-contrast objects, which was a determinant in the selection of their resolution. In the classification and recognition of seeds images of the Atora F1, Californium, and Graf F1 varieties, the basic criterion was the colour of the mature seeds or the colour of the seeds at the same weight as the immature seeds, i.e., the different weight groups were compared in pairs. When assessing the degree of seed maturity in individual rapeseed varieties, it was assumed that mature seeds suitable for long-term storage had no more than 1% of immature or damaged seeds. Therefore, in the samples analyzed, the first and second weight groups are considered mature, i.e., samples atora.0-atora.39, californium.0-californium.39, and graf.0-graf.39. These weight groups were treated as one set of the given variety, which was compared with the others considered non-compliant.

Experimental Set Up
In this study, the algorithms were developed in the Python 3.9 programming language using scientific computing libraries (environments) TensorFlow 2.0, Keras, Scipy, and Numpy. The TensorFlow 2.0 library is a scalable and cross-platform programming interface for running machine learning algorithms. Keras is a specialized API (Application Programming Interface) interface intended for creating neural networks, originally designed as a support class for the TensorFlow 2.0 library. SciPy, on the other hand, is an open-source Python library that is used to solve scientific and mathematical problems. It is built on the NumPy extension and allows the user to manipulate and visualize data using a wide range of high-level commands.

Loading and Pre-Processing a Data Set
Conceptually, an image in its simplest single-channel form (e.g., binary, monochrome, greyscale, or black and white) is a two-dimensional function f(x, y), mapping a coordinate pair to a real number that is related to the intensity (colour) of a given point. An image can have multiple channels, such as an RGB, where the colour is represented by using three channels red, green, and blue. For an RGB colour image, each pixel in the (x, y) coordinates can be represented by three tuples (Ir x , y , Ig x , y , Ib x , y ). To be processed, the image f(x, y) must be digitized in spatial and amplitude terms. Spatial coordinates (x, y) digitization is called image sampling, and amplitude digitization is called grey-level quantization. The pixel value corresponding to the channel is usually represented as an integer value in the range 0-255 or a floating-point value in the range 0-1. The image is stored as a file, and there can be many different types of files. Each file usually has some data, which can be extracted as 2D multidimensional arrays for binary or greyscale images and 3D arrays for RGB colour images.
When working with rapeseed seeds images, they are loaded into NumPy arrays using the "uint8" data type (i.e., unsigned, 8-bit fixed-point numbers), which take values in the range [0, 255], which is quite sufficient for storing pixel information in RGB images. Two TensorFlow 2.0. modules will be used to prepare the data set. The first is tf.io used for loading and storing data and the second is tf.image for decoding raw content and resizing images.
Firstly, the contents of the files were checked and a list of image names of the rapeseed seeds samples was generated using the pathlib library. Then, they were visualized and sized according to code 1 added in https://github.com/piotrrybacki/seed-quality-CNN; (accessed on 19 December 2022) ( Figure 2).
The list of files displayed shows, that the set of data contains 7500 images of winter rapeseed seeds, 2500 for each variety, and occupies approximately 9.5 GB. The images of the imaged rapeseed seeds were arranged in two ways depending on the type of analysis being conducted. For the recognition of rapeseed seeds variety, the images were divided into three subsets, i.e., a learning set containing 4500 samples (1500 samples from each variety), and validation and test sets containing 1500 samples (500 samples of each variety). For the seeds' maturity assessment, each variety was in turn divided into learning sets containing 1500 samples, and validation and test sets containing 500 samples each. Depending on the type of conducted analysis, models based on the proposed CNN architecture were labelled according to the data in Table 2. Listing 2 shows code 2 (https://github.com/piotrrybacki/seed-quality-CNN; (accessed on 19 December 2022)) for automatically copying images from the source directory to the learning, validation, and testing directories.

Multilayer Architecture of CNN Network
The network was implemented using the Keras interface. Due to the extensive analysis of the imaged seed, the overall structure of the CNN is an alternating arrangement of five classes Conv2D (with activation function ReLu), MaxPooling2D, and Dropout. By default, the Conv2D class assumes, that the input data are compatible with the NWHC format, where N stands for the number of images in the batch group, W and H designate the width and height of the image, respectively, and C is the number of channels. As shown in Figure 3, each convolutional layer was followed by a pooling layer for subsampling, reducing the size of the feature map. MaxPoo12D class creates maximizing pooling layers. The argument pool size = 2 specifies the size of the window used to calculate the maximum value, and the strides = 1 parameter was used to configure the pooling layer. The use of the Dropout class in the analysis will allow the construction of a dropout layer for regularization, where the argument rate determines the probability of input units being dropped during network learning. When calling this layer, it is possible to regulate its operation by using a training argument, which determines if the call is to occur during learning or inference.  Listing 2 shows code 2 (https://github.com/piotrrybacki/seed-quality-CNN; (accessed on 19 December 2022)) for automatically copying images from the source directory to the learning, validation, and testing directories.

Multilayer Architecture of CNN Network
The network was implemented using the Keras interface. Due to the extensive analysis of the imaged seed, the overall structure of the CNN is an alternating arrangement of five classes Conv2D (with activation function ReLu), MaxPooling2D, and Dropout. By default, the Conv2D class assumes, that the input data are compatible with the NWHC format, where N stands for the number of images in the batch group, W and H designate the width and height of the image, respectively, and C is the number of channels. As shown in Figure 3, each convolutional layer was followed by a pooling layer for subsampling, reducing the size of the feature map. MaxPoo12D class creates maximizing pooling layers. The argument pool size = 2 specifies the size of the window used to calculate the maximum value, and the strides = 1 parameter was used to configure the pooling layer. The use of the Dropout class in the analysis will allow the construction of a dropout layer for regularization, where the argument rate determines the probability of input units being dropped during network learning. When calling this layer, it is possible to regulate its operation by using a training argument, which determines if the call is to occur during learning or inference.  The input sensor was arbitrarily transformed to 200 × 200 object maps to finally produce 7 × 7 object maps just before the flattening layer. The depth of object maps gradually increases in the network from 32 to 128, while the size of object maps decreases (from 200 × 200 to 7 × 7). As the model under development uses a binary classification, the network ends with Dense layers. One with a dimension of 512 and a ReLu activation function, and the second with a dimension of 1 and a Sigmoid activation function. Listing 3 attached in https://github.com/piotrrybacki/seed-quality-CNN; (accessed on 19 December 2022) shows the programming code for the model in Figure 3.
The example algorithm automatically, considering the name of the file (sample image) sorted and copied them to the appropriate directory, from which they were then downloaded by the CNN model, depending on the type of comparison executed.
The next stage of the model under development is to plot the loss curves and the analysis and prediction accuracy values according to code 4 attached in: https://github.com/piotrrybacki/seed-quality-CNN; (accessed on 19 December 2022).
The final stage of the analysis is to display the results of the predictions in the form of probabilities of belonging to each class (of variety or maturity) and transform them into the predicted classes using the function tf.argmax, which will search for the image with the highest probability of belonging and assign a corresponding label that is the name of the variety or maturity. This was done for the group of 10 examples in each model and both input data and predicted labels were visualized according to code 5 attached in https://github.com/piotrrybacki/seed-quality-CNN; (accessed on 19 December 2022).

Results of the Analysis
The result of the conducted analyses is a proposal for a CNN architecture and a code in Python 3.9 that enables the automatic comparison and recognition of fully mature rapeseed seed varieties and the assessment of their immaturity or damage degree. Table  3 summarizes the changes in map size depending on the layer number of the developed CNN model. As can be seen from the data, each hidden layer of the CNN network model causes maps to decrease, yielding 6 795 457 parameters in the output.  The input sensor was arbitrarily transformed to 200 × 200 object maps to finally produce 7 × 7 object maps just before the flattening layer. The depth of object maps gradually increases in the network from 32 to 128, while the size of object maps decreases (from 200 × 200 to 7 × 7). As the model under development uses a binary classification, the network ends with Dense layers. One with a dimension of 512 and a ReLu activation function, and the second with a dimension of 1 and a Sigmoid activation function. Listing 3 attached in https://github.com/piotrrybacki/seed-quality-CNN; (accessed on 19 December 2022) shows the programming code for the model in Figure 3.
The example algorithm automatically, considering the name of the file (sample image) sorted and copied them to the appropriate directory, from which they were then downloaded by the CNN model, depending on the type of comparison executed.
The next stage of the model under development is to plot the loss curves and the analysis and prediction accuracy values according to code 4 attached in: https://github. com/piotrrybacki/seed-quality-CNN; (accessed on 19 December 2022).
The final stage of the analysis is to display the results of the predictions in the form of probabilities of belonging to each class (of variety or maturity) and transform them into the predicted classes using the function tf.argmax, which will search for the image with the highest probability of belonging and assign a corresponding label that is the name of the variety or maturity. This was done for the group of 10 examples in each model and both input data and predicted labels were visualized according to code 5 attached in https://github.com/piotrrybacki/seed-quality-CNN; (accessed on 19 December 2022).

Results of the Analysis
The result of the conducted analyses is a proposal for a CNN architecture and a code in Python 3.9 that enables the automatic comparison and recognition of fully mature rapeseed seed varieties and the assessment of their immaturity or damage degree. Table 3 summarizes the changes in map size depending on the layer number of the developed CNN model. As can be seen from the data, each hidden layer of the CNN network model causes maps to decrease, yielding 6,795,457 parameters in the output.  The code developed for the proposed CNN architecture allowed images to be automatically sorted into training, validation, and test directories. Then, based on a random sequence, the algorithm performed unsupervised training of the individual models and their validation, the results of which are shown in Figure 4. The code developed for the proposed CNN architecture allowed images to be automatically sorted into training, validation, and test directories. Then, based on a random sequence, the algorithm performed unsupervised training of the individual models and their validation, the results of which are shown in Figure 4.    The main objective of the analyses was to develop as accurate a model as possible to classify oilseed rape seeds. Therefore, the primary measure was the accuracy of the validation. As can be seen in Figure 5, this accuracy initially increased up to 30 epochs, then stabilised to 40 epochs, after which it decreased. This may be due to overtraining of the model. Therefore, 30 epochs were used as the optimal value, which is the solution to the problem. The main objective of the analyses was to develop as accurate a model as possible to classify oilseed rape seeds. Therefore, the primary measure was the accuracy of the validation. As can be seen in Figure 5, this accuracy initially increased up to 30 epochs, then stabilised to 40 epochs, after which it decreased. This may be due to overtraining of the model. Therefore, 30 epochs were used as the optimal value, which is the solution to the problem.
As presented in Table 4, the accuracy of model validation ranged from 80.20% to 85.60%, with an average of 82.50%. Higher accuracy was obtained when classifying mature seed varieties (average of 84.24%) than when classifying the degree of maturity (average of 80.76%). The highest accuracy (85.60%) was obtained for the RAPESEEDS_CG model classifying mature seeds of the Californium and Graf F1 varieties, and the lowest accuracy (83.24%) for the RAPESEEDS_AC classifying mature seeds of the Atora F1 and Californium varieties. On the other hand, when assessing seeds maturity the highest accuracy (81.17%) was obtained for the RAPESEEDS_GQ model classifying Graf F1 variety, and the lowest (80.20%) for the RAPESEEDS_AQ model classifying the maturity of the Atora F1 variety.  The main objective of the analyses was to develop as accurate a model as possible to classify oilseed rape seeds. Therefore, the primary measure was the accuracy of the validation. As can be seen in Figure 5, this accuracy initially increased up to 30 epochs, then stabilised to 40 epochs, after which it decreased. This may be due to overtraining of the model. Therefore, 30 epochs were used as the optimal value, which is the solution to the problem. As presented in Table 4, the accuracy of model validation ranged from 80.20% to 85.60%, with an average of 82.50%. Higher accuracy was obtained when classifying mature seed varieties (average of 84.24%) than when classifying the degree of maturity (average of 80.76%). The highest accuracy (85.60%) was obtained for the RAPESEEDS_CG model classifying mature seeds of the Californium and Graf F1 varieties, and the lowest accuracy (83.24%) for the RAPESEEDS_AC classifying mature seeds of the Atora F1 and Californium varieties. On the other hand, when assessing seeds maturity the highest accuracy (81.17%) was obtained for the RAPESEEDS_GQ model classifying Graf F1 variety, and the lowest (80.20%) for the RAPESEEDS_AQ model classifying the maturity of the Atora F1 variety. The final result of the conducted analysis was to display, according to code 5, the result of the predictions in the form of probabilities of belonging to each class. The developed algorithm searched for the image with the highest probability of belonging and assigned the corresponding label, which is the name of the variety in the models: RAPESEEDS_AC, RAPESEEDS_CG, RAPESEEDS_GA, and for maturity in models RAPESEEDS_AQ, RAPESEEDS_CQ, RAPESEEDS_GQ a conventional label was "True" meaning mature seeds, or "False" for immature seeds. This was done for the group of 10 examples, in each model, and both input data and predicted labels were visualized ( Figure  6). For four models (RAPESEEDS_GA, RAPESEEDS_AQ, RAPESEEDS_CQ, RAPESEEDS_GQ) out of 10 samples three were misidentified, one model  The final result of the conducted analysis was to display, according to code 5, the result of the predictions in the form of probabilities of belonging to each class. The developed algorithm searched for the image with the highest probability of belonging and assigned the corresponding label, which is the name of the variety in the models: RAPESEEDS_AC, RAPESEEDS_CG, RAPESEEDS_GA, and for maturity in models RAPESEEDS_AQ, RAPE-SEEDS_CQ, RAPESEEDS_GQ a conventional label was "True" meaning mature seeds, or "False" for immature seeds. This was done for the group of 10 examples, in each model, and both input data and predicted labels were visualized ( Figure 6). For four models (RAPE-SEEDS_GA, RAPESEEDS_AQ, RAPESEEDS_CQ, RAPESEEDS_GQ) out of 10 samples three were misidentified, one model (RAPESEEDS_CG) misidentified one imaged sample and one model (RAPESEEDS_AC) misidentified two samples.

Discussion
The identification and classification of rapeseed and cereal seeds have become an important part of their storage and further processing, where information on their type and quality is required. Seed classification of rapeseed varieties Bristol, Californium, Dexter, Finesse, Licord, Orkan, and Valeska was conducted by Kurtulmus and Ünal [62] using algorithms programmed in Python 2.7 language and the Scipy, Numpy, and Scikitimage environments. Using various prediction methods, they achieved an overall classification accuracy rate of 99.24%, claiming that it was even possible to achieve 100.00% model accuracy. However, such an accuracy rate is not recommended in machine learning and computer image analysis, due to the danger of overtraining the model. Research on the classification of rapeseed seeds has also been conducted by Zou et al. [63], using the potential of the visible, near-infrared spectra and Back Propagation in Neural Network BPNN, proposing a model with 100.00% accuracy. Sun et al. [64] in turn used CNN to recognize rapeseed plants in the field. They applied the method of increasing hidden convolutional layers and its impact on model accuracy. The authors showed, that increasing hidden layers does not significantly improve the accuracy of the model, obtaining the highest average recognition accuracy of 93.54%, and the minimum value of

Discussion
The identification and classification of rapeseed and cereal seeds have become an important part of their storage and further processing, where information on their type and quality is required. Seed classification of rapeseed varieties Bristol, Californium, Dexter, Finesse, Licord, Orkan, and Valeska was conducted by Kurtulmus and Ünal [62] using algorithms programmed in Python 2.7 language and the Scipy, Numpy, and Scikit-image environments. Using various prediction methods, they achieved an overall classification accuracy rate of 99.24%, claiming that it was even possible to achieve 100.00% model accuracy. However, such an accuracy rate is not recommended in machine learning and computer image analysis, due to the danger of overtraining the model. Research on the classification of rapeseed seeds has also been conducted by Zou et al. [63], using the potential of the visible, near-infrared spectra and Back Propagation in Neural Network BPNN, proposing a model with 100.00% accuracy. Sun et al. [64] in turn used CNN to recognize rapeseed plants in the field. They applied the method of increasing hidden convolutional layers and its impact on model accuracy. The authors showed, that increasing hidden layers does not significantly improve the accuracy of the model, obtaining the highest average recognition accuracy of 93.54%, and the minimum value of the loss function of 0.206 with three convolutional layers. Jung et al. [65], on the other hand, applied three CNN architectures to recognize rapeseed in early growth stages with 10 • , rotating plant images, achieving validation accuracy ranging from 13.04 to 88.89%, with an average of 58.34%. Comparing those results to the model proposed in this study, which has an average validation accuracy of 82.50%, it can be concluded, that it meets expectations in terms of the accuracy of rapeseed seeds recognition. According to the research of Ni et al. [66] on the classification of corn seeds and Lin et al. [67] on the classification of rice seeds, it is possible to obtain higher accuracy (over 90%) with larger research objects, as it is easier to analyze their texture.
Zhang et al. [68] proposed a CNN-based algorithm for citrus fruit detection, quality classification and automatic identification of the five most common diseases. The authors tested several state of the network architectures for their performance on a set of 1524 images taken under field conditions from different orchards at different time intervals, scales, angles, and lighting conditions. They obtained fruit identification precision and accuracy of 87.2% and 89.0%. Bernardes et al. [69] used CNN methods to discriminate between Fusarium head blight (FHB)-infected seeds of wheat cultivar TBIO Toruk. The models achieved 99% accuracy in detecting FHB in seeds. These results suggest the potential of imaging technology and deep learning models for accurate seed classification.
Howard et al. [70], on the other hand, used a CNN-based model architecture, called MobileNets, for object detection, geolocalisation, fine structure classification and face recognition, while Hamid et al. [71] in their study used the MobileNetV2 spline neural network, to classify 14 different seed classes, and its accuracy was 98% and 95% in the training and test sets, respectively. The MobileNetV2 model of Albarrak et al. [72] also used a dataset containing eight different classes of date fruit in their study, achieving 99% accuracy. The proposed model was also compared with other existing models such as AlexNet, VGG16, InceptionV3, ResNet, and MobileNets.

Conclusions
This study proposes an automatic classification model for winter rapeseed seeds of three varieties and the assessment of their maturity degree based on colour contrast using CNN. A CNN with a fixed architecture was built, consisting of an alternating arrangement of five classes Conv2D, MaxPooling2D, and Dropout, for which in the Python 3.9 programming language. Using scientific computational environments TensorFlow 2.0, Keras, Scipy, and Numpy, a computational algorithm was developed, creating six models depending on the type of input data. The algorithm proposed in this study described with a code, allows the number of classes to be changed smoothly and the number of images copied to the training, validation and test directories to be changed and randomly, making data analysis much easier.
The validation accuracy of models presented in this study ranged from 80.20% to 85.60%, with an average of 82.50%. Higher accuracy was obtained when classifying mature seed varieties (average of 84.24%) than when classifying the degree of their maturity (average of 80.76%) within a single variety. This is due to the fact, that immature or damaged seeds of the varieties tested did not differ significantly in colour. After the damage to the seed coat, the seeds were a similar yellow colour. These results can be seen in Figure 6, where for four models, out of 10 samples three were misidentified, one model misidentified one imaged sample and one misidentified two samples. It should be added that when it comes to varieties classification, all samples were from the same weight groups.
As a conclusion, it can be stated that classifying such fine seeds as rapeseed seeds is a complex process, creating major problems and constraints, as there is a distinct distribution of seeds belonging to the same weight groups, which causes the CNN model to treat them as different. With this in mind, it is advisable to continue research and analysis on a vision-based seed classification model. The proposed model will be extended to classify seeds based on their texture. Analysis based on two criteria will significantly increase the accuracy of the model.