sensors Article Analysis of the Nosema Cells Identification for Microscopic Images Soumaya Dghim 1, Carlos M. Travieso-González 1,* and Radim Burget 2 Citation: Dghim, S.; Travieso-González, C.M.; Burget, R. Analysis of the Nosema Cells Identification for Microscopic Images. Sensors 2021,21, 3068. https://doi.org/ 10.3390/s21093068 Academic Editor: Ayman El-baz Received: 16 March 2021 Accepted: 26 April 2021 Published: 28 April 2021 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). 1Signals and Communications Department (DSC), Institute for Technological Development and Innovation in Communications (IDeTIC), University of Las Palmas de Gran Canaria (ULPGC), Las Palmas de Gran Canaria, 35001 Canary Islands, Spain; [email protected] 2Department of Telecommunications, Faculty of Electrical Engineering and Communication, Brno University of Technology (BUT), 61600 Brno, Czech Republic;
[email protected] *Correspondence: [email protected] Abstract: The use of image processing tools, machine learning, and deep learning approaches has become very useful and robust in recent years. This paper introduces the detection of the Nosema disease, which is considered to be one of the most economically significant diseases today. This work shows a solution for recognizing and identifying Nosema cells between the other existing objects in the microscopic image. Two main strategies are examined. The first strategy uses image processing tools to extract the most valuable information and features from the dataset of microscopic images. Then, machine learning methods are applied, such as a neural network (ANN) and support vector machine (SVM) for detecting and classifying the Nosema disease cells. The second strategy explores deep learning and transfers learning. Several approaches were examined, including a convolutional neural network (CNN) classifier and several methods of transfer learning (AlexNet, VGG-16 and VGG-19), which were fine-tuned and applied to the object sub-images in order to identify the Nosema images from the other object images. The best accuracy was reached by the VGG-16 pre-trained neural network with 96.25%. Keywords: image processing; Nosema disease; machine learning; deep learning; image; disease detection 1. Introduction Several deadly diseases endanger honeybees. Possibly one of the best known is Nosema. Nosema, which is also called Nosemiasis or Nosemosi [ 1 ], is caused by two species of microsporidia, Nosema apis (N. apis) and Nosema ceraena (N. ceraena) [ 2 ]. Several works were published regarding the impact of Nosema disease on commerce, society and food, as shown in [ 3 , 4 ], and the disease is currently of one the major economic importance worldwide [ 5 ]. The health of the two species of bees is a particular interest of biologists, not only because of their significant role in the economy and food production but also because of the vital role they give in the pollination of agricultural and horticultural crops. Many biological descriptions of its DNA and its behavior can be found in literature, for example in [ 6 , 7 ]. Furthermore, several recent works try to treat this disease using a chemical simulation, as presented in [8,9]. Furthermore, from a computer science point of view, honeybees are of significant interest. Several works were, for example, involved in bees and controlling their behavior [ 10 ]. The study presented monitoring the behavior of bees to help people associated with beekeeping to manage their honey colonies and discover the bee disturbance caused by a pathogen, Colony Collapse Disorder (CCD) or colony health assessment. In [ 11 ], many tools of image analysis were explored to study the honeybee auto grooming behavior. Chemical and gas sensors were used for measurement. Destructor infestations are applied inside the honeybee colony to detect disease. The study was based on measurements of the Sensors 2021,21, 3068. https://doi.org/10.3390/s21093068 https://www.mdpi.com/journal/sensors
Sensors 2021,21, 3068 2 of 17 atmosphere of six beehives using six types of solid-state gas sensors during a 12-h experiment [ 12 ]. Regarding the image processing of Nosema disease part, there are currently two major works. In [ 13 ], the authors used the Scale Invariant Feature Transform to extract features from cell images. It is a technique that transforms image data into scale-invariant coordinates relative to local features. A segmentation technique and a support vector machine algorithm were then applied to microscopic processed images to automatically classify N. apis and N. ceranae microsporidia. In [ 14 ], the authors used the image processing techniques to extract the most valuable features from Nosema microscopic images and apply an Artificial Neural Network (ANN) for the recognition, which was statistically evaluated using the cross-validation technique. The last two works used image processing tools for feature extraction and Support Vector Machine (SVM) and ANN for classification. Today the traditional tools of machine learning like ANN, Convolutional Neural Network (CNN), and SVM are frequently used in human disease detection [ 15 ], especially in medical image classification of Heart diseases [ 16 ], Alzheimer disease [ 17 ] and Thorax diseases [ 18 ]. Deep learning approaches were used in [ 19 ] for semantic images segmentation. This work used the Atrous convolutional Neural Network for segmentation and some pre-trained NN for validation like PASCAL-Context, PASCAL-Person-Part and CityscapesDeep. In [ 20 ], a method using a 2D overlapping ellipse was implemented using the tools of image processing and applied to the problem of segmenting potentially overlapping cells in fluorescence microscopy images. Deep learning is an end-to-end machine learning process that trains feature extraction together with the classification itself. Instead of organizing statistics to run through predefined equations, deep learning uses multiple layers of processing data and setting fundamental parameters on knowledge records, and it trains the computer to analyze and recognize data. Deep learning approaches are widely applied in the analysis of microscopic images in many fields: human microbiota [ 21 ], material sciences [ 22 ], microorganism detection [ 23 ], cellular image processing [ 24 ] and many other important works in this field. Deep learning techniques have accelerated with transfer learning the ability to recognize and classify several diseases. The objective of this paper is to validate this hypothesis. All the methods of Nosema detection and recognition presented by the biologists in the literature were either molecular detections or genetic descriptions. This paper evaluates two different strategies for automatic identification of the Nosema cell disease based on the microscopic images. First, images of Nosema cells and the existing objects have been cropped from the principal microscopic images. Using these images, the first dataset has been built. Then, the obtained images were processed again and several different features have been extracted. These features were used to create a second dataset. The obtained databases were used for the evaluation recognition of the Nosema cells. The first approach uses a model, which uses the extracted features by an ANN and an SVM. The second approach uses the deep learning and transfer learning methods: first, CNN, and then pre-trained networks AlexNet, VGG-16 and VGG-19. The tools of transfer learning used by authors reached notable results as this is the first time they have been used for the purpose of Nosema cell recognition. The main innovation of this paper is the evaluation of two different strategies of automatic detection and recognition Nosema cells from microscopic images and identification of the robust and successful approach as a robust methodology for automated identifying and recognizing Nosema cells versus the other existing objects in the same microscopic images. The rest of the paper is organized as follow: Section 2describes the dataset preparation. In Section 3is described dataset, segmentation, features extraction, ANN training, the use of SVM, CNN, the use of Alex Net, VGG-16 and VGG-19. The experiments are described in Section 4. Section 5discusses the obtained results. Finally, the paper is concluded.
Sensors 2021,21, 3068 3 of 17 2. Materials: Preparation of The Dataset For the experiment, Nosema microscopic images were used. So far, it is not known whether these images contain a sufficient amount of information for accurate detection and recognition of the disease cells. It was only known that the important information was diffused all over the image and behind the majority of unimportant data. The used images in this work are 400 RGB images, encoded with JPEG and with a resolution of 2272 × 1704 pixels. Each sample was labelled by one of the 7 classes, according to the severity of the disease or the number of disease cells present in the microscopic image. From these 400 RGB images, a set of sub-images have been extracted. To do that, each microscopic image was divided into many smaller images forming subdivisions of the existing and clear objects. This first phase was done manually due to the low quality of input images by cropping the object of interest (i.e., cells). All the existing objects in the microscopic images were extracted as sub-images and labelled whether they stand for: Nosema(N) and not Nosema cells (n-N), see Figure 1. The area chosen was as small as possible, where an isolated and clear microscopic cell is located. Then, in the second automatic phase, the selected objects are processed to prepare them for the segmentation process (see Figure 1). Sensors 2021, 21, x FOR PEER REVIEW 3 of 17 2. Materials: Preparation of The Dataset For the experiment, Nosema microscopic images were used. So far, it is not known whether these images contain a sufficient amount of information for accurate detection and recognition of the disease cells. It was only known that the important information was diffused all over the image and behind the majority of unimportant data. The used images in this work are 400 RGB images, encoded with JPEG and with a resolution of 2272 × 1704 pixels. Each sample was labelled by one of the 7 classes, according to the severity of the disease or the number of disease cells present in the microscopic image. From these 400 RGB images, a set of sub-images have been extracted. To do that, each microscopic image was divided into many smaller images forming subdivisions of the existing and clear objects. This first phase was done manually due to the low quality of input images by cropping the object of interest (i.e., cells). All the existing objects in the microscopic images were extracted as sub-images and labelled whether they stand for: Nosema(N) and not Nosema cells (n-N), see Figure 1. The area chosen was as small as possible, where an isolated and clear microscopic cell is located. Then, in the second automatic phase, the selected objects are processed to prepare them for the segmentation process (see Figure 1). Figure 1. Example of extraction of Nosema cells and other existing objects in a part of one microscopic image. Based on the steps described above, a dataset containing 2000 sample images in total was created. It consists of 1000 Nosema cells samples and 1000 images, which are not Nosema cells, i.e., any other existing objects in the microscopic images. Table 1 below shows information about the extracted sub-images for dataset construction. Table 1. Dataset of extracted sub-images. Images Number Color Type Resolution Nosema sub-images 1000 RGB JPEG 229 × 161 Non-Nosema sub-images 1000 RGB JPEG 450 × 257 The microscopic sub-images were examined using two strategies: • The first strategy is based on an image processing approach, where features were extracted manually. • The second set of strategies is based on the use of the whole sub-image and the deep learning. Figure 2 shows strategies covered in the paper. Figure 1. Example of extraction of Nosema cells and other existing objects in a part of one microscopic image. Based on the steps described above, a dataset containing 2000 sample images in total was created. It consists of 1000 Nosema cells samples and 1000 images, which are not Nosema cells, i.e., any other existing objects in the microscopic images. Table 1below shows information about the extracted sub-images for dataset construction. Table 1. Dataset of extracted sub-images. Images Number Color Type Resolution Nosema sub-images 1000 RGB JPEG 229 ×161 Non-Nosema sub-images 1000 RGB JPEG 450 ×257 The microscopic sub-images were examined using two strategies: • The first strategy is based on an image processing approach, where features were extracted manually. • The second set of strategies is based on the use of the whole sub-image and the deep learning. Figure 2shows strategies covered in the paper.
Sensors 2021,21, 3068 4 of 17 Sensors 2021, 21, x FOR PEER REVIEW 4 of 17 Figure 2. Implemented Strategies for Nosema Recognition. 3. Methods In the scope of this study, two different strategies were implemented. All the methods are shown according to both of the strategies. The methods are working on the dataset of sub-images (2000 images). 3.1. Strategy 1: Nosema Cells Recognition with Image Processing and Machine Learning This subsection is divided into two parts. The first part describes how the features were extracted and prepared for the training of a model. The second part shows the proposed classification systems. 3.1.1. Preprocessing for Feature Extraction A preprocessing stage is necessary before extraction of the features. The initial point is an RGB image. The first step is to convert the image from RGB to a grayscale image. The second step consists of binarization of the image by the thresholding using the Otsu method [25]. In the third step, the flood-fill operation was used on background pixels of the input binary image to fill the object hole from its specific locations and then to ignore all smaller existing objects in the image of the desired object. As the final step, the object perimeter is enhanced using the dilatation method [26]. So, the desired shape of the object is obtained by calculating the difference between the two images, before and after perimeter enhancement. The result of the final step is a shape image, which was extracted from the sub-image of the dataset (see Figure 3). Figure 3. Shape results of two examples before and after preprocessing. The first sample is Nosema and the second is non Nosema object. Figure 2. Implemented Strategies for Nosema Recognition. 3. Methods In the scope of this study, two different strategies were implemented. All the methods are shown according to both of the strategies. The methods are working on the dataset of sub-images (2000 images). 3.1. Strategy 1: Nosema Cells Recognition with Image Processing and Machine Learning This subsection is divided into two parts. The first part describes how the features were extracted and prepared for the training of a model. The second part shows the proposed classification systems. 3.1.1. Preprocessing for Feature Extraction A preprocessing stage is necessary before extraction of the features. The initial point is an RGB image. The first step is to convert the image from RGB to a grayscale image. The second step consists of binarization of the image by the thresholding using the Otsu method [ 25 ]. In the third step, the flood-fill operation was used on background pixels of the input binary image to fill the object hole from its specific locations and then to ignore all smaller existing objects in the image of the desired object. As the final step, the object perimeter is enhanced using the dilatation method [ 26 ]. So, the desired shape of the object is obtained by calculating the difference between the two images, before and after perimeter enhancement. The result of the final step is a shape image, which was extracted from the sub-image of the dataset (see Figure 3). Sensors 2021, 21, x FOR PEER REVIEW 4 of 17 Figure 2. Implemented Strategies for Nosema Recognition. 3. Methods In the scope of this study, two different strategies were implemented. All the methods are shown according to both of the strategies. The methods are working on the dataset of sub-images (2000 images). 3.1. Strategy 1: Nosema Cells Recognition with Image Processing and Machine Learning This subsection is divided into two parts. The first part describes how the features were extracted and prepared for the training of a model. The second part shows the proposed classification systems. 3.1.1. Preprocessing for Feature Extraction A preprocessing stage is necessary before extraction of the features. The initial point is an RGB image. The first step is to convert the image from RGB to a grayscale image. The second step consists of binarization of the image by the thresholding using the Otsu method [25]. In the third step, the flood-fill operation was used on background pixels of the input binary image to fill the object hole from its specific locations and then to ignore all smaller existing objects in the image of the desired object. As the final step, the object perimeter is enhanced using the dilatation method [26]. So, the desired shape of the object is obtained by calculating the difference between the two images, before and after perimeter enhancement. The result of the final step is a shape image, which was extracted from the sub-image of the dataset (see Figure 3). Figure 3. Shape results of two examples before and after preprocessing. The first sample is Nosema and the second is non Nosema object. Figure 3. Shape results of two examples before and after preprocessing. The first sample is Nosema and the second is non Nosema object. From the shape image, in total 9 features were extracted. They describe the structure of the Nosema cell and consist of 6 geometric and 3 statistic features. Furthermore, from the
Sensors 2021,21, 3068 5 of 17 extracted sub-images, 6 texture features and 4 Gray Level Co-occurrence Matrices (GLCM) color features were calculated. Geometric Features Extraction The geometric features describe basic characteristics of geometric form. They are also the most significant for us because, after several experiments, the best results were achieved using them. These parameters were used and defined in [14] respectively: • The size/the perimeter: given that the shape of the Nosema cell is similar to an ellipse form and the other objects have different rounds shapes, perimeter formula of an ellipse adopted have been adopted in this study. This calculation is based on aand b variables where ais the semi-major axis and bis the semi-minor axis. Perimeter Pis given by the following equation: P=π·q2·(a2+b)2(1) •Area A is given by the following formula: A=π·a·b(2) •Relation R is the dividing quotient of the height (H) and width (W) of the shape. R=H/W (3) • The equivalent diameter (D), which is the diameter of the circle with the same area of the object, D=r4×A π(4) • The solidity (S): it is the portion of the area of the convex region contained in the object, S=A convex area (5) • The eccentricity (E): it is the relation between the distance of the focus of the ellipse and the length of the principal axis. Let f= 1 −a b in which ais the semi-major axis and bis the semi-minor axis of the ellipse. E=qf×(2−f)(6) Statistic Features Extraction The remaining features 7, 8 and 9 were calculated using the polar coordinates of the object, in particular, the polar coordinates of a Cartesian point (x, y). Let us say that a point Mis at such a distance (r) and such a direction ( θ ) of the point of origin (o) of the reference point. It is a projection or a one-dimensional representation of the boundary. This is found by computing the distances from the centroid (center of “mass”) of the object to the boundary as a function of angles in any chosen increment. The resulting set of distances, when properly scaled, was the vector needed as distances of the angle to the boundary pixel. After that, a value for these distances is truncated, which are the nearest integers to a value to calculate the last three respective parameters. • The standard deviation of these distances have been calculated and which is the feature number 7, the standard deviation is a measure of variability, or what the range of values is, it normalizes the elements of Nalong the first array dimension whose size does not equal to 1; where Pcan be a vector or a matrix and in this case is a vector
Sensors 2021,21, 3068 6 of 17 of the radius values of polar coordinates of the studied object, and Eis its mean. It is given by Equation (7): Std.deviation (σ)=v u u t 1 N· N ∑ j=1Pij −Ei2(7) • The Variance σ2 is the mean of the squared distances between a value and the mean of those values: it normalizes Y by n − 1 if n> 1, where nis the sample size or pixels shape number. This is an unbiased estimator of the variance of the population from which xis drawn, as long as xconsists of independent, distributed distances. For n= 1, Y is normalized by nwith µ is the average of all xvalues. In this case, the variance is calculated as the normalized distances between the centroid and every single pixel in the object shape. σ2=(x1−µ)2+(x2−µ)2+(x3−µ)2+. . . +(xn−µ)2 n(8) • The Variance derivate is the derivate that calculates the difference and the approximate derivative of the variance (X), for a vector X, is [X(2) − X(1) X(3) − X(2) . . . X(n) − X(n − 1)]. It is given by the following equation: f0(σ2) = −n−2h(x1−µ)2+(x2−µ)2+(x3−µ)2+. . . +(xn−µ)2i(9) Features Extraction: Texture and GLCM The next step consists of the use of the RGB object image to extract more information about texture and color. Nevertheless, before that, it is needed to separate the object from its background in the image; to do that: individual Hue (V), saturation (S) and Value (V) channels have been extracted after converting the image from RGB to HSV color spice image, then authors look for the vivid color by thresholding the V mask, after that, authors set the H and S masks to 0 and the V mask to 1 and concatenate the three new HSV channels. Finally, the authors convert back the image to RGB color image to have the object without it’s background, as shown in Figure 4: Sensors 2021, 21, x FOR PEER REVIEW 6 of 17 of values is, it normalizes the elements of N along the first array dimension whose size does not equal to 1; where P can be a vector or a matrix and in this case is a vector of the radius values of polar coordinates of the studied object, and E is its mean. It is given by Equation (7): 𝑆𝑡𝑑.𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 (𝜎)=1𝑁∙𝑃−𝐸 (7) • The Variance 𝜎 is the mean of the squared distances between a value and the mean of those values: it normalizes Y by n − 1 if n > 1, where n is the sample size or pixels shape number. This is an unbiased estimator of the variance of the population from which x is drawn, as long as x consists of independent, distributed distances. For n = 1, Y is normalized by n with µ is the average of all x values. In this case, the variance is calculated as the normalized distances between the centroid and every single pixel in the object shape. 𝜎=(𝑥−μ) + (𝑥−μ)+ (𝑥−μ)+...+(𝑥−μ) 𝑛 (8) • The Variance derivate is the derivate that calculates the difference and the approximate derivative of the variance (X), for a vector X, is [X(2)-X(1) X(3)-X(2) ... X(n)-X(n1)]. It is given by the following equation: 𝑓 ′(𝜎)=− 𝑛[(𝑥−μ) + (𝑥−μ)+ (𝑥−μ)+...+(𝑥−μ)] (9) Features Extraction: Texture and GLCM The next step consists of the use of the RGB object image to extract more information about texture and color. Nevertheless, before that, it is needed to separate the object from its background in the image; to do that: individual Hue (V), saturation (S) and Value (V) channels have been extracted after converting the image from RGB to HSV color spice image, then authors look for the vivid color by thresholding the V mask, after that, authors set the H and S masks to 0 and the V mask to 1 and concatenate the three new HSV channels. Finally, the authors convert back the image to RGB color image to have the object without it’s background, as shown in Figure 4: Figure 4. Example of a Nosema cell and non-Nosema object extraction from its backgrounds. The number of texture parameters is 6 and they are the measurement of the entropy of RGB and HSV channels; it can be defined as a logarithmic measurement of the number of states with a significant probability of being occupied. The input intensity images are the blue, red, green and yellow channels. Furthermore, the Hue and saturation masks’ Figure 4. Example of a Nosema cell and non-Nosema object extraction from its backgrounds. The number of texture parameters is 6 and they are the measurement of the entropy of RGB and HSV channels; it can be defined as a logarithmic measurement of the number of states with a significant probability of being occupied. The input intensity images are the blue, red, green and yellow channels. Furthermore, the Hue and saturation masks’ randomness is calculated. The value/lightness channel was dropped since it does not give any extra information. Suppose x i is the set of pixels with the color/channel iof the image
Sensors 2021,21, 3068 7 of 17 and p(x i )is its probability. The 6 entropy parameters are calculated by the same equation 10 above: E(xi)= N ∑ i=1 P(xi)·log2(p(xi)). (10) As mentioned before, the Nosema cells look to be more yellow inside, that is the way a Grey Level Co-occurrence Matrix was applied to the yellow mask to extract more texture information about this color. The GLCM is very widely used as a statistical method of extracting a textural feature from images. It was used in several works of feature extraction, like in features skin extraction [ 27 ] or plant disease feature extraction [ 28 ]. GLCM is widely used to extract useful information from medical images, that is why GLCM is developed to overcome the limitations of the available extracted features and to be more accurate as indicated in [ 29 ], a novel strategy to compute the GLCM called HaraliCU can offload the computations into the Graphics Processing Units (GPU) cores, thus allowing to drastically reduce the running time required by the execution on Central Processing Units (CPUs). In [ 30 ], a developed method called CHASM exploits the HaraliCU method mentioned previously, a GPU-enabled approach, capable of overcoming the issues of existing tools by effectively computing the feature maps for high-resolution images with their full dynamics of grayscale levels, and CUDA-SOM, a GPU-based implementation of the SOMs for the identification of clusters of pixels in the image. The general rule in the statistical texture calculator says that these are calculated from the statistical distribution of combinations of intensities observed at specified positions relative to each other in the image. Based on the number of pixels in each combination, statistics are categorized into first-order, secondorder, and higher-order statistics. The GLCM is a method of extracting the second-order statistical texture characteristics. Third-order and higher-order textures are theoretically possible but not commonly implemented due to computation time demands and difficulty to interpret them [ 31 ]. The GLCM is considered a greyscale image I defined in Z. The grey level co-occurrence matrix is defined to be a square matrix G d of size N where, N is the total number of grey levels in the image. The (i,j) th entry of G d represents the number of times a pixel X with intensity value iis separated from a pixel Y with intensity value jat a particular distance k in a particular direction d. Where the distance k is a non-negative integer and the direction d is specified by d = (d 1 , d 2 , d 3 , . . . d n ), where d i∈ {0, k, − k} ∀ i= 1, 2, 3, . . . , n [ 32 ]. Four features were extracted from the Haralick GLCM applied to the image of the yellow channel: contrast, correlation, energy, and homogeneity, the most significant features given by the GLCM. Contrast = Ng−1 ∑ n=0 n2·"Ng ∑ i=1 Ng ∑ j=1 p(i,j)#(11) Correlation measures the linear dependency of grey levels of neighboring pixels: Correlation =1 (σi.σj)·∑ i ∑ j (i−µi)·(j−µj)·Pi,j. (12) It is also called Angular Second Moment (ASM), and it is of high value when two neighbor pixels are very similar: Energy = Ng−1 ∑ i=0 Ng−1 ∑ j=0 p(i,j)2(13) Homogeneity is high when a local grey level is uniform: Homogeneity =∑ i ∑ j P(i,j)·1 1+(i−j)2. (14)
Sensors 2021,21, 3068 8 of 17 Segmentation Diagram Block and Recognition The automatic approach of this part of work is to study the existing objects in the microscopic images of Nosema disease; to study both Nosema cells and other types of cells present in microscopic images, the desired objects are detected, useful features are extracted (geometric, texture and statistic features) by an automatic segmentation method, and the result is a vector of 19 features. Then, a multilayer Neural Network system is used as a classifier, the set of features in order to recognize the Nosema disease cells vs. the other objects in the images. Once the features of the different object were extracted, the feature dataset is generated: it consists of 19 features for 2000 objects, i.e., a 38,000 value divided equally between two kind of objects: one for the calculated features of the objects of interest (Nosema cells), and the other for other existed object in the microscopic images. This part of the work was significantly computationally demanding since the extraction of 2000 sub-images as well as the calculation of 19 features for each image cost many days of computations, using a CPU, in particular, PcCom Basic Elite Pro Intel Core i7-9700/8GB/240SSD. In this part of the paper, neural networks were used for the automatic detection of Nosema diseases in honeybees. The neural networks proved their quality in many realworld applications as well as for classification tasks. Usually, a neural network is made up of two parts which constitute the set of learning functionalities used to train the NN model, while a set of testing functionality is used to verify the correctness of the trained NN model. The appropriate network design should be configured, including network type, learning method and with one or two hidden layers. In the learning phase, the connection weights were always updated until they reached the defined iteration number or the acceptable error. Therefore, the ability of the ANN model to respond accurately was ensured by using the mean squared error (MSE) criterion to emphasize the validity of the model between input and network output. Furthermore, the network calculates the outputs and automatically adjusts the weights to reduce errors and recognize the objects. For the experiment, the dataset was divided into a learning part of the model and another part for testing and validation. During the proposed approach, two types of experiments were conducted: in the first one, the model was tested with only the 15 geometric, statistic and texture features without counting the yellow color features calculated with the GLCM. The second experiment was implemented by concatenating all the 19 features. Furthermore, these two experiments were done to prove the strong presence of yellow color in the cell of Nosema. The experiments were done by applying different precision of the data division between data for training and the data for testing. The experiment was conducted with several different neural network architectures—in particular, it has experimented with the number of neurons in the hidden layer. Each test was repeated at least 30 times to obtain the optimal value of success recognition accuracy. First of all, the program was tested with a number of neurons equal to the number of input features extracted from the images (15 or 19) in which the weight is added randomly, and after that, the number of neurons was increased in the hidden layer by 50 in every new experiment (see Table 2). 3.1.2. The Use of Support Vector Machine: SVM Support vector machines SVM is a supervised learning algorithm used for classification and regression problems [ 33 ]. To ensure that SVM will give the optimal result, the parameters of the classifier were optimized. The optimized options have been the cost “C”, also called error term or regularization parameter and the kernel trick function, which calculates the dot product of two vectors in the space of very large characteristics. Different kernel functions can be specified for the decision function and the radial basis function (RBF) is commonly used, especially for nonlinear hyperplanes. RBF kernel for the SVM has been chosen, which is in the following form: K(X1,X2)=exponent−γ·||X1−X2||2(15)
Sensors 2021,21, 3068 9 of 17 where ||X1−X2|| is the Euclidean distance between X 1 and X 2 , and γ : gamma is used only for RBF kernel. The non-regularization of the values of “ γ ” and “C” will cause overfitting or an underfitting of the model. The SVM has been configured with C = 3 and γ = 5 × 10 −5 as the architecture with the best result. In this case, the SVM model will classify two classes corresponding to Nosema cells and non-Nosema cells (or other objects). Figure 5shows the diagram block of the processing model for ANN and SVM classification systems for the first implemented strategy. Sensors 2021, 21, x FOR PEER REVIEW 9 of 17 Different kernel functions can be specified for the decision function and the radial basis function (RBF) is commonly used, especially for nonlinear hyperplanes. RBF kernel for the SVM has been chosen, which is in the following form: 𝐾(𝑋,𝑋)=𝑒𝑥𝑝𝑜𝑛𝑒𝑛𝑡(− γ ∙‖𝑋𝑋‖) (15) where ‖𝑋𝑋‖ is the Euclidean distance between X 1 and X 2 , and γ: gamma is used only for RBF kernel. The non-regularization of the values of “γ” and “C” will cause overfitting or an underfitting of the model. The SVM has been configured with C = 3 and γ = 5 × 10 −5 as the architecture with the best result. In this case, the SVM model will classify two classes corresponding to Nosema cells and non-Nosema cells (or other objects). Figure 5 shows the diagram block of the processing model for ANN and SVM classification systems for the first implemented strategy. Figure 5. The Segmentation Diagram Block of the first strategy in Nosema detection: The Training Mode consists of the part of dataset construction, features extraction, and their fusion to be trained with ANN and SVM. The Testing Mode consists of data preparation for testing the model and decision making. 3.2. Strategy 2: Nosema Cells Recognition Using Deep Learning Approaches 3.2.1. Nosema Recognition with the Implemented CNN A convolutional neural network CNN is a network architecture for deep learning which learns directly from data. They are used to classify images or to predict continuous data. In the scope of this paper, a new CNN network was designed, but before entering them into the network, input data and the predictors have been normalized were normalized. Furthermore, batch normalization layers should be used to normalize the outputs of each convolutional and fully connected layer. The architecture of a CNN should contain input layers that define the size and type of input data, the middle layers which contain the main layers of learning and computation, and an output layer that defines the size and type of output data. The experiment is described in detail in Table 3 and its description is in the Experimental Methodology and Result section. 3.2.2. The Use of Transfer Learning Another approach to work in Deep Learning is using a pre-trained Deep Neural Network. For the first approach, the advantage is its structure; a model of an already existing Deep Neural Network is used by applying a few simple changes. In the latter case, a limited data set is used and knowledge is transferred from this model to a new task. It is also said to transfer the learned characteristics of a pre-trained CNN to a new problem with a limited data set. Transfer learning involves forming a CNN with available labelled source data (called a source learner) and then extracting the inner layers that represent a generic representation of mid-level entities to a target CNN learner. An adaptation layer is added Figure 5. The Segmentation Diagram Block of the first strategy in Nosema detection: The Training Mode consists of the part of dataset construction, features extraction, and their fusion to be trained with ANN and SVM. The Testing Mode consists of data preparation for testing the model and decision making. 3.2. Strategy 2: Nosema Cells Recognition Using Deep Learning Approaches 3.2.1. Nosema Recognition with the Implemented CNN A convolutional neural network CNN is a network architecture for deep learning which learns directly from data. They are used to classify images or to predict continuous data. In the scope of this paper, a new CNN network was designed, but before entering them into the network, input data and the predictors have been normalized were normalized. Furthermore, batch normalization layers should be used to normalize the outputs of each convolutional and fully connected layer. The architecture of a CNN should contain input layers that define the size and type of input data, the middle layers which contain the main layers of learning and computation, and an output layer that defines the size and type of output data. The experiment is described in detail in Table 3 and its description is in the Experimental Methodology and Result section. 3.2.2. The Use of Transfer Learning Another approach to work in Deep Learning is using a pre-trained Deep Neural Network. For the first approach, the advantage is its structure; a model of an already existing Deep Neural Network is used by applying a few simple changes. In the latter case, a limited data set is used and knowledge is transferred from this model to a new task. It is also said to transfer the learned characteristics of a pre-trained CNN to a new problem with a limited data set. Transfer learning involves forming a CNN with available labelled source data (called a source learner) and then extracting the inner layers that represent a generic representation of mid-level entities to a target CNN learner. An adaptation layer is added to the target CNN learner to correct for any different conditional distributions between the source and target domains. The experiments are performed on the object image classification, where the average precision is measured as a measure of performance.
Sensors 2021,21, 3068 16 of 17 Author Contributions: Conceptualization, S.D. and C.M.T.-G.; methodology, S.D. and C.M.T.-G.; software, S.D. and C.M.T.-G.; validation, S.D., C.M.T.-G. and R.B.; formal analysis, S.D., C.M.T.-G. and R.B.; investigation, S.D. and C.M.T.-G.; resources, C.M.T.-G.; data curation, S.D. and C.M.T.-G.; writing—original draft preparation, S.D.; writing—review and editing, S.D., C.M.T.-G. and R.B.; visualization, S.D., C.M.T.-G. and R.B.; supervision, C.M.T.-G. and R.B.; project administration, C.M.T.-G.; funding acquisition, C.M.T.-G. All authors have read and agreed to the published version of the manuscript. Funding: This research received no external funding. Institutional Review Board Statement: Not applicable. Informed Consent Statement: Not applicable. Data Availability Statement: The data presented in this study are available on request from the corresponding author. The data are not publicly available due to starting state of the research. Conflicts of Interest: The authors declare no conflict of interest. References 1. Lewis, C.; Denny, J.B.B.; Jarrad, R.P.; Earle, S.R. Nosema pyrausta: Its biology, history, and potential role in a landscape of transgenic insecticidal crops. Biol. Control 2009,48, 223–231. [CrossRef] 2. Andre, J.B.; Emily, D.J.; Jayre, A.J.; Herman, K.L. North American Propolis Extracts From Upstate New York Decrease Nosema ceranae (Microsporidia) Spore Levels in Honey Bees (Apis mellifera). Front. Microbiol. 2020,11, 1719. 3. Sinpoo, C.; Paxton, R.J.; Disayathanoowat, T.; Krongdang, S.; Chantawannakul, P. Impact of Nosema ceranae and Nosema apis on individual worker bees of the two host species (Apis cerana and Apis mellifera) and regulation of host immune response. J. Insect Physiol. 2018,105, 1–8. [CrossRef] 4. Paneka, J.; Paris, L.; Roriz, D.; Mone, A.; Dubuffet, A.; Delbac, F.; Diogon, M.; El Alaoui, H. Impact of the microsporidian Nosema ceranae on the gut epithelium renewal of the honeybee, Apis mellifera.J. Invertebr. Pathol. 2018 ,159, 121–128. [CrossRef] [PubMed] 5. Calderón, R.A.; Ramírez, F. Enfermedades de las Abejas Melíferas, con Énfasis en Abejas Africanizadas; CINAT-UNA: Heredia, Costa Rica, 2010; p. 125. 6. Higes, M.; Hernández, R.M.; Bailón, E.G.; Palencia, P.G.; Meana, A. Detection of infective Nosema ceranae (Microsporidia) spores in corbicular pollen of forager honeybees. J. Invertebr. Pathol. 2008,97, 76–78. [CrossRef] 7. Higes, M.; Martín, R.; Meana, A. Nosema ceranae in Europe: An emergent type C nosemosis. Apidologie 2010 ,41, 375–392. [CrossRef] 8. Suwannapong, G.; Maksong, S.; Phainchajoen, M.; Benbow, M.E.; Mayack, C. Survival and health improvement of Nosema infected Apis florea (Hymenoptera: Apidae) bees after treatment with propolis extract. J. Asia Pac. Entomol. 2018 ,21, 437–444. [CrossRef] 9. Mura, A.; Pusceddu, M.; Theodorou, P.; Angioni, A.; Flori, I.; Paxton, R.J.; Satta, A. Propolis Consumption Reduces Nosema ceranae Infection of European Honey Bees (Apis mellifera). Insects 2020,11, 124. [CrossRef] 10. Tu, G.J.; Hansen, M.K.; Kryger, P.; Ahrendt, P. Automatic behaviour analysis system for honeybees using computer vision. Comput. Electron. Agric. 2016,122, 10–18. [CrossRef] 11. Giuffre, C.; Lubkin, S.R.; Tarpy, D.R. Automated assay and differential model of western honey bee (Apis mellifera) autogrooming using digital image processing. Comput. Electron. Agric. 2017,135, 338–344. [CrossRef] 12. Szczurek, A.; Maciejewska, M.; B ˛ak, B.; Wilde, J.; Siuda, M. Semiconductor gas sensor as a detector of Varroa destructor infestation of honey bee colonies—Statistical evaluation. Comput. Electron. Agric. 2019,162, 405–411. [CrossRef] 13. Alvarez-Ramos, C.M.; Niño, E.; Santos, M. Automatic Classification of Nosema Pathogenic Agents through Machine Vision techniques and Kernel-based Vector Machines. In Proceedings of the 2013 8th Computing Colombian Conference (8CCC), Armenia, Colombia, 21–23 August 2013; [CrossRef] 14. Dghim, S.; Travieso, C.M.; Dutta, M.K.; Hernández, L.E. Nosema Pathogenic Agent Recognition Based on Geometrical and Texture Features Using Neural Network Classifier. In Proceedings of the International Conference on Contemporary Computing and Applications (IC3A) 2020, Lucknow, India, 5–7 February 2020. 15. Yadav, S.S.; Jadhav, S.M. Deep convolutional neural network based medical image classification for disease diagnosis. J. Big Data 2019,6, 113. [CrossRef] 16. Khemphila, A.; Boonjing, V. Heart Disease Classification Using Neural Network and Feature Selection. In Proceedings of the 21st International Conference on Systems Engineering 2011, Las Vegas, NV, USA, 16–18 August 2011. 17. Jain, R.; Jain, N.; Aggarwal, A.; Hemanth, D.J. Convolutional Neural Network Based Alzheimer’s Disease Classification from Magnetic Resonance Brain Images. Cogn. Syst. Res. 2018,57, 147–159. [CrossRef] 18. Guan, Q.; Huang, Y.; Zhong, Z.; Zheng, Z.; Zheng, L.; Yang, Y. Thorax Disease Classification with Attention Guided Convolutional Neural Network. Pattern Recognit. Lett. 2019,131, 38–45. [CrossRef]
Sensors 2021,21, 3068 17 of 17 19. Chen, L.C.; Papandreou, G.; Kokkinos, I.; Murphy, K.; Yuille, A.L. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE Trans. Pattern Anal. Mach. Intell. 2018 ,40, 834–848. [CrossRef] [PubMed] 20. Panagiotakis, C.; Argyros, A. Region-Based Fitting of Overlapping Ellipses and Its Application to Cells Segmentation. Image Vis. Comput. 2020,93, 103810. [CrossRef] 21. Zieli´nski, B.; Sroka-Oleksiak, A.; Rymarczyk, D.; Piekarczyk, A.; Brzychczy-Włoch, M. Deep learning approach to describe and classify fungi microscopic images. PLoS ONE 2020,15, e0234806. [CrossRef] 22. Ge, M.; Su, F.; Zhao, Z.; Su, D. Deedeep learning analysis on microscopic imaging in materials science. Mater. Today Nano 2020 , 11, 100087. [CrossRef] 23. Zhang, Y.; Jiang, H.; Ye, T.; Juhas, M. Deep Learning for Imaging and Detection of Microorganisms. Trends Microbiol. 2021 . [CrossRef] 24. Moen, E.; Bannon, D.; Kudo, T.; Graf, W.; Covert, M.; Valen, D.V. Deep learning for cellular image analysis. Nat. Methods 2019 ,16, 1233–1246. [CrossRef] [PubMed] 25. Miss, H.; Vala, J.; Baxi, A. A Review on Otsu Image Segmentation Algorithm. Intern. J. Adv. Res. Comp. Eng. Tech. 2013 ,2, 387–389. 26. Gonzales, R.C.; Woods, R.E. Digital Image Processing, 4th ed.; Pearson: Upper Saddle River, NJ, USA, 2017. 27. Kolkur, S.; Kalbande, D.R. Survey of Texture Based Feature Extraction for Skin Disease Detection. In Proceedings of the International Conference on ICT in Business Industry & Government (ICTBIG) 2016, Indore, India, 18–19 November 2016. 28. Al-Hiary, H.; Ahmad, S.B.; Reyalat, M.; Braik, M.; ALRahamneh, Z. Fast and Accurate Detection and Classification of Plant Diseases. Inter. J. Comp. Appl. 2011,17, 31–38. [CrossRef] 29. Rundo, L.; Tangherloni, A.; Galimberti, S.; Cazzaniga, P.; Woitek, R.; Sala, E.; Nobile, M.S.; Mauri, G. HaraliCU: GPU-powered Haralick feature extraction on medical images exploiting the full dynamics of gray-scale levels. In Proceedings of the International Conference on Parallel Computing Technologies 2020, Macau, China, 7–10 December 2020. 30. Rundo, L.; Tangherloni, A.; Cazzaniga, P.; Mistri, M.; Galimberti, S.; Woitek, R.; Sala, E.; Mauri, G.; Nobile, M.S. A CUDA-powered method for the feature extraction and unsupervised analysis of medical images. J. Supercomput. 2021. [CrossRef] 31. Mohanaiah, P.; Sathyanarayana, P.; GuruKumar, L. Image Texture Feature Extraction Using GLCM Approach. Int. J. Sci. Res. Pub. 2013,3322, 750–757. [CrossRef] 32. Sebastian, B.; Unnikrishnan, A.; Balakrishnan, K. Grey level co-occurrence matrices: Generalization and some new features. Int. J. Comput. Sci. Eng. Inf. Technol. 2012,8, 1463–1465. 33. Tian, Y.; Shi, Y.; Liu, X. Recent Advances on Support Vector Machines Research. Tech. Econ. Dev. Econ. 2012 ,18, 5–33. [CrossRef] 34. Weiss, K.; Khoshgoftaar, T.M.; Wang, D. A survey of transfer learning. J. Big Data 2016,3, 9. [CrossRef] 35. Ma, Y.; Gong, W.; Mao, F. Transfer learning used to analyze the dynamic evolution of the dust aerosol. J. Quant. Spectrosc. Radiat. Transf. 2015,153, 119–130. [CrossRef] 36. Xie, M.; Jean, N.; Burke, M.; Lobell, D.; Ermon, S. Transfer learning from deep features for remote sensing and poverty mapping. In Proceedings of the 30th AAAI Conference on Artificial Intelligence 2015, Pheonix, AZ, USA, 12–17 February 2015; pp. 1–10. 37. Ogoe, H.A.; Visweswaran, S.; Lu, X.; Gopalakrishnan, V. Knowledge transfer via classification rules using functional mapping for integrative modeling of gene expression data. BMC Bioinform. 2015,7, 1–15. [CrossRef] 38. Kan, M.; Wu, J.; Shan, S.; Chen, X. Domain adaptation for face recognition: Targetize source domain bridged by common subspace. Int. J. Comput. Vis. 2014,109, 94–109. [CrossRef] 39. Widmer, C.; Ratsch, G. Multitask learning in computational biology. JMLR 2012,27, 207–216.