In the hospital examination,there is routine examination of sputum,and a preliminary diagnosis of respiratory diseases can be made quickly through the pathological examination of sputum.Among them,it is medically clear that sputum colors can be divided into eight types,and different sputum colors correspond to different diseases.In this project,the Community Sputum Color Self-service Pre-diagnosis System is designed and placed in the community.By detecting the color of the sputum,it informs the community residents of their own physical health;In addition,it can also reduce the occurrence of spitting and prevent the sputum from volatilizing in the air.The design of this system can better help community residents develop a good awareness of environmental protection.The system designed in this paper includes the following parts:(1)Community residents can login to the system through face recognition or account passwords.The system uses MTCNN algorithm,Res Net neural network and Dlib algorithm to achieve face detection,feature extraction and feature comparison.By comparing the existing face detection technology,we found that using the MTCNN algorithm can more accurately frame the entire facial contour of the face,and extract the feature points of the face more effectively,thereby improving the accuracy of the comparison.(2)Use the Label Img tool to label and classify the sputum samples,and use the Yolov5 algorithm to train the model to ensure that the target area can be found faster during the detection process and other interference-producing parts are removed;the support vector machine is then used to train the classification model,Through the comparison of similarity,the sputum color is determined,then the prediction results and suggestions are fed back.This paper uses the support vector machine method to classify sputum color,which solves the problems of fewer sputum color samples,non-linear training algorithm and high dimensionality.(3)The Qt Charts chart is used in the system to display the personal health status of community residents over a period of time by means of line graphs,for reference by residents,in order to get timely medical treatment in case of special circumstances.The software of this system is developed using Python language,constructs a Community Sputum Color Self-service Pre-diagnosis System,and uses different patient samples for testing.The results show that the system can accurately detect the samples and achieve the expected results.Therefore,community residents can use this system to conduct self-service pre-diagnosis of sputum. |