Next Article in Journal
Recent Contributions of Some Fields of the Electronics in Development of Forest Operations Technologies
Previous Article in Journal
A Loose-Coupled Fusion of Inertial and UWB Assisted by a Decision-Making Algorithm for Localization of Emergency Responders
Previous Article in Special Issue
Fake News Analysis Modeling Using Quote Retweet

Electronics 2019, 8(12), 1464; https://doi.org/10.3390/electronics8121464

Article
StoolNet for Color Classification of Stool Medical Images
by Ziyuan Yang 1,2, Lu Leng 1,* and Byung-Gyu Kim 3,*
1
School of Software, Nanchang Hangkong University, Nanchang 330063, China
2
School of Information Engineering, Nanchang University, Nanchang 330031, China
3
Department of IT Engineering, Sookmyung Women’s University, Seoul 04310, Korea
*
Authors to whom correspondence should be addressed.
Received: 9 November 2019 / Accepted: 24 November 2019 / Published: 2 December 2019

Abstract

:
The color classification of stool medical images is commonly used to diagnose digestive system diseases, so it is important in clinical examination. In order to reduce laboratorians’ heavy burden, advanced digital image processing technologies and deep learning methods are employed for the automatic color classification of stool images in this paper. The region of interest (ROI) is segmented automatically and then classified with a shallow convolutional neural network (CNN) dubbed StoolNet. Thanks to its shallow structure and accurate segmentation, StoolNet can converge quickly. The sufficient experiments confirm the good performance of StoolNet and the impact of the different training sample numbers on StoolNet. The proposed method has several advantages, such as low cost, accurate automatic segmentation, and color classification. Therefore, it can be widely used in artificial intelligence (AI) healthcare.
Keywords:
StoolNet; convolutional neural network; color classification; stool medical image

1. Introduction

