Alopecia type identification and detection method and system based on comparative learning
Through the hair loss type identification detection method based on contrast learning, combined with the doctor's knowledge base and stacked learning method, the accuracy and efficiency of hair loss type recognition in the existing technology are solved, and the recognition effect of high accuracy and diversity needs is achieved.
Patent Information
- Application Number
- CN202411249371.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art has limited applications in the field of hair loss type identification, and it is difficult to achieve high accuracy and high efficiency identification.
A hair loss type identification detection method based on contrast learning is adopted, and doctors participate in the production and processing of data sets, integrate them into the doctor's knowledge base, conduct model training and evaluation, and centralized learning is used to output prediction results using stacking methods.
Highly accurate hair loss type recognition is achieved, which can distinguish different types of hair loss, meet the needs of different ages, genders and races, and improve the prediction effect of overhead hair loss characteristics through integrated learning.
Smart Images

Figure CN119480087A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep learning technology, and specifically relates to a hair loss type recognition and detection method and system based on contrast learning. Background Art
[0002] Hair loss, or more technically known as baldness, is a global health challenge that negatively affects the quality of life of hundreds of millions of people. This condition not only affects the physical and mental health of individuals, but also imposes a significant economic and medical burden on society as a whole. Therefore, gaining a deeper understanding and research on the global hair loss problem has become a key area of medical and scientific research. There are many different types of hair loss, including male pattern baldness, female pattern baldness and alopecia areata, each of which requires specific treatment methods. Therefore, accurately identifying the type of hair loss is crucial to developing an effective treatment plan.
[0003] Deep learning, especially convolutional neural networks, has been proven to be very effective in processing and analyzing medical imaging data, and has also performed well in hair loss. CNN can extract key features from complex medical images for automatic identification and classification of hair loss types. Several studies, such as hair loss type and stage identification based on semi-supervised learning, MCBL multi-scale convolution for hair loss identification, and the use of the MASK-RCNN model, have demonstrated the feasibility and accuracy of hair loss type identification using deep learning. These studies usually include a large number of scalp image datasets, which are trained and tested using CNN models. The results show that compared with traditional diagnostic methods, deep learning methods show higher accuracy and efficiency in hair loss type identification. As an important branch of deep learning, contrastive learning is centered on learning effective data representation by comparing the similarities and differences between different samples. This method is particularly important in unsupervised or self-supervised learning scenarios because it does not rely on a large amount of labeled data, but extracts information through the contrast relationship between samples. Compared with traditional deep learning, contrastive learning has shown significant advantages in processing large datasets, coping with data diversity, improving the applicability of feature expression, and enhancing the robustness of the model. These advantages make contrastive learning particularly suitable for tasks that require accurate identification of subtle differences, such as hair loss type identification in medical image analysis. Hair loss type identification is a complex and delicate task that requires accurate distinction between different types of hair loss, which may have only slight visual differences. By strengthening the model's ability to perceive these subtle differences, contrastive learning can theoretically greatly improve the accuracy and efficiency of hair loss type identification. For example, it can learn richer and more discriminative feature expressions by comparing image features of different types of hair loss. In addition, given that the population affected by hair loss is extremely diverse in terms of age, gender, race, etc., the ability of contrastive learning is also particularly important when dealing with such diverse data.
[0004] In theory, these advantages of contrastive learning are applicable to hair loss type recognition, but as of now, the application of this method in the field of hair loss type recognition is still limited. Summary of the invention
[0005] The purpose of the present invention is to provide a hair loss type recognition and detection method based on contrast learning with reasonable design and good hair loss type recognition effect in view of the above problems.
[0006] The purpose of the present invention is to provide a hair loss type recognition and detection system based on contrast learning with high recognition accuracy in order to solve the above problems.
[0007] To achieve the above object, the present invention adopts the following technical solution: a hair loss type recognition and detection method based on contrast learning, comprising the following steps:
[0008] S1: Doctors participated in the preparation and processing of the dataset;
[0009] S2: Integrate data into the physician knowledge base;
[0010] S3: Conduct model training and evaluate and provide feedback on model results;
[0011] S4: Use stacking method to centrally learn the model;
[0012] S5: Output prediction results.
[0013] In the above-mentioned hair loss type identification and detection method, the step S1 comprises the following steps:
[0014] S11: Data collection, doctors participated in collecting head photos of people of different genders and ages, and made preliminary classifications according to the types of hair loss, including C type, F type, Female type, M type, U type and V type;
[0015] S12: Data annotation. The doctor annotates the collected photos in detail based on his / her own experience and expertise. The C type has C1, C2 and C3 types, the F type has F1, F2 and F3 types, the Female type has FM1, FM2 and FM3 types, the M type has M0, M1, M2 and M3 types, and the V type has V1, V2 and V3 types.
[0016] S13: Data cleaning and screening, doctors participated in data cleaning and screening to eliminate photos of poor quality, incorrect annotations, or duplicates.
[0017] In the above-mentioned hair loss type identification and detection method, the step S12 adopts a semi-automatic labeling tool and uses computer vision technology to assist doctors in labeling.
[0018] In the above-mentioned hair loss type identification and detection method, the step S2 comprises the following steps:
[0019] S21: Build a doctor knowledge base, collect and organize doctors’ professional knowledge and experience and build it into a knowledge base;
[0020] S22: Knowledge base application, combining the doctor’s knowledge base with the model, and using the knowledge base to assist doctors in labeling and diagnosis.
[0021] In the above-mentioned hair loss type identification and detection method, the comparative learning model in step S3 adopts any one or more combinations of SimCLR model, MoCo model, BYOL model, SwAV model and Barlow Twins model.
[0022] In the above-mentioned hair loss type recognition and detection method, the detection task training in step S3 adopts the Faster R-CNN model; the Faster R-CNN model includes a backbone layer, an RPN layer, a RoIPool ing layer, and a Classification and Regression layer.
[0023] In the above-mentioned hair loss type identification and detection method, step S3 comprises the following steps:
[0024] S31: Model evaluation, doctors participate in the model evaluation process, provide feedback, and improve and optimize the model;
[0025] S32: Result feedback: feeding back the model’s prediction results to doctors for their reference and judgment.
[0026] In the above-mentioned hair loss type identification and detection method, the step S4 comprises the following steps:
[0027] S41: Use the contrastive learning model to predict the training data respectively to obtain the prediction results of each model;
[0028] S42: Use the prediction results as new features to construct a new dataset;
[0029] S43: Use the features to train a new meta-model, namely the logistic regression model;
[0030] S44: Use the trained meta-model to make predictions on new data.
[0031] In the above-mentioned hair loss type recognition and detection method, the step S5 extracts the backbone part of the contrastive learning model after training and replaces it in the Faster R-CNN model to perform training for the target detection task. After the training is completed, the validation set in the data set is used to verify the model performance, and the mAP indicator is used to detect the target detection experimental results, and the Accuracy indicator is used to detect the classification experimental results. The calculation formulas of the mAP and Accuracy indicators are shown below:
[0032]
[0033] TP means that the sample predicted is positive and is actually positive; TN means that the sample predicted is negative and is actually negative; FP means that the sample predicted is positive and is actually negative; FN means that the sample predicted is negative and is actually positive; AP calculation is defined as the area between the interpolated precision-recall curve and the X-axis envelope; i It is the first interpolation end that interpolates the corresponding recall value, and C represents the number of types.
[0034] A hair loss type identification and detection system adopts the hair loss type identification and detection method.
[0035] Compared with the existing technology, the advantages of the present invention are: using multiple contrast learning models for target detection, and verifying the model detection effects respectively, so as to obtain a hair loss type recognition detection model with higher evaluation accuracy; each contrast learning model can distinguish different types of hair loss, and can meet the hair loss type detection needs of different ages, genders and races; the detection effects of different models on the same picture can be compared more clearly, in addition to judging the hair loss type, the hair loss position can also be accurately marked, and then multiple hair loss types can be judged; the contrast learning models are combined in a stacking manner to improve the prediction effect of the hair loss characteristics on the top of the head. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a schematic diagram of the method of the present invention;
[0037] Figure 2 It is a structural principle diagram of the SimCLR model of the present invention;
[0038] Figure 3 It is a schematic structural diagram of the MoCo model of the present invention;
[0039] Figure 4 is a schematic diagram of the structure of the BYOL model of the present invention;
[0040] Figure 5 It is a structural schematic diagram of the SwAV model of the present invention;
[0041] Figure 6It is a schematic diagram of the structure of the Barlow Twins model of the present invention;
[0042] Figure 7 It is a schematic diagram of the structure of the Faster R-CNN model of the present invention;
[0043] Figure 8 is a schematic diagram of hair loss categories of the present invention;
[0044] Fig. 9 It is the model training loss trend graph of the present invention;
[0045] Fig.10 It is a trend graph of the training loss of the downstream tasks of the model of the present invention;
[0046] Fig.11 is a comparison diagram of the prediction results of the hairline by different models of the present invention;
[0047] Fig.12 It is a comparison diagram of the prediction results of different models of the present invention for the top of the head. DETAILED DESCRIPTION
[0048] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] like Figure 1 As shown, a hair loss type recognition and detection method based on contrastive learning includes the following steps:
[0050] S1: Doctors participated in the preparation and processing of data sets, mainly collecting head photos of people of different genders and ages, and classifying and labeling the photos to obtain the data sets required for model training;
[0051] S2: Integrate data into the physician knowledge base;
[0052] S3: Conduct model training and evaluate and provide feedback on model results;
[0053] S3: Use stacking method to concentrate the model learning;
[0054] S4: Output experimental results.
[0055] like Figure 8As shown, in step S1, doctors participate in collecting head photos of people of different genders, ages, etc., and make preliminary classifications according to the types of hair loss. The types of hair loss marked in the data set include C type, F type, Female type, M type, U type and V type, among which C type has C1 type, C2 type and C3 type, F type has F1 type, F2 type and F3 type, Female type has FM1 type, FM2 type and FM3 type, M type has M0 type, M1 type, M2 type and M3 type, V type has V1 type, V2 type and V3 type; among which Female type refers specifically to the type used by women. In this embodiment, a total of 664 pictures are selected, including 21 C type, 156 F type, 176 Female type, 143 M type, 29 U type and 140 V type. The annotation file used for the downstream detection task is annotated with Label img, and the annotation file format is COCO format. In addition, data cleaning and screening are required, and doctors are involved in data cleaning and screening to eliminate photos of poor quality, incorrect annotations, or duplications. Semi-automatic annotation tools are used to annotate pictures, using computer vision technology to assist doctors in annotation.
[0056] For the datasets used for contrastive learning model training and its downstream detection task training, the datasets are adjusted to the contrastive learning model training format required by MMSelfSup and the COCO dataset format required for detection task training.
[0057] Step S2 includes the following steps:
[0058] S21: Build a doctor knowledge base, collect and organize doctors' professional knowledge and experience and build a knowledge base, such as the characteristics, diagnostic criteria, treatment methods and other information of different types of hair loss;
[0059] S22: Knowledge base application, combining the doctor’s knowledge base with the model, for example, adding knowledge base information during the model training process and using the knowledge base to assist doctors in labeling and diagnosis.
[0060] In-depth, the model in step S3 is deployed on the server and trained using a GeForceRTX 3090 GPU. The comparative learning model uses any one or more combinations of the SimCLR model, MoCo model, BYOL model, SwAV model, and Barlow Twins model. The Faster R-CNN model is used for detection task training. The Faster R-CNN model includes a backbone layer, an RPN layer, a RoIPool ing layer, and a Classification and Regression layer. The training loss value change trend of each comparative learning model is shown in the figure. Fig. 9 As shown in Figure 2, the change trend of the downstream task training loss value of each comparative learning model is as follows: Fig.10 shown.
[0061] Step S3 includes the following steps:
[0062] S31: Model evaluation: doctors participate in the model evaluation process, such as evaluating the model's prediction results and providing feedback to help the model continuously improve and optimize;
[0063] S32: Result feedback: The prediction results of the model are fed back to the doctor for reference and judgment. For example, the doctor can make a more accurate diagnosis based on the prediction results of the model combined with his or her own experience and expertise.
[0064] At present, there are two major characteristics of hair loss on the top of the head: the characteristics are not obvious. Compared with hair loss on the hairline, hair loss on the top of the head may be more difficult to distinguish, and the characteristics are not as obvious as those on the hairline. Greater diversity: Hair loss on the top of the head may be affected by more factors, such as age, gender, race, etc., resulting in greater diversity. The five algorithm models currently in the experiment can obtain certain features on the top of the head. In order to achieve a better prediction effect in a larger practical application scenario, the ensemble learning method is chosen. Ensemble learning can improve the overall performance by combining the predictions of multiple models. Currently, the ensemble learning method is used to integrate the prediction results of these models on hair loss on the top of the head. There are many ways of ensemble learning. According to the current situation where the single effect of the algorithm can extract certain features, the stacking method is chosen. The stacking method inputs the prediction results of multiple models as new features into the logistic regression for the final prediction. Step S4 includes the following steps:
[0065] S41: Use the contrastive learning model to predict the training data respectively to obtain the prediction results of each model;
[0066] S42: Use the prediction results as new features to construct a new dataset;
[0067] S43: Use the features to train a new meta-model, namely the logistic regression model;
[0068] S44: Use the trained meta-model to make predictions on new data.
[0069] like Figure 2As shown, SimCLR uses data augmentation to create positive and negative sample pairs, and trains the model by maximizing the similarity of positive sample pairs while minimizing the similarity of negative sample pairs. In step S3, the SimCLR model includes data augmentation, feature extractor, projection head, and contrast loss function; the SimCLR model first applies random data augmentation to the input sample to generate two different views, and the different pictures are negative sample pairs; then the convolutional neural network ResNet is used to independently extract features from the two enhanced images, and the extracted features are further transformed through a small multi-layer perceptron MLP to obtain a low-dimensional representation. This step is designed to allow the model to learn more abstract feature representations; the contrast loss function used by the SimCLR model is NT-Xent and is used to maximize the similarity of positive sample pairs while minimizing the similarity with other images; the calculation method of the contrast loss function NT-Xent of the SimCLR model is as follows:
[0070]
[0071] The numerator represents the similarity between positive samples, the denominator is the similarity between negative samples, and τ is the temperature parameter used to adjust the distribution of similarity scores. The SimCLR model does not require labeled data and is versatile and simple, but is sensitive to batch size.
[0072] like Figure 3 As shown, the core of the MoCo model is to create a dynamic memory queue for maintaining negative samples, and introduce a momentum encoder to stably update the queue. The main goal of the MoCo model is to learn effective feature representations on image data through unsupervised learning. In step S3, the MoCo model includes two encoders, a memory queue, data enhancement, and a contrast loss function; the encoder is divided into an online encoder and a momentum encoder. The parameters of the momentum encoder are the sliding average of the parameters of the online encoder. The momentum encoder is used to generate the representation of negative samples and the features of positive samples after data enhancement. The representation of negative samples is stored in a memory queue. The queue is updated in each training step, and the old samples are replaced by new samples, ensuring the diversity and updateability of negative samples; input a picture, extract features by the online encoder, and compare the similarity of positive and negative sample features; the contrast loss function used by the MoCo model is InfoNCE and the calculation method is as follows:
[0073]
[0074] Where N is the number of samples, q is the encoding vector of the query sample, and k + is the encoding vector corresponding to the positive sample, k iis the encoding vector of the negative sample, and τ is the temperature parameter used to adjust the distribution of similarity scores. The MoCo model is suitable for situations where there is no large amount of labeled data, and can achieve good performance in a variety of downstream visual tasks. The effect mainly depends on the design and size of the memory queue.
[0075] like Figure 4 As shown, the BYOL model uses two neural networks and uses a special mechanism to make the two networks learn similar feature representations. The BYOL model consists of three stages: encoder f, projector g, and predictor q. In step S3, the BYOL model includes an online network and a target network. The two networks have the same architecture but do not share parameters; both the online network and the target network contain a feature extractor and a projection head for processing images and outputting feature representations; the parameters of the target network are the sliding average of the parameters of the online network. This parameter update strategy is called momentum update; the online network contains an additional prediction head compared to the target network to convert the output of the online network into the same space as the target network output; after the input image data is enhanced, one is input into the online network and the other into the target network, and a feature is generated for each. The mean square error is used to minimize the difference between the output of the online network and the output of the target network. The mean square error calculation method is as follows:
[0076]
[0077] in is the result of normalization of the online network output, is the normalized result of the target network output.
[0078] like Figure 5 As shown, the core idea of the SwAV model is based on Cluster Contrast. It learns feature representation by assigning data-augmented image views to different clusters or categories, and then exchanging the cluster assignments of these views. The SwAV model in step S3 includes data augmentation, feature extraction, multi-layer perceptron projection head, and online clustering; the SwAV model inputs an image for data augmentation to generate two different views, uses the same neural network ResNet to extract features from the two views, and then uses the MLP projection head to transform the features to obtain a low-dimensional representation; an online clustering algorithm Sinkhorn-Knopp algorithm is applied to assign the feature representation of each view to a set of predefined clusters, and then assign the feature representation of the view to another view, so that the model learns to predict the cluster assignment of image views, and uses a cross-entropy-based loss function to minimize the difference between the predicted assignment and the actual assignment; the loss function calculation method of the SwAV model is as follows:
[0079]
[0080] in To measure the relationship between feature z and cluster q, the cross entropy between z and q is used for calculation. The calculation formula is as follows:
[0081]
[0082] like Figure 6 As shown, the Barlow Twins model is a self-supervised learning method that learns high-quality features by reducing the redundancy between a pair of enhanced image representations. Reducing redundancy means making the representations of a pair of enhanced images as statistically independent as possible. This method is inspired by neuroscience, especially the theory of how the brain processes information by reducing the redundancy between neuronal activities. In step S3, the Barlow Twins model includes data enhancement, feature extraction, calculation of the cross-correlation matrix, and calculation of the loss function; the Barlow Twins model uses two identical neural networks ResNet to extract features of the two views. The two neural networks have the same structure and share parameters, that is, the neural network weights are the same; then the cross-correlation matrix of the two feature representations is calculated to make this matrix close to the unit matrix; in the unit matrix, the elements on the diagonal represent the correlation of the same feature in the two views, and the elements on the off-diagonal represent the degree of independence between different features; the loss function of Barlow Twins is designed to make the cross-correlation matrix close to the unit matrix, and the loss function of Barlow Twins is as follows:
[0083]
[0084] Among them, λ is used to weigh the importance of the two values, and C is the cross-correlation matrix of the outputs of two identical networks. C is calculated by the following formula:
[0085]
[0086] Where b represents the sample, and i and j represent the output vector dimensions. The Barlow Twins model can learn richer and more discriminative features, providing an effective way to learn deep feature representation without relying on large-scale labeled datasets. Through its unique loss function and training mechanism, it has demonstrated excellent performance in a variety of visual tasks.
[0087] like Figure 7As shown in the figure, the Faster R-CNN model is a deep learning model for target detection. Faster R-CNN is developed based on R-CNN and Fast R-CNN. R-CNN is the first model to apply convolutional neural networks to target detection. It uses the selective search algorithm to generate candidate regions and adjust these regions to the same size. They are then passed to CNN for feature extraction, and then classified using SVM, and finally regression is used for position adjustment. Fast R-CNN is different. It runs CNN on the entire image to extract feature maps, and then uses RoI pooling to convert candidate regions of different sizes into a uniform size. The model also uses Softmax to replace SVM for classification, and allows classification and regression tasks to share most of the network weights. Compared with the two, the biggest change in the Faster R-CNN model is the introduction of RegionProposal Network to achieve end-to-end target detection, thereby improving detection speed and accuracy.
[0088] Step S4 extracts the backbone part of the contrastive learning model after training and replaces it in the Faster R-CNN model to train the target detection task. After the training is completed, the validation set in the data set is used to verify the model performance. Backbone is mainly composed of ResNet and FPN, which is responsible for extracting image features, and then these feature maps are sent to the RPN network and detector for target detection. FPN is also a target detection model, but it can be used in combination with various target detection models to improve the performance of deep learning models in target detection. The key idea of the core idea of FPN is to capture the semantic information contained in objects of different sizes by constructing a multi-scale feature pyramid. The method of FPN starts from the top-level features and connects with the lower-level features through the information transmitted downward, thereby creating a top-down connection method. In this way, high-level semantic information and low-level detail information can be combined to achieve the fusion and transmission of multi-scale information, so as to better identify objects of different sizes in the image. In FPN, the underlying feature map is usually scale-matched by upsampling, and then element-by-element addition or element-by-element multiplication is performed with the high-level feature map to achieve feature fusion. This allows the network to obtain rich semantic information at different scales and improve the performance of object detection and semantic segmentation.
[0089] like Fig.11As shown in 12, for each model, this embodiment lists a sample for comparative display, and marks the types and positions with model prediction type probabilities greater than 0.3. The figure shows the prediction results of each model for the same image, and uses different colors to mark different types of hair loss positions. The SimCLR model and the SwAV model have better results than other models, and the types and positions are accurately judged. The performance of other models is one step worse, and multiple types are judged.
[0090] This embodiment uses the mAP indicator to detect the target detection experiment results, and the Accuracy indicator to detect the classification experiment results. The calculation formulas of the mAP and Accuracy indicators are as follows:
[0091]
[0092] TP means that the sample predicted is positive and is actually positive; TN means that the sample predicted is negative and is actually negative; FP means that the sample predicted is positive and is actually negative; FN means that the sample predicted is negative and is actually positive; AP calculation is defined as the area between the interpolated precision-recall curve and the X-axis envelope; i It is the first interpolation end that interpolates the corresponding recall value, and C represents the number of types.
[0093] The experimental results of different models for the mAP index of hairline prediction are compared as shown in the following table:
[0094] bbox_mAP_50 bbox_mAP_75 bbox_mAP Accuracy SimCLR 0.9370 0.9370 0.7880 0.9951 MOCO 0.9150 0.8420 0.6760 0.9782 BYOL 0.8970 0.8460 0.6930 0.9937 AV 0.9320 0.9320 0.7820 0.9941 BarlowTwins 0.8140 0.6840 0.5520 0.9824
[0095] The following is a comparison of the experimental results of mAP of each model for head prediction as shown in the following table:
[0096]
[0097] The experimental results in the table are visualized using box plots. By comparing the result data of the five models in the box plots in the table and analyzing them, it can be seen that the performance of the five models in the classification task is good. The performance gap can be seen in the hairline detection, and the detection of the top of the head requires the use of ensemble learning for comprehensive prediction. It is generally believed that the mAP with IoU greater than 50 can evaluate the performance of the model, and the higher the performance, the better. In the hairline hair loss recognition experiment, SimCLR's various indicators are better than the results of other models, with higher evaluation data and better performance in high precision. In the hair loss recognition experiment on the top of the head, using ensemble learning to integrate multiple algorithm features can also produce good recognition results.
[0098] The experimental results show that the above five comparison models have achieved very good classification results in the field of hair loss type recognition, but there is a gap in the detection of hairline targets. SimCLR is the best model for hairline recognition among the five models, and each indicator is better than other models, and the leading indicators are very obvious. After integrating the features of the five algorithms, the ensemble learning method can also achieve the same high recognition degree in the detection of the top of the head as the hairline.
[0099] A hair loss type recognition and detection system adopts the above-mentioned hair loss type recognition and detection method. The system specifically adopts any one or more combinations of SimCLR model, MoCo model, BYOL model, SwAV model and Barlow Twins model. The SimCLR model is preferably used as the comparative learning model. The system also has a target detection model Faster R-CNN model.
[0100] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
[0101] Although the terms such as data set and classification detection are used more frequently in this article, the possibility of using other terms is not excluded. These terms are used only to more conveniently describe and explain the essence of the present invention; interpreting them as any additional limitation is contrary to the spirit of the present invention.
Claims
1. A hair loss type recognition and detection method based on contrastive learning, characterized in that: The steps include: S1: Doctors participated in the dataset preparation and processing; S2: Integrate data into the physician knowledge base; S3: Conduct model training and evaluate and provide feedback on model results; S4: Use stacking method to centrally learn the model; S5: Output prediction results.
2. A method for identifying and detecting hair loss types according to claim 1, characterized in that: The step S1 comprises the following steps: S11: Data collection, doctors participated in collecting head photos of people of different genders and ages, and made preliminary classifications according to the types of hair loss, including C type, F type, Female type, M type, U type and V type; S12: Data annotation. The doctor annotates the collected photos in detail based on his / her own experience and expertise. The C type has C1, C2 and C3 types, the F type has F1, F2 and F3 types, the Female type has FM1, FM2 and FM3 types, the M type has M0, M1, M2 and M3 types, and the V type has V1, V2 and V3 types. S13: Data cleaning and screening, doctors participated in data cleaning and screening to eliminate photos of poor quality, incorrect annotations, or duplicates.
3. A method for identifying and detecting hair loss types according to claim 2, characterized in that: The step S12 adopts a semi-automatic labeling tool and utilizes computer vision technology to assist doctors in labeling.
4. A method for identifying and detecting hair loss types according to claim 1, characterized in that: The step S2 comprises the following steps: S21: Build a doctor knowledge base, collect and organize doctors’ professional knowledge and experience and build it into a knowledge base; S22: Knowledge base application, combining the doctor’s knowledge base with the model, and using the knowledge base to assist doctors in labeling and diagnosis.
5. A method for identifying and detecting hair loss types according to claim 1, characterized in that: The comparative learning model in step S3 adopts any one or more combinations of the SimCLR model, the MoCo model, the BYOL model, the SwAV model and the Barlow Twins model.
6. A method for identifying and detecting hair loss types according to claim 5, characterized in that: The detection task training in step S3 adopts the Faster R-CNN model; the Faster R-CNN model includes a backbone layer, an RPN layer, a RoIPooling layer and a Classification and Regression layer.
7. A method for identifying and detecting hair loss types according to claim 6, characterized in that: The step S3 comprises the following steps: S31: Model evaluation, doctors participate in the model evaluation process, provide feedback, and improve and optimize the model; S32: Result feedback: feeding back the model’s prediction results to doctors for their reference and judgment.
8. A method for identifying and detecting hair loss types according to claim 7, characterized in that: The step S4 comprises the following steps: S41: Use the contrastive learning model to predict the training data respectively to obtain the prediction results of each model; S42: Use the prediction results as new features to construct a new dataset; S43: Use the features to train a new meta-model, namely the logistic regression model; S44: Use the trained meta-model to make predictions on new data.
9. A method for identifying and detecting hair loss types according to claim 8, characterized in that: The step S5 extracts the backbone part of the contrastive learning model after training and replaces it in the Faster R-CNN model to perform training for the target detection task. After the training is completed, the validation set in the data set is used to verify the model performance. The mAP indicator is used to detect the target detection experimental results, and the Accuracy indicator is used to detect the classification experimental results. The calculation formulas of the mAP and Accuracy indicators are shown below: TP means that the sample predicted is positive and is actually positive; TN means that the sample predicted is negative and is actually negative; FP means that the sample predicted is positive and is actually negative; FN means that the sample predicted is negative and is actually positive; AP calculation is defined as the area between the interpolated precision-recall curve and the X-axis envelope; i It is the first interpolation end that interpolates the corresponding recall value, and C represents the number of types.
10. A hair loss type identification and detection system, characterized in that: The hair loss type identification and detection method described in any one of claims 1 to 9 is adopted.
Citation Information
Cited By
Method for evaluating exposure risk of indoor dust mite allergen
CN120511040A