The human stools are directly related to the health of human gastrointestinal function.Preliminary classification of the shape and colour of stools can diagnose the health status of peoples,therefore automatic recognition of stools is the current development direction of smart toilets.Due to the difficulty in identification with complex image content,this paper proposed a convolutional neural network called Stool Net to solve the current challenges.We mainly propose a computer vision-based method to automatically classify and recognize the shape and colour of human stool to replace artificial,reduce the burden on users,and provide doctors with more accurate results of automatic stool detection;this will lead to people receiving better medical and health services.This paper conducts a human stool image data set,the images in the data set are provided by anonymous volunteers,and the shapes and colours of the stool in the images are labeled by professional doctors.This article mainly compares the automatic recognition technology of stool shape based on traditional image features and deep learning,the automatic recognition technology of stool colour based on image color space and deep learning.The technology based on traditional image features combines traditional image feature extractors and classifiers to identify stool shapes;the technology based on image color space uses the RGB,HSV and LAB color spaces of the image and combines threshold comparison to recognize the colour of stool;the technology based on deep learning introduces transfer learning to train a fine-tuned convolutional neural network to automatically recognize the shape and color of stool,respectively.The experimental results show that the method based on deep learning achieves better results on stool shape and color recognition tasks.In addition,in order to perform multi-task classification of stool shapes and colours,the traditional convolutional neural network is improved in this paper.This paper proposes a multi-branch convolutional neural network structure that shares a convolutional layer,so that it has two branches connected to two outputs of stool colour and shape after the last convolutional layer.The repeated calculation of stool image features is avoided in the structure by sharing the convolutional layer.Furthermore,the inception E block is introduced to increase the network depth of the stool color branch,through which the results of the stool colour recognition could be further improved.In the experiment,1007 human stool images are randomly selected at a ratio of 0.6,0.2,and 0.2 as the training,validation,and test sets.A transfer learning method is applied,and the model parameters pretrained on Image Net are transferred to our models.Regarding the sotol colour recognition task,the model produced a 0.998 AUC.As for BSFS classification using the Stool Net architecture,the accuracy value is 93.6%,and the macro F1 achieved 92.8% on test set of 202 images.Compared with other three-classification of stool shape methods,model of this paper has better results on real datasets;moreover,this paper conducted a four-classification method on stool shapes and also evaluated the automatic recognition of stool colour. |