Counting the Number of Active Spermatozoa Movements Base on Improvement Adaptive Background Learning Algorithm

ABSTRACT

The most important early stage in sperm infertility research is the detection of sperm objects. The success rate in separating sperm objects from semen fluid has an important role for further analysis. This research performed the detection and calculation of human spermatozoa. The detected sperm was the moving sperm in the video data. An improvement of Adaptive Background Learning (ABL) was applied to detect the moving sperm. The purpose of this method is to improve the performance of ABL algorithm in background subtraction process to detect and calculate moving sperm on the microscopic video of sperm fluid. This paper also compared several other background subtraction algorithms to conclude the appropriate background subtraction algorithm for sperm detection and sperm counting. This research analysis by using the Gaussian Filter have been preprocessed. The next was background subtraction process, followed by morphology operation base on experiment, the ABL algorithm with performance of TP (110), FN (2), FP (7), Precision (0,8661), and F-Measure (0,9205) base been obtained. The detection results of any background subtraction algorithm have been validated. Then, the foreground mask results from the morphological operation were compare to ground thruth of moving sperm iamge. To test or validate the detection results of any background subtraction algorithm used, the foreground mask results from the morphological operation were compared to the ground truth of moving sperm image. For visualization purposes, every BLOB area (white object in binary image) on the foreground were given a bounding box to the original frame and the number of BLOB objects present in the foreground mask were counted. This results shows that the system had been able to detect and calculate moving sperm. Based on the test results, ABL method had succeeded in extracting sperm shape close to the original form compared to other methods.
Research on sperm infertility analysis continues to be developed. The most important step in the early stage of sperm infertility research is the sperm detection phase or sperm object separation from images/video obtained from the observation of semen [4]. The success rate in separating sperm objects from semen has an important role for the continuity of sperm objects analysis.
Background subtraction is a process that can be used to separate moving objects (foreground) and background in the video [5]. Background subtraction is most widely used in video-surveillance due to the need for separation of discrete objects, such as people, vehicles, animals, or other objects before further processing [6]. Another use of video-surveillance is to determine the number of vehicles on each of the four lanes of an intersection using BLOB Detection [7].
Several studies on sperm detection have been performed by [8], [9], [10], [11], and [12]. Researchers [8] used a fuzzy rule-based algorithm on the process of classifying sperm into normal and abnormal classes using sperm head, neck, and tails. Researchers [9] focused on head and tail tracking to detect sperm-tracking, as well as the motion template for detecting and tracking sperm motility integrated with the Kalman filter to maximize the intensity region algorithm when detecting tail locations. The results of this study gave an accuracy of 90.97%, with only 6.09% false positives per frame, is better than the existing sperm detection method. Researchers [10] performed sperm detection based on their contours. This research used Gaussian Modeling algorithm to perform foreground segmentation. Sperm is regarded as a foreground as it continues to move in the video frame in the research data. This research combined several algorithms to yield an average accuracy of 95% by real-time video processing from human spermatozoa test results. In research [11], researchers proposed the Gaussian Mixture Model, which was fixed using Hole Filling Algorithm, in the sperm detection process. The proposed method was compared with six methods for detecting other movements. The results of this study indicate that GMMHF can detect sperm cells. Compared to other methods, GMMHF is not the most superior method, although it has a fairly high accuracy, because this method combines the GMMbased Grimson and Stauffer methods which requires high computation, thus takes longer time to finish. Study [12] implemented a computer-assisted micro-sized spermatozoa motion analysis tool called the Computer Assisted Sperm Analysis (CASA). The CASA developed is able to calculate the conventional motion characteristics of spermatozoa, studying the behavior of spermatozoa by providing fluid flow, so tracking and rheotaxis can be performed, and the behavior of spermatozoa can be understood. Research [13] conducted a full review of the background subtraction process. According to [13], the background subtraction processes can be divided based on the basis of the method used. The divisions are: Basic methods, Fuzzy-based method, Statistical method, Type-2 Fuzzy based methods, Statistical methods using color and texture features, Non-parametric methods, Methods based on eigenvalues and eigenvectors, Neural, and neuro-fuzzy methods.
From some of the above research, some of the weaknesses of the algorithm that is used are that it takes quite a long time despite the high accuracy. Also, the video recording of semen liquid used has a sampling rate of < 50 fps (frame per second), while in this research the sampling rate used was ³ 50 fps because the active sperm motility can reach 5 times the size of its head [14]. To be able to represent a more accurate sperm movement, the appropriate sampling rate in the video data used is ± 50 fps. In addition, the above research does not apply to common sperm videos, and adaptive Background learning algorithms have never been applied to detect and calculate moving sperm cells.
From the existing references and observations of sperm data that have been performed, there are several challenges in detecting sperm in semen liquid, namely in terms of moving background object. Based on previous observations, dead sperms (no motility) have the possibility to move and change places because the dead sperms are in the path of healthy sperms, so the dead sperms will be pushed and moved from their original locations. In addition, there are new objects that are considered as the background. Dead sperms that are initially outside the view of the camera can enter the camera's visibility area because they are driven by the motility of healthy sperms.
The discussion of this research paper is structured as follows. In section two, it examines the design of research methods used to detect and calculate spermatozoa movements. Section three lays out the spermatozoa data acquisition and the underlying theory. Section four describes the result of the experiments conducted and section five concludes the result and briefly provides further suggestions for improvement of this paper.