The advantages of artificial intelligence (AI) have brought many achievements to the healthcare field in both industry and academia [1]. For example, in recent years, as a research hotspot, convolutional neural networks (CNN) have been used in healthcare to automatically diagnosis diseases [2]. For AI healthcare, clinical examination is critical in diagnosing and reducing diseases. Digestive system diseases are terribly harmful to people’s health. For instance, among the different kinds of cancers, the incidence and mortality of stomach cancer rank fifth and third, respectively, in the world [3]. As an important clinical examination, stool examination can effectively diagnose and prevent digestive system diseases. Actually, stool color can reflect lots of patients’ conditions in the digestive system. Unfortunately, the current stool color examination heavily depends on laboratorians’ sophisticated professional skills.
Some researchers have studied human stools based on biotechnology [4]. However, an accurate automatic analysis system for stool color based on computer technologies is still absent [5]. Currently, many clinical diagnosis technologies are designed based on digital medical images, so it is significant to improve the quality of medical images [6] to accurately diagnose diseases based on medical images [7]. X-ray [8], computed tomography [9], and ultrasonic images [10] can generate many important medical images that can be used for disease diagnosis.
Stool examination has two modes, namely appearance examination and microscopic examination. Color and trait are two important attributes in stool appearance examination. The results of color examination can be used for disease diagnosis, such as dysentery, enteritis, rectal diseases, and tumors. Sharp et al. [11] compared different examination methods of stool microbial detection. Tchiotsop et al. [12] detected intestinal parasites in microscopic stool samples using multi-scale wavelet transform.
Most laboratorians still use manual stool examination. The smell of stool samples is extremely unpleasant, so some laboratorians are not willing to do stool examinations. In addition, in manual examinations, laboratorians need to be close to the samples, which definitely increases the risk of cross-infection. Although stool examination is pretty important, it requires some professional skills. Piekkala et al. [13] invited 52 patients to join their experiments. The patients were asked to test fecal calprotectin at home by themselves monthly and the entire experiments lasted for six months. Of the patients, aged between five and 18 years, 67% completed the study and 197 home tests were performed. Of these, 15% of the tests failed due to technical reasons.
In many fields of healthcare, computer vision technologies have been used to solve different medical problems. Rundo et al. [14] proposed an electrocardiogram (ECG) pipeline using an innovative bio-inspired system implemented by the cellular neural network (CNN). Gao et al. [15] propose a corner detection method based on hierarchical textures for 2D images and the classification results were better than those of the state-of-the-art classification methods based on brain medical images. Chen and You [16] applied traditional classification methods to classify benign and malignant thyroid tumors on ultrasonic images. Opbroek et al. [17] proposed an investigative kernel learning method and a novel image weighting method to reduce the differences between training and testing data. They found that combining image weighting and kernel learning could give a small additional improvement in classification performance on brain tissue.
In recent years, CNNs have achieved remarkable success in many important tasks of computer vision, such as classification [18], detection [19], and recognition [20]. The features of CNN are self-learned, so they are more recognizable and more robust than hand-crafted features. However, the major disadvantage of deep learning is that it requires a large number of training data, so the advantages of CNN were not fully shown until ImageNet [21] was completed. After the dataset came out, CNN gained remarkable precision compared to traditional methods [22,23,24]. Razzak et al. surveyed the overview, challenges, and future of deep learning for medical image processing. They also claim that CNN has been used in the interdisciplinary fields of computer science and healthcare [25]. Lee et al. [26] used CNN to automatically classify the tympanic membrane images. CNN was applied to create a detector that is able to automatically detect the anatomical structure presented in a brain magnetic resonance image [27]. Khawaldeh et al. [28] used CNN to judge whether brain medical images are healthy. Anatomically constrained neural networks (ACNNs) [29] were proposed to incorporate prior knowledge of CNN-based segmentation. This framework is a new regularization model that is trained end-to-end and encourages models to follow the global anatomical properties of the underlying anatomy. Hachuel et al. [30] proposed a deep learning method for human stool recognition and characterization in macroscopic images and they achieved good performance.
Although AI healthcare is a research hotspot, the stool appearance examination based on AI is absent. If AI technologies, including image processing, pattern recognition, deep learning, and so on, can be applied in this field, the capital cost, labor cost, and safety will be greatly improved. Because stool samples contain patients’ private information, it is difficult to collect a large number of samples. Due to the scarcity of a stool classification dataset, we tried to collect a dataset for scientific research with the consent of patients, their families, and their hospitals. The collected samples have high research values that are marked by professional doctors.
In the proposed methodology framework, the images are preprocessed first to localize and segment the region of interest (ROI). After that, the preprocessed images are input into the classifier, an effective shallow CNN named StoolNet. The background was already masked, so StoolNet could learn enough features with a shallow structure. Sufficient experiments confirm the effectiveness of the preprocessing method, the performance of StoolNet, and the impact of different training sample numbers on StoolNet.
The main contributions of this paper are as follows:
  • The current stool color examination heavily depends on the medical laboratorians’ professional skills. We first focus on this important factor and propose a lightweight, practical, and efficient automatic color classification method to remarkably alleviate burdens on medical laboratorians.
  • The developed preprocessing method can automatically and accurately segment the effective stool region. The designed model, namely StoolNet, can converge well and automatically and accurately classify the stool color.
In this paper, Section 2 introduces the whole framework including the preprocessing method and StoolNet. The experimental results are shown in Section 3. Conclusions and future works are discussed in Section 4.

2. Proposed Method

2.1. Overview of the Proposed Method

The proposed framework is based on digital image processing and CNN, so it not only solves the problem of cross-infection in manual mode but also greatly reduces the heavy burden of manual stool examination. In this paper, neither chemical nor physical processing methods are necessary to deliberately enlarge the stool characteristics. In order to reduce costs, stool samples are classified directly based on the features in original images.
The whole framework consists of two parts, preprocessing and classification. The original images are preprocessed by an automatic segmentation algorithm. The classification mechanism is named StoolNet and is an effective shallow CNN. The experiments show that the accuracy of StoolNet can reach 100% after only a few iterations. And the whole framework is shown in Figure 1.

2.2. Preprocessing Stage

