An androgenic alopecia detection method and system based on artificial intelligence
By extracting the composite invariant of hair follicle principal axis direction and density, and combining topological statistical vectors and graph convolutional neural networks, the problem of feature confusion in androgenetic alopecia detection is solved, and high-precision baldness region identification and localization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies are prone to confusion with other types of hair loss in the detection of androgenetic alopecia, resulting in insufficient detection accuracy and difficulty in determining whether androgenetic alopecia exists.
By acquiring hair images, extracting unit vectors along the principal axis of hair follicles, constructing composite invariants by combining hair follicle density, performing topological analysis, obtaining topological statistical vectors, and using graph convolutional neural networks to determine the probability of androgenetic alopecia in regional blocks.
It significantly improves the identification accuracy and regional localization accuracy of androgenetic alopecia, overcomes the limitation of easy confusion of shallow features, and improves the robustness and accuracy of detection.
Smart Images

Figure CN121190403B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hair loss detection technology, and in particular to an artificial intelligence-based method and system for detecting androgenetic alopecia. Background Technology
[0002] Androgenetic alopecia (AGA) is the most common type of hair loss, primarily caused by genetic factors and the effects of androgens. It leads to gradual atrophy of hair follicles, disordered hair follicle direction, and thinning and shortening of hair, ultimately preventing normal growth. In men, it often manifests as a receding hairline and thinning on the crown, while in women, it presents as thinning on the crown but a relatively intact hairline.
[0003] Androgenetic alopecia testing has significant clinical and preventative value. Because this type of alopecia is progressive and irreversible, failure to detect it early will result in missing the optimal intervention window. Scientific and accurate testing methods not only help determine the stage and trend of alopecia but also provide data support for personalized treatment, improving treatment outcomes, delaying hair follicle atrophy, enhancing patient confidence, and reducing psychological burden. Therefore, establishing a standardized and intelligent testing system is of profound significance for improving alopecia management.
[0004] However, existing technologies for detecting androgenetic alopecia are usually based on image detection. However, the image features of androgenetic alopecia are easily confused with those of other types of alopecia, resulting in insufficient accuracy in alopecia detection and difficulty in determining whether androgenetic alopecia exists. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide an artificial intelligence-based method for detecting androgenetic alopecia, which can solve the technical problem that the detection of androgenetic alopecia is usually based on image detection, but the image features of androgenetic alopecia are easily confused with the features of other types of alopecia, resulting in insufficient accuracy of alopecia detection and difficulty in determining whether androgenetic alopecia exists.
[0006] A first aspect of this invention provides an artificial intelligence-based method for detecting androgenetic alopecia, comprising:
[0007] S1: Obtain the hair image of the user to be detected;
[0008] S2: Extract the unit vector describing the direction of the hair follicle's principal axis from the hair image;
[0009] S3: Couple unit vectors with hair follicle density to construct composite invariants that characterize the mechanism of androgenetic alopecia;
[0010] S4: Combine composite invariants to perform topological analysis on hair images to obtain topological statistical vectors describing the survival time of hair follicle structures;
[0011] S5: Input the composite invariant and topological statistical vector into a pre-trained graph convolutional neural network to output the probability of androgenetic alopecia in different regions of the hair image.
[0012] S6: Define regions with a probability of androgenetic alopecia greater than the preset probability of androgenetic alopecia as having androgenetic alopecia; otherwise, define the corresponding regions as non-androgenetic alopecia.
[0013] A second aspect of this invention provides an artificial intelligence-based androgenetic alopecia detection system, comprising: a processor and a memory;
[0014] The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the artificial intelligence-based androgenic alopecia detection method as described in the first aspect.
[0015] A third aspect of the present invention provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the artificial intelligence-based androgenic alopecia detection method as described in the first aspect.
[0016] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0017] In this embodiment of the invention, by introducing the coupling information of the unit vector along the principal axis of the hair follicle and the hair follicle density, a composite invariant reflecting the changing patterns of hair follicle structure is constructed. Combined with topological statistical vectors, this accurately describes the spatial evolution characteristics of the hair follicle, effectively overcoming the limitation that relying solely on shallow features such as image grayscale and texture can easily lead to confusion with other types of hair loss. Simultaneously, by utilizing a graph convolutional neural network for structured learning of region blocks, fully considering spatial adjacency relationships and multi-scale feature fusion, the recognition accuracy and regional localization accuracy of androgenetic alopecia are significantly improved. Attached Figure Description
[0018] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0019] Figure 1 This is a schematic flowchart of an artificial intelligence-based method for detecting androgenetic alopecia provided in an embodiment of the present invention;
[0020] Figure 2 This is a schematic diagram of the structure of an artificial intelligence-based androgenic alopecia detection system provided in an embodiment of the present invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0022] The following description, in conjunction with the accompanying drawings, details the artificial intelligence-based androgenic alopecia detection method provided by the present invention through specific embodiments and application scenarios.
[0023] Reference manual attached Figure 1 The diagram shows a flowchart of an artificial intelligence-based method for detecting androgenetic alopecia provided in an embodiment of the present invention.
[0024] This invention provides an artificial intelligence-based method for detecting androgenetic alopecia, which may include the following steps:
[0025] S1: Obtain the hair image of the user to be detected.
[0026] Among them, hair images refer to visual images that cover areas covered by hair.
[0027] S2: Extract the unit vector describing the direction of the hair follicle's main axis from the hair image.
[0028] The principal axis direction of a hair follicle refers to the directional path of natural hair growth within each follicle. It can be understood as the line connecting the point where the hair emerges from the scalp surface to its growth direction. This direction typically varies with the tilt angle of the hair follicle in the scalp and is one of the important indicators of early changes in hair loss. For example, the principal axis direction of healthy hair follicles is relatively consistent, while in areas of androgenetic alopecia, the direction of the hair follicles often becomes disordered or abnormally scattered. A unit vector is a directional vector with a length of 1, used to express only the direction while ignoring the magnitude. Unit vectors are used to accurately characterize the principal axis direction of hair follicles, allowing subsequent calculations and modeling to focus only on structural orientation information, unaffected by factors such as hair length or image brightness.
[0029] By extracting the unit vector along the principal axis of the hair follicle, the directional changes in the arrangement of hair follicles can be accurately captured, which helps to identify early hair follicle disorder features, enhances the model's ability to perceive the structure of androgenetic alopecia areas, and improves detection accuracy and resistance to light interference.
[0030] In one possible implementation, S2 specifically includes:
[0031] S201: Calculate the median gradient of the hair image.
[0032] The formula for calculating the median of the gradient is as follows:
[0033]
[0034] Where z represents the median gradient of the hair image I. Let I represent the gradient of the hair image I, and median represents the median.
[0035] It should be noted that by calculating the median gradient of the hair image, the strength of the overall edge changes in the image can be adaptively reflected, providing a robust basis for setting the subsequent filtering scale and helping to improve the accuracy and adaptability of orientation extraction.
[0036] S202: Calculate the horizontal and vertical gradients of the hair image by combining the median gradient.
[0037]
[0038] σ=0.5·z
[0039] Among them, G x G represents the horizontal gradient of the hair image in the x-direction. y This represents the vertical gradient of the hair image in the y-direction. G represents the partial derivative. σ The kernel represents the Gaussian derivative at the kernel scale σ. This represents the convolution operation.
[0040] It should be noted that by adaptively determining the Gaussian kernel scale by combining the gradient median and calculating the gradients of the image in the horizontal and vertical directions, the accuracy of edge information extraction and noise resistance are effectively enhanced, providing a high-quality directional gradient basis for the accurate calculation of the hair follicle orientation angle.
[0041] S203: Based on the horizontal and vertical gradients, the direction angle of the hair follicle main axis is extracted by the arctangent function.
[0042] The formula for calculating the direction angle is as follows:
[0043] θ = arctan2(G y Gx )
[0044] Where θ represents the direction angle and arctan represents the arctangent function.
[0045] S204: Extract the unit vector describing the direction of the hair follicle's main axis based on the direction angle.
[0046] The formula for calculating a unit vector is as follows:
[0047]
[0048] Where the subscript T denotes transpose, sin and cos represent the sine and cosine functions respectively, and ∈ indicates avoiding the local minimum value of division by zero. This represents the unit vector corresponding to the pixel (x, y) in the hair image.
[0049] It should be noted that by converting the orientation angle into a unit vector form and normalizing it, not only is the orientation information of the hair follicle main axis preserved, but also the interference caused by uneven illumination or gradient amplitude differences is effectively eliminated. This improves the stability of the orientation representation and the generalization ability of the algorithm, providing a reliable orientation feature basis for subsequent feature fusion and topology analysis.
[0050] Specifically, through a series of image gradient and orientation extraction operations, the unit vector of the hair follicle's principal axis direction can be accurately obtained. First, the median gradient of the overall hair image is calculated to adaptively set the scale of the Gaussian derivative kernel, thereby enhancing the adaptability of image edge detection to different texture intensities. Next, the gradients of the image in the x and y directions are calculated using the scale of the Gaussian derivative kernel, and then the orientation angle of each pixel is calculated using the arctangent function. Finally, it is converted into a unit vector, and a normalization operation is used to resist the interference of illumination changes on orientation extraction. This process not only achieves a high-precision representation of the hair follicle's orientation structure but also enhances robustness to actual acquisition conditions such as image blurring and uneven illumination.
[0051] S3: Couple the unit vector with the hair follicle density to construct a composite invariant that characterizes the mechanism of androgenetic alopecia.
[0052] Composite invariants refer to quantities that do not change with the viewing angle or lighting. They can still reflect the true structure under different shooting conditions. Composite means that it is not a single direction or density, but a "product coupling" of these two anomalies.
[0053] It should be noted that by coupling the unit vector along the principal axis of the hair follicle with the hair follicle density, a composite invariant is constructed, effectively integrating structural directionality and spatial distribution characteristics. This composite quantity remains stable under different lighting and shooting angles, and can more realistically reflect the coupling mechanism of hair follicle disorder and sparsity, thereby enhancing the ability to identify androgenetic alopecia characteristics and improving the robustness and generalization performance of the detection.
[0054] In one possible implementation, S3 specifically includes:
[0055] S301: Calculate the degree of disorder in hair follicle orientation based on unit vector.
[0056] The specific formula for calculating the degree of hair follicle orientation disorder is as follows:
[0057]
[0058] in, Represents the gradient operator, and Representing unit vectors respectively In the x-axis component and the y-axis component and Let x and y represent the partial derivative operators with respect to the variables x and y, respectively. It represents the divergence of a unit vector in a two-dimensional plane, i.e., the degree of disorder in the direction of hair follicles.
[0059] It should be noted that quantifying the overall degree of change in hair follicle orientation by calculating the divergence of the unit vector field can effectively identify whether the hair follicle arrangement is disordered, thereby reflecting potential hair follicle degeneration areas. Compared with single-point orientation analysis, divergence, as a global indicator, is more robust and can accurately capture the orientation disorder characteristics unique to androgenetic alopecia areas.
[0060] S302: Obtain the hair follicle density gradient and median hair follicle density value based on the hair follicle density map.
[0061] The specific formula for calculating the hair follicle density gradient is as follows:
[0062]
[0063] in, ρ represents the hair follicle density gradient, and ρ represents the hair follicle density.
[0064] The specific formula for calculating the median hair follicle density value is as follows:
[0065] ρ ref =median(ρ)
[0066] Where, ρ ref This represents the median hair follicle density value, median indicates median calculation, and ρ represents the hair follicle density map.
[0067] It should be noted that this step, by simultaneously extracting the spatial variation (gradient) of hair follicle density and the overall distribution benchmark (median), not only identifies local density anomalies but also provides a global reference standard, which helps determine whether there are abnormal mutations in sparse hair follicle regions. Compared to methods that only use the average value, introducing the median can effectively suppress the influence of extreme values, improving feature stability and detection robustness.
[0068] S303: Calculates the characteristic length describing the average distance between hair follicles based on the median hair follicle density value.
[0069] The specific formula for calculating the feature length is as follows:
[0070]
[0071] Where l represents the characteristic length, ρ ref This represents the median hair follicle density value.
[0072] It should be noted that using the median hair follicle density value to infer the feature length of the average interfollicle spacing helps to introduce spatial scale information from the density distribution. The feature length L can serve as a quantitative indicator of structural scale, providing scale uniformity for subsequent calculations of composite invariants. This makes the model more adaptable and comparable across different scalp regions and imaging resolutions, thereby improving the versatility and accuracy of hair loss detection.
[0073] S304: Calculate composite invariants by combining hair follicle orientation disorder, hair follicle density gradient, median hair follicle density value, and characteristic length.
[0074] In one possible implementation, the formula for calculating the composite invariant is as follows:
[0075]
[0076] Among them, E DDC Denotes composite invariants, This represents the unit vector corresponding to the pixel (x, y) in the hair image. The expression represents the degree of disorder in hair follicle orientation, l represents the characteristic length, and ρ represents the hair follicle density. ρ represents the hair follicle density gradient. ref This represents the median hair follicle density value.
[0077] It should be noted that this composite invariant formula couples the degree of hair follicle orientation disorder, the magnitude of density variation, and structural scale characteristics to form a comprehensive index that is highly sensitive to abnormal changes in bald areas. It can effectively characterize the multidimensional features of androgenetic alopecia, such as disordered hair follicle arrangement, reduced density, and spatial diffusion, and has strong robustness to external interferences such as lighting and shooting angle. It is an important basic feature for subsequent topological analysis and classification.
[0078] Specifically, the hair follicle orientation disorder, density gradient, median hair follicle density, and hair follicle feature length are calculated sequentially through steps S301 to S304, and finally fused to construct a composite invariant. This process couples the consistency of hair follicle orientation with the spatial variation information of hair follicle distribution, comprehensively reflecting the abnormal variation characteristics of hair follicle structure in bald areas. Compared with traditional methods that rely solely on density or texture information, this method can more accurately distinguish between composite changes such as hair follicle orientation disorder and density sparsity, effectively improving the accuracy and robustness of baldness mechanism modeling, and providing structurally stable and illumination-independent high-discrimination feature representations for subsequent topology analysis and classification.
[0079] S4: Combine composite invariants to perform topological analysis on hair images to obtain topological statistical vectors describing the survival time of hair follicle structures.
[0080] In topological analysis, the survival time of a hair follicle structure refers to the "existence time" of a hair follicle or hair follicle cluster in the image feature space from the time it is identified as a structural unit until it disappears. It reflects the stability of the hair follicle in terms of spatial continuity and connectivity, similar to a mathematical abstraction of a structural life cycle, representing the health and persistence of the hair follicle tissue in that region. The topological statistical vector is a vector composed of multiple statistical indicators extracted from topological persistence analysis, used to comprehensively describe the morphological changes of hair follicle structures.
[0081] By introducing topological analysis and structural life cycle modeling, rather than being limited to point analysis, we can capture the continuity, stability and degradation trend of the overall hair follicle structure, effectively making up for the deficiency of traditional point analysis in being unable to identify local connectivity changes, thereby improving the sensitivity and discrimination ability of early androgenetic alopecia areas.
[0082] In one possible implementation, S4 specifically includes:
[0083] S401: Divide the composite invariant into preset number levels according to different division thresholds, and determine the pixel range of each number level based on the division results.
[0084] t k =t min +kΔt
[0085]
[0086] Among them, t k Let B represent the k-th threshold, B represent the number of preset levels, and t represent the threshold value. max and t minLet E represent the maximum and minimum values of the composite invariant, respectively. Let Δt represent the threshold step size describing how much the composite invariant is increased each time. DDC (c,y) represents the composite invariant value at pixel (x,y). This indicates that the composite invariant value is greater than t. k The set of pixels is the pixel range.
[0087] It should be noted that those skilled in the art can set the division threshold and the size of the preset quantity level according to actual needs, and the present invention does not limit this.
[0088] It should be noted that by dividing the composite invariant values into hierarchical levels according to preset thresholds to generate pixel sets of different levels, it is helpful to analyze the spatial evolution of hair follicle structural features from a multi-scale perspective. This method not only preserves structural differences but also provides hierarchical input for subsequent topological persistence calculations, enhancing the resolution and stability of baldness region identification.
[0089] S402: By changing the partitioning threshold, the lifetime of the 1-dimensional homology class representing the ring structure is recorded to obtain the lifetime persistence graph.
[0090] The lifespan duration chart is as follows:
[0091] C1={(b i ,d i )}
[0092] Among them, b i ,d i Let C1 represent the time of appearance and the time of disappearance of the i-th ring structure, respectively, and let C1 represent the lifetime persistence graph of the ring structure.
[0093] It should be noted that by progressively adjusting the threshold of composite invariants, the generation and disappearance processes of annular structures (such as hair follicle gaps) in the image at different scales are tracked, forming a lifespan persistence map of 1D homology classes. This map can quantify the stability and spatial connectivity characteristics of hair follicle structures, revealing the topological persistence of structures under scale changes, thus effectively reflecting the health status of hair follicles and their changing trends, providing interpretable and in-depth topological evidence for hair loss detection.
[0094] S403: Extract topological statistics vectors from the lifespan graph, where the topological statistics vectors include average lifespan, longest survival time, number of loops, mean of loop occurrence time, and standard deviation of loop occurrence time.
[0095] The formula for topological eigenvectors is as follows:
[0096] φ=[μ b ,σ b ,μ l,maxl,S hole ]
[0097] Where φ represents the topological feature vector, μ b ,σ b ,μ l ,maxl,S hole These represent the mean time of occurrence of ring structures, the standard deviation of time of occurrence of ring structures, the average lifespan, the longest survival time, and the number of ring structures, respectively.
[0098] It should be noted that by extracting multiple statistics from the lifecycle persistence graph to construct a topological feature vector, the formation and disappearance characteristics of ring structures at different scales are comprehensively quantified. This vector not only reflects the complexity and stability of hair follicle structures, but also has good noise resistance and interpretability, which helps to accurately distinguish the topological evolution differences between normal regions and bald regions, thereby improving the reliability and discriminative power of baldness detection.
[0099] Specifically, by applying hierarchical thresholding to composite invariants, the structural information in hair images is transformed into a set of pixels with hierarchical variations. Then, the appearance and disappearance processes of ring structures are extracted using one-dimensional homology class analysis in topology, constructing a lifecycle persistence map. By statistically analyzing the lifecycle characteristics of ring structures, such as appearance time, duration, and quantity, a topological statistical vector is formed. Compared to traditional image processing, this method not only reflects local structural features but also captures the global topological evolution of hair follicle structures across spatial scales, improving the modeling ability for the degradation of tissue structure in bald areas and exhibiting stronger recognition stability and discriminative power.
[0100] S5: Input the composite invariant and topological statistical vector into a pre-trained graph convolutional neural network to output the probability of androgenetic alopecia in different regions of the hair image.
[0101] Graph Neural Networks (GNNs) are a class of neural network models specifically designed for processing graph-structured data. A region block refers to a small, structurally continuous, and texture-similar region unit divided from a hair image using an image segmentation algorithm (SLIC superpixel algorithm). Each region block is treated as a graph node, possessing its own composite invariants and topological features, which can be used for graph construction and analysis. The probability of androgenetic alopecia is the probability value that the GNN determines for each region block to belong to the androgenetic alopecia region.
[0102] By jointly inputting composite invariants and topological statistical vectors into a graph convolutional neural network, not only can deep modeling of spatial structure between regions be achieved, but also the relationships between complex features can be automatically learned, outputting a baldness probability distribution with high discriminative power, which significantly improves the accuracy of baldness detection and spatial positioning precision.
[0103] In one possible implementation, the loss function of the graph convolutional neural network during training is specifically as follows:
[0104]
[0105] Where, L is the loss function value, L CE This represents the cross-entropy loss function value used to determine whether a hair loss pattern belongs to androgenetic alopecia during training, where N represents the total number of training samples, and y represents the cross-entropy loss function value used to determine whether a hair loss pattern belongs to androgenetic alopecia. j Let y represent the true label of training sample j. j =1 indicates that the hair loss category is androgenetic alopecia, y j =0 indicates that the hair loss category is non-androgenic alopecia, p j Let represent the probability that the graph convolutional neural network predicts training sample j to belong to the androgenetic alopecia category, log represents the logarithmic function, λ represents the weight of the importance between the balanced classification loss (cross-entropy loss function value) and the topological constraint loss (L2 norm term), |||2 represents the L2 norm, and ΔC1 represents the lifetime persistence graph predicted by the graph convolutional neural network for androgenetic alopecia samples. A graph representing the true lifespan of androgenetic alopecia samples.
[0106] Understandably, this loss function combines traditional cross-entropy loss and topological constraint loss terms. By introducing the L2 distance between the predicted lifetime persistence graph and the true persistence graph, it effectively enhances the model's ability to learn the topological features of hair follicle structures. The cross-entropy term ensures classification accuracy, while the topological loss term prompts the graph convolutional neural network to maintain sensitivity to the spatial structure of bald regions during discrimination, thereby improving the model's structural consistency and discrimination accuracy in complex baldness images, resulting in stronger interpretability and robustness.
[0107] In one possible implementation, S5 specifically includes:
[0108] S501: Divide the hair image into multiple regions using the SLIC algorithm.
[0109] Specifically, the SLIC (Simple Linear Iterative Clustering) superpixel segmentation algorithm is used to segment hair images. The steps include: first, initializing cluster centers based on the color and spatial coordinates of image pixels; then, classifying pixels within a search region defined around each cluster center based on a weighted combination of color and spatial distance; and finally, iteratively updating the cluster centers until convergence. This generates multiple regions with clear boundaries and continuous structure. This method preserves image structural information and effectively reduces image complexity, providing a stable foundation for subsequent region-level feature extraction and graph construction.
[0110] S502: Extract the fusion feature vector for each region block, where the fusion feature vector includes the mean of the composite invariant, the standard deviation of the composite invariant, and the elements of the topological feature vector.
[0111] S503: Connect the various regions to construct a graph structure, where the graph structure nodes are regions, and the connections between adjacent regions form graph structure edges. The weights of the graph structure edges are related to the mean of the composite invariant.
[0112] The specific formula for calculating the edge weights of a graph structure is as follows:
[0113]
[0114] Among them, w ij Let represent the graph edge weight between the i-th and j-th regions in the graph structure, and exp represent the natural exponential function. and Let represent the composite invariant mean of the i-th and j-th regions, respectively, and τ represent the adjustment coefficient for the degree of influence of the difference in the composite invariant mean between different regions on the edge weights of the graph structure.
[0115] Optionally, the adjustment coefficient can range from 0.05 to 0.5, such as 0.1.
[0116] It should be noted that by constructing a graph structure with region blocks as nodes and edge weights determined based on the difference in the mean of composite invariants, the spatial dependencies and feature similarities of local structures in hair images can be effectively expressed, capturing potential physiological connections between regions. Compared to traditional independent pixel analysis, this graph modeling approach has stronger context awareness and topological expressiveness, providing a solid foundation for subsequent information propagation and region-level baldness detection in graph convolutional neural networks, and significantly improving the model's accuracy in recognizing regions with blurred edges and structural transitions.
[0117] S504: Input the graph structure and the fused feature vectors of each region block into the graph convolutional neural network for graph convolution propagation, and output the probability of androgenetic alopecia for each region block.
[0118] The specific formula for calculating the probability of androgenetic alopecia in each region is as follows:
[0119] F (0) =[f1,...,f M ] T
[0120]
[0121] Among them, f m Let m represent the fused feature vector of the m-th region block, where m = 1, 2, ..., M, and M represents the total number of region blocks. F represents the probability of androgenetic alopecia in the m-th region. (0) Let F represent the input feature matrix. (1) This represents the hidden layer output matrix of a graph convolutional neural network, and ReLU represents the ReLU activation function. F represents the normalized adjacency matrix describing the spatial relationships between nodes, obtained based on the graph structure. W0 represents the learnable weight matrix connecting the input layer and the hidden layer. (2) denoted as the output matrix of the output layer of the graph convolutional neural network, Sigmoid represents the Sigmoid activation function, and W1 represents the learnable weight matrix connecting the hidden layer and the output layer.
[0122] It should be noted that this process inputs the fused feature vectors of the region blocks along with the graph structure into a graph convolutional neural network, enabling each node (region block) to fully integrate the contextual information and structural relationships of its neighboring regions when predicting its probability of androgenetic alopecia. The ReLU activation function is used to enhance nonlinear expressive power, while the Sigmoid output facilitates probabilistic interpretation, ultimately outputting the baldness risk value for each region. Compared to traditional CNNs, this method is more suitable for processing non-Euclidean structure data, possesses stronger spatial modeling capabilities and better discrimination of boundary transition regions, improving the fine-grained accuracy and stability of detection.
[0123] Specifically, the SLIC algorithm is used to divide hair images into multiple spatially coherent regions, and a fused feature vector is extracted for each region. By integrating the statistical features of composite invariants and topological information, a multi-dimensional model of the physiological characteristics of local regions is achieved. Next, a graph structure is constructed to connect adjacent regions, and edge weights are set based on the difference in the mean of composite invariants, thus accurately reflecting the structural correlation between regions. Subsequently, this graph structure and the features of each node are input into a graph convolutional neural network (GCN) for multi-layer convolutional propagation. While preserving local feature representation, it fully integrates neighborhood information, ultimately outputting the probability of androgenetic alopecia for each region. This process not only improves the model's understanding of spatial structure and multi-scale information but also enables accurate block identification of bald areas, effectively enhancing detection accuracy and region localization precision, and possessing high expressive power and medical interpretability.
[0124] S6: Define regions with a probability of androgenetic alopecia greater than the preset probability of androgenetic alopecia as having androgenetic alopecia; otherwise, define the corresponding regions as non-androgenetic alopecia.
[0125] It should be noted that those skilled in the art can set the preset probability of androgenetic alopecia according to actual needs, and this invention does not limit this.
[0126] In one possible implementation, after S6, the following is also included:
[0127] The regions with androgenetic alopecia are marked, and the marked hair images are output.
[0128] Understandably, by visually marking the identified androgenetic alopecia areas, the detection results can be intuitively overlaid onto the original hair image, making it easier for users or doctors to clearly identify the spatial distribution of bald patches.
[0129] In practical applications, an AI-based androgenetic alopecia detection method combines image processing, topology modeling, and graph convolutional neural networks to comprehensively construct a process from raw hair images to bald area identification. The method first extracts unit vectors and density features along the principal axis of the hair follicle, constructing composite invariants robust to illumination and angles. Then, topological analysis is used to obtain the evolutionary features of the hair follicle structure, forming a topological statistical vector. These multidimensional features are then input into a graph convolutional neural network, combined with spatial relationships between regions, to accurately determine the probability of androgenetic alopecia. Finally, the labeled results are output in a visual manner. The entire process integrates structural, density, topological, and contextual information, significantly improving the accuracy, interpretability, and adaptability of the detection, making it suitable for clinical auxiliary diagnosis and personalized intervention.
[0130] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0131] In this embodiment of the invention, by introducing the coupling information of the unit vector along the principal axis of the hair follicle and the hair follicle density, a composite invariant reflecting the changing patterns of hair follicle structure is constructed. Combined with topological statistical vectors, this accurately describes the spatial evolution characteristics of the hair follicle, effectively overcoming the limitation that relying solely on shallow features such as image grayscale and texture can easily lead to confusion with other types of hair loss. Simultaneously, by utilizing a graph convolutional neural network for structured learning of region blocks, fully considering spatial adjacency relationships and multi-scale feature fusion, the recognition accuracy and regional localization accuracy of androgenetic alopecia are significantly improved.
[0132] Reference manual attached Figure 2 The diagram shows a schematic representation of an artificial intelligence-based androgenic alopecia detection system provided in an embodiment of the present invention.
[0133] This invention provides an artificial intelligence-based androgenetic alopecia detection system 20, comprising: a processor 201 and a memory 202;
[0134] The memory 202 stores programs or instructions that can run on the processor 201. When the program or instructions are executed by the processor 201, they implement the steps of the above-described artificial intelligence-based androgenic alopecia detection method and achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.
[0135] It should be understood that the processor 201 in this embodiment of the invention may be a Central Processing Unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0136] It should also be understood that the memory 202 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM).
[0137] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0138] It should be understood that, in various embodiments of the present invention, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0139] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0141] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0142] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0143] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0144] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0145] This invention provides a readable storage medium comprising: storing a program or instructions on the readable storage medium, wherein when the program or instructions are executed by a processor, the program or instructions implement the steps of the above-described artificial intelligence-based androgenic alopecia detection method and achieve the same technical effect. To avoid repetition, this invention will not elaborate further.
[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting androgenetic alopecia based on artificial intelligence, characterized in that, include: S1: Obtain the hair image of the user to be detected; S2: Extract a unit vector describing the main axis direction of the hair follicle from the hair image; S3: Couple the unit vector with the hair follicle density to construct a composite invariant characterizing the mechanism of androgenetic alopecia; S4: Perform topological analysis on the hair image using the composite invariant to obtain a topological statistical vector describing the survival time of the hair follicle structure; S5: Input the composite invariant and the topological statistical vector into a pre-trained graph convolutional neural network to output the probability of androgenetic alopecia in different regions of the hair image; S6: The region block with a probability of androgenetic alopecia greater than the preset probability of androgenetic alopecia is determined to have androgenetic alopecia; otherwise, the corresponding region block is determined to be non-androgenetic alopecia. Specifically, S3 includes: S301: Calculate the degree of hair follicle orientation disorder based on the unit vector; S302: Obtain the hair follicle density gradient and median hair follicle density value based on the hair follicle density map; S303: Calculate the characteristic length describing the average spacing between hair follicles based on the median hair follicle density value; S304: Calculate the composite invariant by combining the hair follicle orientation disorder, the hair follicle density gradient, the median hair follicle density value, and the feature length; Specifically, S4 includes: S401: Divide the composite invariant into preset number levels according to different division thresholds, and determine the pixel range of each number level based on the division results; S402: By changing the partitioning threshold, the lifetime of the 1-dimensional homology class representing the ring structure is recorded to obtain a lifetime persistence map; S403: Extract the topological statistics vector from the lifecycle persistence graph, wherein the topological statistics vector includes the average lifecycle, the longest survival time, the number of ring structures, the mean of the occurrence time of the ring structure, and the standard deviation of the occurrence time of the ring structure; Specifically, S5 includes: S501: The hair image is divided into multiple region blocks using the SLIC algorithm; S502: Extract the fusion feature vector of each region block, wherein the fusion feature vector includes the mean of composite invariants, the standard deviation of composite invariants, and topological feature vector elements; S503: Connect the various region blocks to construct a graph structure, wherein the graph structure nodes are the region blocks, and the regions blocks with adjacent relationships are connected to form graph structure edges, and the weights of the graph structure edges are related to the mean of the composite invariant; S504: Input the graph structure and the fused feature vector of each region block into the graph convolutional neural network for graph convolution propagation, and output the androgenetic alopecia probability of each region block.
2. The artificial intelligence-based method for detecting androgenetic alopecia according to claim 1, characterized in that, S2 specifically includes: S201: Calculate the median gradient of the hair image; S202: Calculate the horizontal and vertical gradients of the hair image by combining the median gradient; S203: Based on the horizontal gradient and the vertical gradient, extract the direction angle of the hair follicle main axis direction using the arctangent function; S204: Extract a unit vector describing the direction of the hair follicle main axis based on the direction angle.
3. The artificial intelligence-based method for detecting androgenetic alopecia according to claim 1, characterized in that, The specific formula for calculating the composite invariant is as follows: in, Denotes composite invariants, Represents the number of pixels in a hair image ( x , y The unit vector corresponding to the position ) Indicates the degree of disorder in hair follicle orientation. Indicates the characteristic length. Indicates hair follicle density, Represents the hair follicle density gradient. This represents the median hair follicle density value.
4. The artificial intelligence-based method for detecting androgenetic alopecia according to claim 1, characterized in that, The loss function of the graph convolutional neural network during training is specifically as follows: in, Loss function value, This represents the cross-entropy loss function value used during training to determine whether an individual's hair loss falls into the androgenetic alopecia category. N This represents the total number of training samples. Indicates training samples j The true label, This indicates that the hair loss category is androgenetic alopecia. This indicates that the hair loss category is non-androgenic alopecia. This represents a graph convolutional neural network on training samples. j The predicted probability of belonging to the androgenetic alopecia category. Represents the logarithmic function. This represents the weighted value indicating the importance between the classification loss (cross-entropy loss function) and the topological constraint loss (L2 norm term). Describing the L2 norm, This represents a graph showing the lifespan duration predicted by a convolutional neural network for samples of androgenetic alopecia. A graph representing the true lifespan of androgenetic alopecia samples.
5. The artificial intelligence-based method for detecting androgenetic alopecia according to claim 1, characterized in that, Following S6, it also includes: The regions where androgenetic alopecia are present are marked, and the marked hair images are output.
6. An artificial intelligence-based androgenetic alopecia detection system, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the artificial intelligence-based androgenic alopecia detection method as described in any one of claims 1 to 5.
7. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the artificial intelligence-based androgenic alopecia detection method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Agent for shortening hair growth telogen
JP2012062294A
System and method for preventing alopecia
US20170135988A1