II. Research Method
This research compares the motile object detection methods in the case of human sperm detection. The flowchart of this study can be seen in Figure 1.
There are four processes performed to detect and quantify human sperm. The first process was preprocessing using Gaussian filter, which was done on every frame read from the sperm video. The next process is background subtraction. The results of the second process were binary images, which represent the area of the moving objects on the frames. Morphological operations, which include opening and closing operations, were performed as the third process. This process aims to eliminate noise and improve the shape of (moving) sperms that had been successfully extracted in the previous process. To test or validate the detection results of each background subtraction algorithm used, foreground mask results of the morphological operations were compared with the ground truth images of motile sperm, the results of manual observation. For visualization purposes, each BLOB area in the foreground mask was assigned a bounding box to the original frame and was simulated into the number of BLOB objects present in the foreground mask [15], so it can be seen whether the system had been able to detect and count motile sperms.

A. Research Data
In this research, data in the form of real sperm video were collected from the results of sperm fluid scans of 20 volunteers willing to donate sperm liquid. Before being observed, the samples were left aside for about 20-30 minutes at room temperature [3]. This was necessary because at the time the sperm fluid was removed, dilution was necessary so that the spermatozoa observed were not too concentrated, could move more actively, and could be clearly differentiated. The sperm was extracted from a container using a pipette. The transfer of sperm to the object glass was arranged by seeking only the inside part of the container. Real video data was retrieved using bright field microscope located in the Integrated (Microbiology) Laboratory of Politeknik Kesehatan Surabaya, and the camera used was of Point Gray brand, FL3-U3-13S2C-CS type [16].

B. Preprocessing Data
The preprocessing process aimed to eliminate noise and reduce the detail of the image [17] [18]. The preprocessing method used in this study was Gaussian filter. The application of Gaussian filter made the video frame image become more vague, so noise and image detail decreased [19]. This affected the results in the next process. The amount of kernel used on the Gaussian filter in this research was 5x5.

C. Background Substraction
The background subtraction process was used to detect moving objects in the video [20]. In a study of sperm infertility, the sperm that will eventually fertilize the egg is the sperm that keeps moving [21]. Therefore, the background subtraction process is necessary in detecting moving sperm. In the case of sperm detection, the advantages of doing the background subtraction process is that the data used has of uni-modal characteristics, the distance between frames is considerably short, and the effect of light changes is absent [22]. On the other hand, the challenge faced is the presence of background objects that move and the existence of new objects considered as background. The input of the background subtraction process were the preprocessed video frames and the output were binary images that represented the objects (sperms) moving in the video. In this study, two background subtraction algorithms were applied, which include base model background subtraction (Frame Difference, Weighted Moving Mean, Adaptive Background Learning) and statistical model background subtraction (Single Gaussian, Adaptive Selective Background Learning) [23].

1) Adaptive Background Learning
Adaptive background learning involves subsequent sequential frames to get motion differences from the image and to forecast the foreground of the background area. Two classes were used for segmentation, namely class 1 for background and class 2 to note the foreground points. Adaptive Background Learning aims to provide background images on a regular basis based on strong differences in motion and image segmentation [24] [25].

2) Frame Difference
In this algorithm, the background model was taken from the frame (f) a moment before the current frame. The equation used to model the background image (B) in the Frame Difference algorithm [26] was: (1) Foreground images (F) were obtained by calculating the difference between the background image value with the current frame in (2) The algorithm is able to quickly and precisely detect moving pixels, but will fail to detect if the moving object stops instantly.

