Tuberculosis is a chronic infectious disease caused by Mycobacterium tuberculosis,which seriously threatens human health.Microscopic examination is one of the commonly used methods for detecting tuberculosis.Before microscopic examination,the bacterial sample needs to be made into slices,and then the doctor can make microscopic diagnosis on the sample slides under the microscope.Manual making slices and microscopic examination are highly repetitive.With the continuous development of science and technology,there is an urgent need for a fully automated production and detection system for mycobacterium tuberculosis,which can reduce the work intensity of doctors,improve the detection efficiency of mycobacterium tuberculosis,and effectively curb the spread of bacteria.In order to enhance the automation level of mycobacterium tuberculosis production and detection,this thesis focuses on the mycobacterium tuberculosis staining production and scanning machine,including the following three aspects:1.Design and implement the software part of the dyeing machine,build a "bus" type message communication mechanism between modules,complete the UI interactive interface,design a multi-threaded model of the instrument system,develop communication protocols between the upper and lower computers,and control and implement the entire operation process of the dyeing machine.2.Based on traditional image processing methods for target segmentation and classification of fluorescent Mycobacterium tuberculosis,the image is segmented using a segmentation algorithm with adaptive thresholding,and the segmentation results are filtered using a thresholding algorithm with a combination of multiple neighborhood sizes.Extract the color mean value,area,length width ratio,axis length,average width,Hu moment and approximate polygon curve fitting of the target area as features,select the random forest for classification,and obtain 63.3% classification accuracy,and use the results to pre-label the depth learning dataset.3.Target classification of fluorescent Mycobacterium tuberculosis based on deep learning,using multiple copy-paste as an enhancement method for small target data for the inherent characteristics of small target data.Faster R-CNN and FPN models were used to detect the target of fluorescent mycobacterium tuberculosis,and the calculation methods of the loss function in the model were compared and improved accordingly.Finally,the accuracy of 84.3%and the recall of 93.9% were obtained.Based on the above work,this thesis effectively combines the development of the production detection system with the image detection algorithm,realizing the integration and automation of the production,dyeing and detection of fluorescent tuberculosis,and achieving the expected goal of this thesis. |