Название: Machine Learning Algorithms and Applications
Автор: Группа авторов
Издательство: John Wiley & Sons Limited
Жанр: Программы
isbn: 9781119769248
isbn:
Figure 2.4 Foreground-background segmentation of entire silkworm egg sheet (a) (input) and (b) (output).
2.3.3 Egg Location Predictor
After segmentation of egg pixels from background pixels, the next step is to determine the location of the eggs. Many CNN models have been introduced such as Fast-RCNN [13] and YOLO [14] to predict the location of the object using the Intersect over Union method. There are two main reasons for not considering well-known techniques to locate the eggs. Firstly, in these methods the object/ROI dimensions are over 100 × 100, irregular in size, and the method has been trained for different bounding box dimensions. These techniques become unacceptable to determine the location of the egg, as the eggs have an average size of 28 × 28 pixels to 36 × 36 pixels. Moreover, the shape of the egg remains similar with minor deformation that can be neglected; hence, training for different dimension bounding box will not yield any good result. Secondly, these methods have the limitation of how many similar class objects can be recognized within a single bounding box, which are two objects for YOLO [14]. Since the eggs are small, many eggs will be present within a 100 × 100 grid image that may belong to the same class and hence may not be detected.
The specification of the egg location predictor CNN model is represented in Table 2.2, where the input to the core CNN model has been changed to 32 × 32 pixels, three-channel RGB image. Here, the output is a regression that provides the location of the egg center (x, y) rather than a bounding box (four corner points). The training dataset consists of both the class images, i.e., hatched eggs and unhatched eggs. The positive samples consist of images where an individual egg is visible completely, while the negative samples consist of eggs that are partially visible and have multiple egg entries. Figure 2.5 represents the classifier model that is trained to determine positive and negative samples, and the positive samples are later trained to predict the egg center location in terms of pixel values. Further, during the practical application, the center location of the egg predicted is used to crop a single egg data to be fed into a classifier that determines the class of the selected egg into HC or UHC. Figure 2.6 represents an overall result of locating egg centers using egg location predictor CNN model for one of the test data sheets where all egg centers are marked with a blue dot. A sliding window of (32 × 32) with a stride of (4, 4) was used to achieve the results.
2.3.4 Predicting Egg Class
The sliding window method is used to generate input images, and a single egg may be represented by many image windows each of size 32 × 32. Euclidean distance equation,
(2.5)
(2.6)
Table 2.2 Specifications of egg location CNN model.
Input image | Activation/output | Training samples | Test samples | Validation samples | Test loss | Validation loss |
32 × 32 | Regression Center of the egg (x, y) | 439 × 103 | 51.6 × 103 | 25.8 × 103 | 0.5488 | 0.5450 |
Figure 2.5 CNN training model to predict egg location in terms of pixel values.
Figure 2.6 Result of egg location CNN model.
Table 2.3 Specification of egg class predicator CNN model.
Input image | Activation/output | Training samples | Test samples | Validation samples | Test loss | Accuracy on the test set | Accuracy on the validation set |
32 × 32 | SoftMax 2 class-(0/1) | 2.4 × 106 | СКАЧАТЬ