3) Weighted Moving Mean
This algorithm modeled the background image by calculating the average of the current frame with some previous frames. In this study, the average calculation used three frame data (f) namely the current frame and the 2 previous frames, which can be symbolized as frame t , frame t-1 , and frame t-2. The average value calculation was done by giving weight value on each data. Newer data were weighted (w) larger than previous data, as newer data are considered to have more significant foreground information than other data. The equation used to model the background image (B) in the Weighted Moving Mean algorithm [27]

4) Single Gaussian
The Gaussian algorithm was first introduced by [ Px, y, i is the intensity value of the pixel in position x, y at time i. After that, pixels that are considered as foreground are pixel values that meet the rule: with c being the value of a certain constant. A pixel considered as foreground was assigned a value of 1, and otherwise the pixel was considered background area and given a value of 0.

D. Morphological Operation
The outputs of the background subtraction process were foreground masks in the form of a binary image that represented moving pixels in the video. The resulting foreground images still had noises and sometimes the moving sperm objects extracted were not intact; they were divided into two or more parts. The solutions that were implemented to overcome these problems are morphological operations. The morphological operations performed in this study were opening operation followed by the closing operation. In this study, the elemental structure used in all morphological operations had an elliptical shape with a kernel size of 5×5.

E. Visualization and validation of Sperm Detection Results
In the previous process, morphological operation successfully eliminated noises that arose from the foreground separation process from the background and refined the extracted sperm forms, so binary images that represented moving sperms could be obtained. Any blob on a binary image was a representation of a moving sperm object. From this figure, sperm objects were detected based on the contour, so the contour shape, the contour area, and the midpoint of the sperm position on the frame can be determined. Each detected sperm was given a bounding box, and the number of sperm on the original frame of the video was calculated, so it can be seen whether the system had succeeded in detecting sperms.
The result validation was conducted by comparing the results of moving sperms from each algorithm tried with ground truth images, which were the result of the manual observation of the location of sperm location moving in the video frame. The results of the comparison were then analyzed using receiver operating characteristic, so the validation level of each algorithm tested could be determined.
A ground truth image in this research is an image that contains information about the real area of the moving sperm object in a frame of sperm data video. The ground truth images were obtained by manually observing the regions in video frames that contain moving sperm objects.
To make sure the area did have moving sperm objects, then the 10 frames before and 10 frames after the frames, from which the ground truth images were made, were observed. For example, a 30th frame truth frame image was created by observing sperm movement from the 20th frame up to the 40th frame of the video. The area where there was a moving sperm object was marked by assigning a 255 (white) pixel value, while an area that does not have a moving sperm object was characterized by giving a 0 (black) pixel value. This step formed ground truth images that served as reference to the testing process of sperm count detection and calculation.
The detection results of each algorithm were then compared with the ground truth images, so there were three possible values: True Positive (TP), False Negative (FN), and False Positive (FP) [29]. True Positive (TP) applies to sperms that exist and detected as existing, False Positive (FP) is given for existing sperms but detected as not existing, and False Negative (FN) indicates sperms that did not exist but were detected. The next step was to calculate the precision, recall, and f-measure values, with equations (7), (8), (9) precision.recall precision + recall (9)

IV. Results and Discussion
The results of the research include preprocessing, background subtraction process, morphological operation process, and sperm detection and calculation testing results. The testing process was done by comparing the results of detection and calculations of sperm with ground truth images of moving sperm objects, which were then analyzed using receiver operating characteristic.

A. Preprocessing Result
Preprocessing in this study used the Gaussian filter with a kernel size of 5 × 5 units. The inputs of preprocessing were video frames of the observed semen liquid. Examples of frames of sperm video data used and the results of preprocessing can be seen in Figure 3.
The results of preprocessing can be seen in Figures 3.b and 3.d. The preprocessing process aims to remove white noise from the camera, blur the image, and reduce the detail of the image.

B. Background Subtraction Results
The results of the background subtraction process were foreground masks, binary images that represent moving pixels in the video. In this study, foreground mask represents a moving sperm object and the researchers have tested some subtraction background algorithms in detecting moving sperms. From the results of the tests, the researchers obtained the results shown in Figure 4   shows the results of foreground mask Frame Difference algorithm. It can be seen in the yellow boxes that the detected sperm look divided into several parts, and there are noises around the detected sperm. This also occurred to all detected moving sperms. In the foreground mask images above, a detected moving sperm object could be divided into two parts, namely the sperm head and tail. The area of the sperm head is further divided into two. Noises also appeared in other areas on the frame, not just around the moving sperm region. In the red boxes, it can be seen that moving background objects were also detected. The background objects detected were also divided into sections like the moving sperm objects. However, it was the background object movements that were detected.

C. Morphological Operation Results
The Morphological Operations conducted consisted of a Opening Operation followed by a Closing Operation, or successively, erosion-dilation-dilation-erosion. Opening operation aims to eliminate the noises that appeared in the foreground images from the background subtraction process and reverted the object shapes, which were altered after the noise elimination (erosion) process. The Closing operation aims to cover small holes in objects, connect separate sperm forms, and perfect the shape of the detected moving sperms. The input of the morphological operation process was the foreground mask resulting from the background subtraction process, which was done because the image had noises, and sometimes the moving sperm objects extracted incompletely were divided into two or more parts. The results from morphological operation were a foreground masks in which the noises had been removed, and the detected sperm objects were intact, so each BLOB (binary large object) that existed became a representation of a moving sperm object in the video frame.

D. Ground Truth Image Results
The ground truth images were obtained by manually observing the regions in video frames that contain moving sperm objects. These ground truth images were used as comparison of the results of sperm detection and calculation. To ensure that the area did have moving sperm objects, then the 10 frames before and 10 frames after the frames, from which the ground truth images were made, were observed. For example, a 30th frame truth frame image was created by observing sperm movement from the 20th frame up to the 40th frame of the video. Figure 5 shows sample frames of the sperm video data used, namely frame 30 (a) and frame 60 (c), as well as the results of preprocessing.

E. Sperm Detection and Calculation Testing
After going through the morphological operation process, the researchers assumed that the foreground mask formed had no noise, and the separated sperm objects had been reconnected. Each BLOB in the foreground mask was a representation of a moving sperm object. For visualization purposes, each BLOB that was formed were detected based on its contour so that its contour shape, total contours, and the location of the midpoint of each moving sperm object could be determined. From this information, any detected moving sperm on the original frame of the video was given a bounding box and sequence, so it can be seen whether the system had succeeded in detecting and calculating sperm.
The sperm detection and calculation result testing was done by manually comparing the results of detection and calculation of sperm with ground truth images of moving sperm objects, which were the results of manual observation. This comparison was done for 10× by taking the detection results for every 30 frames of the video, so the sequence of the frames analyzed became: 30, 60, 90, 120, 150, 180, 210, 240, 270, and 300. The results of the comparison were then analyzed using ROC  Table 1 is the test result of the five algorithms tested, but only three are displayed that have the highest fmeasure values. The ABL algorithm has the best results compared to other algorithms, as seen in frame 30. For experts' detection and calculation, the number of sperms are 13 sperms that move, while the results of testing on the ABL algorithm detected the number of sperm is 13 (TP), there are 0 (zero) value (FP) for nonexistent but detected sperm, and there is 1 value for existent but not detected sperm (FN). When compared to the FD algorithm, the difference is in the FN value, that is, the number of present but not detected sperm is 0.
The results are in table 2. The results of precision, recall, and f-measure of each background subtraction algorithm used in this study can be seen in Table 1.   Figure 6 above show that from the five background subtraction algorithms tested, the adaptive background learning (ABL) algorithm has the highest f-measure value, 0.9205, meaning that the main problem in sperm detection is the moving background object, both in background detection and foreground mask. Whereas in other algorithms, moving background objects are still detected as foreground which will affect the detection results of moving sperm objects. The foreground result of the ABL algorithm also has some noise. However, sperm shape can be better extracted than other algorithms. This shows that the ABL algorithm is suitable for the background subtraction process in detecting sperm objects.

V. Conclusion
Results of research on human sperm detection and calculation using the basic method background subtraction and Statistical Method background subtraction algorithms showed that the Adaptive Background Learning algorithm in background subtraction process can be used to detect and calculate moving sperm objects in a video with foreground results which have little noise, moving background objects in the video which are not detected as foreground objects, and sperm forms that can be extracted more perfectly. From the results of tests that have been done, detection and calculation of moving sperms using the Adaptive Background Learning algorithm produced an f-measure value of 0.9205. This result is the highest value compared with the other background subtraction algorithms tested. This shows that the Adaptive Background Learning algorithm is suitable for use in cases of detection and calculation of moving sperm and has successfully anticipated the challenges and benefits. This shows that the basic model background subtraction can also be used in cases of moving sperm detection and calculation.