Due to the particularity of stools, sample shapes cannot be fixed. The irregular shapes are very likely to lead to incorrect and inaccurate ROI localization and degrade classification accuracy. An effective and efficient method [31] was developed to segment the stool region from the original images. Six features were tested and represented in grayscale maps, as shown in Figure 2. According to our sufficient investigation and analysis, the discrimination between stool and background is relatively high in saturation maps.
The main purpose of preprocessing is to get the ROI correctly and accurately. Whether the ROI is correct and accurate directly affects the performance of the latter classification algorithm. It is a simple, quick, and efficient way to segment ROI based on a threshold. The threshold segmentation operation is
f ( x ,   y ) = { 1 ,   g ( x ,   y ) < T 0 ,   g ( x ,   y ) T
where f ( x ,   y ) labels the foreground and background pixels and g ( x , y ) represents the pixel values in the original image. T is a threshold value to binarize the image. The pixels with lower, higher, or equal values than T are classified as background or foreground pixels.
An adaptive algorithm is employed to optimize the threshold value for accurate segmentation. Once the optimal threshold is obtained, the difference between the background and foreground regions are maximized. The goal is to maximize inter-class variance with
w 0 = N 0 M × N
where w 0 is the proportion of the number of foreground pixels to the total number of all the pixels in the image. N 0 is the number of foreground pixels. The size of the image is M × N according to
w 1 = N 1 M × N
where w 1 is the proportion of the number of background pixels to the total number of all the pixels in the image. N 1 is the number of background pixels. Also, the size of the image is M × N according to
N 1 + N 0 = M × N
where N 0 and N 1 should satisfy Formula 4, i.e., their sum should be equal to the total number of all the pixels in the image. In
w 0 + w 1 = 1
where w 0 and w 1 should satisfy Equation (5), their sum should be equal to 1. In
μ = w 0 × μ 0 + w 1 × μ 1
where μ is the average grayscale of the whole image, μ 0 and μ 1 are the average values of foreground and background pixels, respectively. In
g = w 0 × ( μ 0 μ ) 2 + w 1 × ( μ 1 μ ) 2
where g is the inter-variance between foreground and background regions, it can be given as
g = w 0 × w 1 × ( μ 0 μ 1 ) 2
where Equation (6) is substituted into Equation (7) to obtain Equation (8).
For all possible values of T , we selected the value that maximizes g in Equation (8). The algorithm is performed to extract the ROI candidates from the six color components, as shown in Figure 3. Saturation is the best feature for foreground segmentation among the six color features.
The target is labeled with the foreground region in the binary image, shown in Figure 4.

2.3. StoolNet

There are four different colors for stool medical examination, namely brown, black, yellow, and green. An effective shallow CNN is carefully designed for color classification and is named StoolNet. The structure of the proposed StoolNet is shown in Figure 5.
The input of StoolNet has been preprocessed, so background information is eliminated. The input is resized to 200   ×   200 . The sizes of convolutional kernels are 5   ×   5 and the stride is 1. All of the activation functions in StoolNet are ReLU. The ReLU formula is
f ( x ) = { 0 ,   x 0 x ,   x > 0
The dropout method is used in every layer. The loss function is the cross-entropy and the stochastic gradient descent (SGD) is used to update weights. The loss function is defined as
L = 1 M k = 1 M i = 0 N 1 y i , k logp i , k
where M and N are the numbers of samples and classes, respectively. y i , k is the true label of the k -th sample if the sample has the i -th label y i , k = 1, otherwise it is y i , k =0. p i , k is the probability of the i -th label of the k -th sample.
A benefit of the preprocessing stage is that the background is masked and, hence, the input of StoolNet has more discrimination than its corresponding original image. Since the number of classes is only four, a shallow structure is enough to achieve a satisfactory classification performance. The sufficient experiments in Section 3 will prove that the accuracy would not always be higher when the depth is deeper. Therefore, a suitable and reasonable depth is a key question for classification tasks. In addition, another advantage of a shallow structure is low computational complexity. Considering the balance between the accuracy and the computational complexity, StoolNet is a good choice for meeting these requirements. Accordingly, this indicates that StoolNet can be applied to several healthcare commercial applications.

3. Experiments

The experimental environment was configured with an Intel Xeon E-2136 CPU @3.30GHz, 16GB internal storage, NVIDIA Quadro P4000 GPU, and a Windows 10 64-bit operating system. The resolution of images in the self-collected dataset was 640 × 480 pixels. The proposed method and testing were implemented using a Tensorflow deep learning framework [32]. The preprocessing codes were programmed in MATLAB R2016a, Mathworks, US. The network related codes, including the sample random selection for training sets and testing sets, were written in Python. The Python compiler was Spyder. Important to training our network was the learning rate set at 0.001, max iteration set at 120, and batch size set at 32.
Stool color classification is not an open problem and there is no public database. It is very difficult to collect a stool image dataset because of privacy problems. Even though stool color classification is very important for healthcare, few researchers foray into this field because of the particularity of stool samples. We collected a stool images dataset, with the collaboration of a hospital and medical institution, containing 110 images. All sample images were carefully labeled by professional doctors, so we believe the conclusions were drawn from reliable medical results. The images were rotated three times and the total number was 440 images. According to our study, this article is the first paper on stool color classification. Since stool color classification is a particular field, StoolNet cannot be compared with other methods, but sufficient experiments can solidly confirm the effectiveness and efficiency of the proposed method.
The proportion of data used to train the network was set to three ratios, 75%, 50%, and 25% and the rest of the data were used for testing. In order to reduce the effect of the training sample quality, the experiments were repeated five times. In each experiment session, the training and testing samples were randomly selected in a prescribed ratio. Figure 6 shows the accuracy and loss curves in training sets and testing sets. Because the network is an effective shallow CNN and the inputs of the network are preprocessed, StoolNet can converge to get a good classification result in several epochs in three prescribed ratios.
The accuracy of Group 5 in (d) of Figure 6 is fairly constant until 10 epochs and the main reason is that CNN is a probability model. However, there is not a remarkable change in loss until 10 epochs, as shown in Figure 7. CNN is a probability model containing a certain randomness, so it is possible that the weights are not properly adjusted, which results in fairly constant loss and accuracy.
When the training sample proportion is not large enough, the speed of learning features are slower. It can be concluded that the fewer samples used to train the network, the slower the convergence speed will be. In order to confirm the effect of the preprocessing method, the same experiments are performed on the dataset that is not preprocessed. The results are shown in Figure 8. No matter how many samples are used for training, it is difficult to converge and the oscillation is remarkably violent.
Table 1 shows the numbers of convergence epochs on training sets with different training sample proportions and their averages. Experiments with and without preprocessing were both performed. * means the dataset was preprocessed. Our good preprocessing method can greatly accelerate the convergence speed. The numbers of convergence epochs were recorded when the accuracy reached 100%.
StoolNet can achieve remarkable performance in training sets, but different training sample proportions can greatly impact the results in testing sets, as shown in (b), (d), and (f) of Figure 6 and in (b), (d), and (f) of Figure 7.
Table 2 intuitively reveals the impact of training sample proportions on the accuracy. * means the dataset was preprocessed. The preprocessing method can remarkably improve the accuracy. Thus the preprocessing method in this paper is necessary to improve the performance of StoolNet.
The average accuracies of five groups with different training sample proportions were calculated and are shown in Figure 9. The network can learn more information and features with more training samples. Thus, the larger the training sample number is, the lower the epoch number is.
Figure 10 reveals the relationship between the network depth and its classification ability. The results show that “deeper is not always better”, so the depth of StoolNet was set to two in terms of accuracy and efficiency.
StoolNet was compared with the method proposed in [30]. The results are shown in Figure 11. Five groups were tested on the preprocessed images. Lightweight StoolNet was able to converge in each group, while the method in [30] could not converge well. This is because the structure of the convolutional layers of StoolNet is simpler than that of the method in [30], so StoolNet has a better converge performance on a small training set.
Actually, most medical equipment for collecting stool images can properly control illumination. However, illumination conditions could be different and could change the color appearance of stool. Since the structure of StoolNet is light, a small- or medium-sized dataset under certain illumination can be conveniently used to train StoolNet. We would like to simulate the effect on different illumination scales. The illumination intensity is enlarged or reduced if the illumination scale is larger or less than 1, as shown in Figure 12.
There are two stages of the proposed method, namely preprocessing and StoolNet. Preprocessing is based on the inter-variance between the foreground and the background and is slightly affected by illumination. The foreground and background pixels are labeled as 1 and 0 in the segmentation mask images. The dissimilarity between the original segmentation mask image, denoted as I 1 , and another one under different illumination, denoted as I 2 , is measured with the Hamming distance, denoted as D, and computed as follows:
g ( x , y ) = { 0 ,   I 1 ( x ,   y ) = I 2 ( x , y ) 1 ,   I 1 ( x , y ) I 2 ( x , y )
where ( x ,   y ) is the coordinate and
D = x = 1 m y = 1 n g ( x , y ) m × n
where m and n are the width and height of the image, respectively.
Table 3 shows the average Hamming distances between the original segmentation mask image and the others under different illuminations. The dissimilarities are all small, so the preprocessing is slightly affected by illumination change.
The proliferated samples with a certain illumination scale are conveniently used to train StoolNet. Table 4 shows that all the trained StoolNets under different illumination conditions have good classification performance, so the StoolNet model is robust in different illumination environments.

4. Conclusions and Future Work

This paper concerns stool color classification, which has not been extensively studied but is a very important field in healthcare. We collected stool images to establish a dataset for appearance detection. The accuracy of the developed classification algorithm was shown to reach 97.5%. Sufficient experiments revealed the relationship between the training sample proportion and accuracy, the relationship between the training sample proportion and the epoch, as well as the relationship between network depth and classification ability. The proposed framework can basically meet the requirements of business and application, but more experiments should be designed to test the robustness of the algorithm in future works. In addition, we will try to continue collecting more stool images to enlarge the dataset scale and further improve our method.

Author Contributions

Methodology, data curation, formal analysis and writing—original draft preparation, Z.Y.; Conceptualization, resources, investigation, software, funding acquisition, and project administration, L.L.; Validation, visualization, and writing—review & editing, B.-G.K.

Funding

This research was funded by National Natural Science Foundation of China under Grant 61866028, Grant 61763033, Grant 61662049, Grant 61663031, and Grant 61866025, Foundation of China Scholarship Council under Grant CSC201908360075, Key Program Project of Research and Development (Jiangxi Provincial Department of Science and Technology) under Grant 20171ACE50024 and Grant 20161BBE50085, Construction Project of Advantageous Science and Technology Innovation Team in Jiangxi Province under Grant 20165BCB19007, Application Innovation Plan (Ministry of Public Security of P. R. China) under Grant 2017YYCXJXST048, Open Foundation of Key Laboratory of Jiangxi Province for Image Processing and Pattern Recognition under Grant ET201680245 and Grant TX201604002.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Marques, G.; Pitarma, R.; Garcia, N.M.; Pombo, N. Internet of Things Architectures, Technologies, Applications, Challenges, and Future Directions for Enhanced Living Environments and Healthcare Systems: A Review. Electronics 2019, 8, 1081. [Google Scholar] [CrossRef]
  2. Gil-Martin, M.; Montero, J.M.; San-Segundo, R. Parkinson’s Disease Detection from Drawing Movements Using Convolutional Neural Networks. Electronics 2019, 8, 907. [Google Scholar] [CrossRef]
  3. Bray, F.; Ferlay, J.; Soerjomataram, I.; Siegel, R.L.; Torre, L.A.; Jemal, A. Global Cancer Statistics 2018: GLOBOCAN Estimates of Incidence and Mortality Worldwide for 36 Cancers in 185 Countries. CA Cancer J. Clin. 2018, 68, 394–424. [Google Scholar] [CrossRef] [PubMed]
  4. Casavant, E.P.; Dethlefsen, L.; Sankaran, K.; Sprockett, D.; Holmes, S.; Relman, D.A.; Elias, J. Strategies for understanding Dynamic, Personalized Profiles of Host-Derived Proteins and Microbes from Human Stool. bioRxiv 2019, 551143. [Google Scholar] [CrossRef]
  5. Ahad, A.; Tahir, M.; Yau, K.A. 5G-Based Smart Healthcare Network: Architecture, Taxonomy, Challenges and Future Research Directions. IEEE Access 2019, 7, 100747–100762. [Google Scholar] [CrossRef]
  6. Zhao, C.Y.; Wang, Z.Q.; Li, H.Y.; Wu, X.Y.; Qiao, S.; Sun, J.N. A New Approach for Medical Image Enhancement Based on Luminance-Level Modulation and Gradient Modulation. Biomedical Signal Process. Control 2019, 48, 189–196. [Google Scholar] [CrossRef]
  7. Shen, T.; Wang, Y. Medical Image Segmentation Based on Improved Watershed Algorithm. In Proceedings of the IEEE Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Chongqing, China, 12–14 October 2018; pp. 1695–1698. [Google Scholar]
  8. Huang, C.C.; Nguyen, M.H. X-Ray Enhancement Based on Component Attenuation, Contrast Adjustment, and Image Fusion. IEEE Trans. Image Process. 2019, 28, 127–141. [Google Scholar] [CrossRef]
  9. Higaki, T.; Nakamura, Y.; Tatsugami, F.; Nakaura, T.; Awai, K. Improvement of Image Quality at CT and MRI using Deep Learning. Jpn. J. Radiol. 2019, 37, 73–80. [Google Scholar] [CrossRef]
  10. Xue, Y.M.; Liu, P. Medical Ultrasonic Images Denoising and Enhancement. Investig. Clin. 2019, 60, 728–738. [Google Scholar]
  11. Sharp, S.E.; Suarez, C.A.; Duran, Y.; Poppiti, R.J. Evaluation of the Triage Micro Parasite Panel for Detection of Giardia Lamblia, Entamoeba Histolytica/Entamoeba Dispar, and Cryptosporidium Parvum in Patient Stool Specimens. J. Clin. Microbiol. 2001, 39, 332–334. [Google Scholar] [CrossRef]
  12. Tchiotsop, D.; Tchinda, B.S.; Tchinda, R.; Kenne, G. Edge Detection of Intestinal Parasites in Stool Microscopic Images Using Multi-scale Wavelet Transform. Signal Image Video Process. 2015, 9, 121–134. [Google Scholar] [CrossRef]
  13. Piekkala, M.; Alfthan, H.; Merras-Salmio, L.; PuustinenWikström, A.; Heiskanen, K.; Jaakkola, T.; Klemetti, P.; Färkkilä, M.; Kolho, K. Fecal Calprotectin Test Performed at Home: A Prospective Study of Pediatric Patients with Inflammatory Bowel Disease. J. Pediatric Gastroenterol. Nutr. 2018, 66, 926–931. [Google Scholar] [CrossRef] [PubMed]
  14. Rundo, F.; Conoci, S.; Ortis, A.; Battiato, S. An Advanced Bio-inspired PhotoPlethymoGraphy (PPG) and ECG Pattern Recognition System for Medical Assessment. Sensors 2018, 18, 405. [Google Scholar] [CrossRef] [PubMed]
  15. Gao, L.; Pan, H.; Han, J.; Xie, X.; Zhang, Z.; Zhai, X. Corner Detection and Matching Methods for Brain Medical Image Classification. In Proceedings of the IEEE International Bioinformatics and Biomedicine (BIBM), Shenzhen, China, 15–18 December 2016; pp. 475–478. [Google Scholar]
  16. Chen, J.; You, H. Efficient Classification of Benign and Malignant Thyroid Tumors based on Characteristics of Medical Ultrasonic Images. In Proceedings of the IEEE Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC), Xi’an, China, 3–5 October 2016; pp. 950–954. [Google Scholar]
  17. Opbroek, A.V.; Achterberg, H.C.; Vernooij, M.W.; De Bruijne, M. Transfer Learning for Image Segmentation by Combining Image Weighting and Kernel Learning. IEEE Trans. Med. Imaging 2019, 38, 213–224. [Google Scholar] [CrossRef] [PubMed]
  18. Lin, C.J.; Lin, C.H.; Sun, C.C.; Wang, S.H. Evolutionary-Fuzzy-Integral-Based Convolutional Neural Networks for Facial Image Classification. Electronics 2019, 8, 997. [Google Scholar] [CrossRef]
  19. Cui, G.; Wang, S.; Wang, Y.; Liu, Z.; Yuan, Y.; Wang, Q. Preceding Vehicle Detection Using Faster R-CNN Based on Speed Classification Random Anchor and Q-Square Penalty Coefficient. Electronics 2019, 8, 1024. [Google Scholar] [CrossRef]
  20. Nonis, F.; Dagnes, N.; Marcolin, F.; Vezzetti, E. 3D Approaches and Challenges in Facial Expression Recognition Algorithms—A Literature Review. Appl. Sci. 2019, 9, 3904. [Google Scholar] [CrossRef]
  21. Olga, R.; Deng, J.; Su, H.; Krause, J.; Satheesh, S.; Ma, S.; Huang, Z.H.; Karpathy, A.; Khosla, A.; Bernstein, M.; et al. ImageNet Large Scale Visual Recognition Challenge. Int. J. Comput. Vis. 2015, 115, 211–252. [Google Scholar]
  22. Simonyan, K.; Zisserman, A. Very Deep Convolutional Neural Networks for Large-scale Image Recognition. arXiv 2014, arXiv:abs/1409.1556. Available online: https://arxiv.org/abs/1409.1556 (accessed on 9 November 2019). [Google Scholar]
  23. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
  24. Iandola, F.; Moskewicz, M.; Karayev, S.; Girshick, R.; Darrell, T.; Keutzer, K. DenseNet: Implementing Efficient ConvNet Descriptor Pyramids. arXiv 2014, arXiv:abs/1404.1869. Available online: https://arxiv.org/abs/1404.1869 (accessed on 9 November 2019). [Google Scholar]
  25. Razzak, M.I.; Naz, S.; Zaib, A. Deep Learning for Medical Image Processing: Overview, Challenges and the Future. Classif. BioApps 2018, 26, 323–350. [Google Scholar]
  26. Lee, J.Y.; Choi, S.; Chung, J.W. Automated Classification of the Tympanic Membrane Using a Convolutional Neural Network. Appl. Sci. 2019, 9, 1827. [Google Scholar] [CrossRef]
  27. Sugimori, H.; Kawakami, M. Automatic Detection of a Standard Line for Brain Magnetic Resonance Image Using Deep Learning. Appl. Sci. 2019, 9, 3849. [Google Scholar] [CrossRef]
  28. Khawaldeh, S.; Pervaiz, U.; Rafiq, A.; Alkhawaldeh, R.S. Noninvasive Grading of Glioma Tumor Using Magnetic Resonance Imaging with Convolutional Neural Networks. Appl. Sci. 2018, 8, 27. [Google Scholar] [CrossRef]
  29. Oktay, O.; Ferrante, E.; Kamnitsas, K.; Heinrich, M.; Bai, W.; Caballero, J.; Cook, S.A.; De Marvao, A.; Dawes, T.; O‘Regan, D.P.; et al. Anatomically Constrained Neural Networks (ACNNs): Application to Cardiac Image Enhancement and Segmentation. IEEE Trans. Med Imaging 2018, 37, 384–395. [Google Scholar] [CrossRef]
  30. Hachuel, D.; Jha, A.; Estrin, D.; Martinez, A.; Staller, K.; Velez, C. Augmenting Gastrointestinal Health: A Deep Learning Approach to Human Stool Recognition and Characterization in Macroscopic Images. arXiv 2019, arXiv:Abs/1903.10578. Available online: https://arxiv.org/abs/1903.10578 (accessed on 9 November 2019). [Google Scholar] [CrossRef]
  31. Ostu, N. A Threshold Selection Method from Gray Level Histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–69. [Google Scholar]
  32. Abadi, M. TensorFlow: Learning Functions at Scale. ACM Sigplan Not. 2016, 51, 1. [Google Scholar] [CrossRef]
Figure 1. The whole framework.
Figure 1. The whole framework.
Electronics 08 01464 g001
Figure 2. Six color features of a stool image.
Figure 2. Six color features of a stool image.
Electronics 08 01464 g002
Figure 3. Segmentation images by the optimal thresholding method.
Figure 3. Segmentation images by the optimal thresholding method.
Electronics 08 01464 g003
Figure 4. The framework of preprocessing.
Figure 4. The framework of preprocessing.
Electronics 08 01464 g004
Figure 5. The structure of StoolNet. The strides of all convolutional layers are 1. “MP” means max pooling layer, the strides of all pooling layers are 2, and the sizes of kernels are 2 × 2 . “FC” means fully connected layer.
Figure 5. The structure of StoolNet. The strides of all convolutional layers are 1. “MP” means max pooling layer, the strides of all pooling layers are 2, and the sizes of kernels are 2 × 2 . “FC” means fully connected layer.
Electronics 08 01464 g005
Figure 6. Accuracy curves of StoolNet with different training sample proportions.
Figure 6. Accuracy curves of StoolNet with different training sample proportions.
Electronics 08 01464 g006
Figure 7. The loss of Group 5 in (d) of Figure 6.
Figure 7. The loss of Group 5 in (d) of Figure 6.
Electronics 08 01464 g007
Figure 8. Accuracy without preprocessing.
Figure 8. Accuracy without preprocessing.
Electronics 08 01464 g008
Figure 9. Average accuracies.
Figure 9. Average accuracies.
Electronics 08 01464 g009
Figure 10. Relationship between depth and accuracy.
Figure 10. Relationship between depth and accuracy.
Electronics 08 01464 g010
Figure 11. Relationship between loss and epoch.
Figure 11. Relationship between loss and epoch.
Electronics 08 01464 g011
Figure 12. The generated samples under different illumination conditions. (a) is the original image, (bk) are the samples under the illumination scales range [0.5, 1.5] except 1 and with the stride 0.1.
Figure 12. The generated samples under different illumination conditions. (a) is the original image, (bk) are the samples under the illumination scales range [0.5, 1.5] except 1 and with the stride 0.1.
Electronics 08 01464 g012
Table 1. Numbers of convergence epochs.
Table 1. Numbers of convergence epochs.
Group 1Group 2Group 3Group 4Group 5Average
25% training481818262727.4
25% training * 182618211619.8
50% training203830222426.8
50% training *101311242416.4
75% training262513284126.6
75% training *8138778.6
Table 2. Accuracies in testing sets.
Table 2. Accuracies in testing sets.
Group 1Group 2Group 3Group 4Group 5Average
25% training0.62500.75000.87500.62500.75000.7250
25%training *0.81250.81250.71880.75000.71880.7625
50% training0.93750.93750.81250.87500.93750.9000
50%training *0.93750.84380.81250.87500.84380.8625
75% training0.87501.00000.93750.87500.81250.9000
75%training *0.96881.00000.96880.93751.00000.9750
Table 3. Hamming distances between the original segmentation mask image and the others under different illuminations scales.
Table 3. Hamming distances between the original segmentation mask image and the others under different illuminations scales.
Illumination ScaleYellowBrownBlackGreen
0.50.00430.00720.02980.0072
0.60.00350.00600.03100.0058
0.70.00330.00540.01940.0052
0.80.00260.00470.02120.0045
0.90.00290.00480.01390.0047
1.10.00260.00400.01120.0040
1.20.00250.00350.00860.0040
1.30.00390.00500.01590.0055
1.40.00670.00790.01980.0080
1.50.01310.01560.04100.0189
Table 4. Accuracies in different illumination environments (unit %).
Table 4. Accuracies in different illumination environments (unit %).
Illumination ScaleGroup 1Group 2Group 3Group 4Group 5Average
0.590.63100.0093.7593.7596.8895.00
0.696.8896.88100.0093.7593.7596.25
0.7100.0093.75100.0093.75100.0097.50
0.896.8893.7596.8890.6396.8895.00
0.993.7596.8893.7596.8894.7995.21
1.194.2793.7596.8896.8896.8895.73
1.296.8894.2795.3193.75100.0096.04
1.3100.00100.0090.6396.8896.8896.88
1.493.7596.88100.0093.7593.7595.63
1.596.88100.00100.00100.0087.5096.88
Back to TopTop