AI automatic charging method and system for picosecond removal of facial stains

By using AI-powered automatic billing methods, combined with computer vision and 3D geometric compensation technology, the lack of standardized billing in picosecond laser freckle removal treatment has been resolved. This has enabled accurate and transparent billing based on the area of ​​facial pigmentation, thus improving the patient's medical experience.

CN121983262APending Publication Date: 2026-05-05GUANGZHOU ZONERICH COMP EQUIP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU ZONERICH COMP EQUIP
Filing Date
2026-02-07
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The existing billing model for picosecond laser freckle removal treatment relies on the doctor's subjective experience and lacks a unified quantitative standard, resulting in a poor patient experience and easily leading to distrust and complaints.

Method used

An AI-based automatic billing method is adopted, which uses computer vision and 3D geometric compensation technology to identify pigmentation areas using a semantic segmentation model. It combines multi-scale Retinex and bilateral filtering algorithms to eliminate lighting interference, calculates gradient compensation coefficients, and achieves accurate billing of facial pigmentation area. A transparent billing mechanism is established through blockchain notarization.

Benefits of technology

This has enabled the objectivity and accuracy of billing for facial pigmentation treatment, improved the patient's medical experience, and ensured the transparency and immutability of billing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121983262A_ABST
    Figure CN121983262A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and relates to an AI automatic charging method and system for picosecond removal of facial stains, and the method comprises the steps: obtaining a facial image of a patient; preprocessing the face image to obtain a target image; inputting the target image into a trained semantic segmentation model to obtain a color spot region and a background region; marking a pixel point in the color spot area as a target pixel point; calculating a total spot area estimation coefficient of the patient; inputting the total spot area estimation coefficient into a preset mapping function to obtain treatment cost; and encrypting and outputting the face image, the total spot area estimation coefficient and the treatment cost. According to the invention, more objective fees are given, a non-tampering transparent charging mechanism is established, and the medical experience of the patient is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention generally relates to the field of image processing technology. More specifically, this invention relates to an AI-based automatic billing method and system for picosecond laser removal of facial pigmentation. Background Technology

[0002] Picosecond laser technology is a landmark innovation in modern optoelectronic cosmetic surgery, utilizing ultra-short pulse widths in the picosecond range to deliver energy. Picosecond lasers primarily generate a powerful photoacoustic effect, instantly shattering subcutaneous melanin granules into extremely fine dust-like substances, which are then rapidly metabolized and eliminated through the body's lymphatic system. Simultaneously, it significantly reduces the risk of thermal damage to surrounding normal skin tissue. With its superior pigment removal rate, extremely low side effects, and short post-operative recovery period, picosecond laser treatment for pigmentation disorders such as melasma, freckles, nevus of Ota, and blue-brown nevus has completely replaced traditional lasers, becoming the gold standard for treating these conditions.

[0003] However, the existing billing model remains at the rudimentary stage of relying on doctors' visual assessment. This method is highly dependent on doctors' subjective experience and lacks standardized quantitative criteria. For patients, the most direct feeling is that the billing process is too subjective: faced with various shapes and scattered distributions of pigmentation, the area values ​​given by doctors often confuse or even make patients doubtful. This billing method, lacking objective basis and full of subjective arbitrariness, directly leads to patients' distrust of medical institutions, turning what should be a simple diagnosis and treatment process into a cumbersome "bargaining" process, and even causing medical complaints, greatly lowering the user's medical experience. Summary of the Invention

[0004] To address the technical problems that may lead to a poor patient experience in existing picosecond laser freckle removal treatments, the present invention provides solutions in the following aspects.

[0005] In a first aspect, an AI-based automatic billing method for picosecond laser removal of facial pigmentation includes: obtaining a patient's facial image; preprocessing the facial image to obtain a target image; inputting the target image into a trained semantic segmentation model to obtain pigmentation regions and background regions; and recording pixels in the pigmentation regions as target pixels; wherein the semantic segmentation model is used to generate a binary semantic segmentation mask based on the target image; when the binary semantic segmentation mask... i Line number j When the number of pixels in column 1 is 1, the target image is... i Line number j The pixels in the column are the target pixels. i , jAll values ​​are positive integers; the calculation of the patient's total freckle area estimation coefficient includes: obtaining the coordinates of the center point of the facial image and the coordinates of each target pixel; calculating the gradient compensation coefficient of the target pixel based on the coordinates of the center point and the target pixel; calculating the total freckle area estimation coefficient based on the area gradient compensation coefficient of each target coordinate point; inputting the total freckle area estimation coefficient into a preset mapping function to obtain the treatment cost; and encrypting and outputting the facial image, the total freckle area estimation coefficient, and the treatment cost.

[0006] Preferably, the preprocessing of the facial image includes: estimating the illumination component and restoring the reflection component of the facial image using the multi-scale Retinex algorithm to obtain a first intermediate image; smoothing the first intermediate image using a bilateral filtering algorithm to obtain a second intermediate image; and converting the second intermediate image to the YCbCr color space to obtain the target image.

[0007] Preferably, calculating the gradient compensation coefficient of the target pixel includes: obtaining the patient's facial region in the facial image, and obtaining the length and width of the bounding rectangle of the patient's facial region, wherein the center coordinates of the bounding rectangle are the coordinates of the center point; calculating the cosine value of the facial skin surface angle corresponding to the target pixel based on the target pixel, the coordinates of the center point, and the length and width of the bounding rectangle, and determining the reciprocal of the cosine value as the gradient compensation coefficient of the target pixel.

[0008] Preferably, the formula for calculating the cosine value of the angle of the facial skin surface corresponding to the target pixel is: .

[0009] in, The cosine value of the angle of the facial skin surface corresponding to the target pixel. The difference between the x-axis coordinate of the target pixel and the x-axis coordinate of the center point. The difference between the ordinate of the target pixel and the ordinate of the center point. W Let be the length of the circumscribed rectangle. H The width of the circumscribed rectangle.

[0010] Preferably, the formula for calculating the total area estimation coefficient of the color spot is: ,in, K n For the first n Gradient compensation coefficients for each target pixel λ The pixel density constant is a preset size. n It is a positive integer. N This represents the total number of target pixels.

[0011] Preferably, inputting the total area estimation coefficient of the pigmentation spots into a preset mapping function to obtain the treatment cost includes: obtaining the type of pigmentation spots on the patient's face, and obtaining the mapping function according to the type index; wherein the first... k Mapping functions of various types The formula is: , S k For the first k Standard area values ​​corresponding to different types of facial pigmentation in patients. a k For the first k The standard cost value corresponding to the facial pigmentation of patients of different types is determined; the estimated coefficient of the total area of ​​the pigmentation is input into the mapping function to obtain the treatment cost.

[0012] Preferably, obtaining the patient's facial region in the facial image includes: converting the facial image into a single-channel grayscale image; performing gradient calculation on the single-channel grayscale image using an edge detection operator to extract a facial contour edge map; performing a morphological closing operation on the facial contour edge map to connect discontinuous edge segments into a closed facial contour; obtaining the connected regions inside the closed facial contour, and determining the connected region with the largest area as the patient's facial region.

[0013] Preferably, the encrypted output of the facial image, the total area estimation coefficient of the pigmentation, and the treatment cost includes: constructing a full-process diagnosis and treatment data package, wherein the data package contains the facial image, the total area estimation coefficient of the pigmentation, and the treatment cost; encrypting the full-process diagnosis and treatment data package using an encryption algorithm; calculating a unique digital hash digest of the full-process diagnosis and treatment data package; synchronously uploading the digital hash digest to the consortium blockchain network for distributed consensus notarization; and outputting the returned block transaction hash.

[0014] Preferably, obtaining the trained semantic segmentation model includes: obtaining multiple training samples, the training samples including training images and corresponding binary semantic segmentation masks, wherein the training images are historical clinical facial images including pigmented regions, and the corresponding binary semantic segmentation masks are manually annotated; obtaining an initial semantic segmentation model of the FCN architecture; and training the initial semantic segmentation model of the FCN architecture using the training set to obtain the trained semantic segmentation model.

[0015] In a second aspect, an AI-automated billing system for picosecond laser removal of facial pigmentation includes a processor and a memory, the memory storing a computer program, the processor executing the computer program to implement an AI-automated billing method for picosecond laser removal of facial pigmentation as described in any of the above-described inventions.

[0016] The beneficial effects of this invention are as follows: This invention achieves objectivity and accuracy in billing for facial pigmentation treatment by introducing computer vision and 3D geometric compensation technology. It utilizes multi-scale Retinex and bilateral filtering algorithms to eliminate illumination interference while preserving edge features, ensuring the objective accuracy of pigmentation recognition. This invention also addresses the problem of compressed projection area of ​​lateral pigmentation caused by the 3D curved surface of the face. By constructing an ellipsoidal model and calculating gradient compensation coefficients, geometric correction is performed on the target pixels, achieving accurate restoration from 2D projection to the actual physical area. Finally, combined with automatic price mapping, a more objective cost is provided, establishing an tamper-proof and transparent billing mechanism, significantly improving the patient's medical experience. Attached Figure Description

[0017] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent upon reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the invention are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein: Figure 1 This is a schematic flowchart illustrating the steps of an AI-automated billing method for picosecond laser removal of facial pigmentation according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the structure of an AI-automated billing system for picosecond laser removal of facial pigmentation according to this embodiment. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments 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 are within the scope of protection of the present invention.

[0019] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0020] Figure 1 This is a schematic flowchart illustrating the steps of an AI-automated billing method for picosecond laser removal of facial pigmentation according to an embodiment of the present invention.

[0021] like Figure 1 As shown, an AI-automated billing method for picosecond laser removal of facial pigmentation includes steps S1 to S4.

[0022] Step S1: Obtain the patient's facial image; preprocess the facial image to obtain the target image.

[0023] The facial image is In one embodiment, preprocessing the facial image includes: estimating the illumination component and recovering the reflection component of the facial image using a multi-scale Retinex algorithm to obtain a first intermediate image; smoothing the first intermediate image using a bilateral filtering algorithm to obtain a second intermediate image; and converting the second intermediate image to the YCbCr color space to obtain the target image.

[0024] It's important to note that the core idea of ​​the Retinex algorithm (MSR, Multi-Scale Retinex) is that the color of an object is determined by its surface's ability to reflect light (reflection component), and is independent of the intensity of the incident light (illumination component). In facial images, the original image can be viewed as the product of the incident light image and the object's reflected light image. The multi-scale Retinex algorithm filters the image at multiple scales (i.e., different sizes of Gaussian kernel standard deviations) and then sums them with weights. Large-scale filtering extracts global illumination information for dynamic range compression; small-scale filtering extracts local details.

[0025] Bilateral filtering is a non-linear edge-preserving smoothing filtering technique. Traditional black spot removal or noise reduction methods (such as Gaussian filtering) blur image edges while removing noise. However, the edge features of black spots are important criteria for calculating area and determining type. Therefore, this invention uses bilateral filtering algorithm, which considers both the spatial proximity of pixels and the similarity of pixel values.

[0026] Raw images are typically in RGB format, but the three RGB channels are highly correlated, and luminance and chrominance information are mixed together, making them susceptible to the influence of light intensity. The YCbCr color space separates the image into a luminance component and two chrominance components (Cb blue concentration shift component and Cr red concentration shift component). In medical image processing, human skin color and pigmentation exhibit better clustering properties in the YCbCr color space than in the RGB color space.

[0027] Step S2: Input the target image into the trained semantic segmentation model to obtain the color spot region and the background region; record the pixels in the color spot region as the target pixels.

[0028] The semantic segmentation model is used to generate a binary semantic segmentation mask based on the target image; when the binary semantic segmentation mask... i Line number j When the number of pixels in column 1 is 1, the target image is... i Line number j The pixels in the column are the target pixels. i , j All are positive integers.

[0029] In one embodiment, obtaining a trained semantic segmentation model includes: obtaining multiple training samples, each training sample including a training image and a corresponding binarized semantic segmentation mask, wherein the training image is a historical clinical facial image including a pigmented region, and the corresponding binarized semantic segmentation mask is manually annotated; obtaining an initial semantic segmentation model of the FCN architecture; and training the initial semantic segmentation model of the FCN architecture using the training set to obtain a trained semantic segmentation model.

[0030] It's important to note that the binarized semantic segmentation mask is the model's output, a matrix with the same resolution as the original image. Each element in the matrix corresponds to a pixel in the original image. In this mask, "1" can be defined as representing a color patch (target pixel), and "0" as representing the background. In one embodiment, the model output is typically a probability map (e.g., the probability of a pixel being a color patch is 0.8), and we need to set a threshold (e.g., 0.5) to hard-classify it as either 0 or 1.

[0031] Historical clinical facial images refer to desensitized photographs of real cases collected from hospitals or cosmetic clinics. These images must cover a variety of conditions: different Fitzpatrick skin types (from type I, fair skin, to type VI, dark skin), different types of pigmentation (such as freckles, melasma, age spots, nevus of Ota, etc.), and different lighting and angles. Manual annotation refers to experienced dermatologists using specialized software to trace the edges of pigmentation pixel by pixel.

[0032] FCN (Fully Convolutional Networks) architecture Step S3: Calculate the estimation coefficient of the total area of ​​the patient's pigmentation.

[0033] The calculation of the patient's total area of ​​pigmentation includes: obtaining the coordinates of the center point of the facial image and the coordinates of each target pixel; calculating the gradient compensation coefficient of the target pixel based on the coordinates of the center point and the coordinates of the target pixel; and calculating the total area of ​​pigmentation based on the area gradient compensation coefficient of each target coordinate point.

[0034] In one embodiment, calculating the gradient compensation coefficient of the target pixel includes: obtaining the patient's facial region in the facial image, and obtaining the length and width of the bounding rectangle of the patient's facial region, wherein the center coordinates of the bounding rectangle are the coordinates of the center point; calculating the cosine value of the facial skin surface angle corresponding to the target pixel based on the target pixel, the coordinates of the center point, and the length and width of the bounding rectangle, and determining the reciprocal of the cosine value as the gradient compensation coefficient of the target pixel.

[0035] It's important to note that simply calculating the area of ​​a pigmented spot by counting pixels will introduce significant errors. This is because the human face is a three-dimensional curved surface (approximately an ellipsoid). When a camera captures a face, it's essentially projecting a three-dimensional surface onto a two-dimensional plane (the imaging sensor). According to projection geometry, pigmented spots located at the very center of the face (such as the tip of the nose or the front of the cheekbone) have an image area close to their actual size; however, pigmented spots located on the sides of the face (such as the outer cheek or near the temple) will have their image area severely compressed in the photograph due to the large angle between their surface normal and the camera's optical axis (foreshortening effect). For example, a circular pigmented spot with a diameter of 1 cm on the side of the cheek may appear as an ellipse with a minor axis of only 0.5 cm in a frontal photograph, thus reducing the accuracy of determining the size of the pigmented spot.

[0036] In one embodiment, obtaining the patient's facial region in the facial image includes: converting the facial image into a single-channel grayscale image; performing gradient calculation on the single-channel grayscale image using an edge detection operator to extract a facial contour edge map; performing a morphological closing operation on the facial contour edge map to connect discontinuous edge segments into a closed facial contour; obtaining the connected regions inside the closed facial contour, and determining the connected region with the largest area as the patient's facial region.

[0037] It's important to note that edge detection operators (such as Sobel, Canny, or Laplacian) are used to extract facial contours. These operators work by calculating the gradient of pixel brightness in an image. At facial edges, there are often significant brightness abrupt changes (e.g., the boundary between facial skin and a dark background or hair). After calculating the gradient of the grayscale image, a facial contour edge map is obtained, where bright lines outline the approximate shape of the face. However, due to uneven lighting or hair occlusion, this edge map is usually discontinuous, containing many breaks and noise, and cannot directly form a closed region. This is where morphological closing operations are introduced. Morphological operations are shape-based image processing techniques. The closing operation involves first dilation and then erosion. The dilation operation expands the bright areas (edge ​​lines) in the image outwards. This step is crucial; it bridges broken edge fragments and fills in small gaps in the edges. The erosion operation shrinks the expanded area back, removing unnecessary jagged edges introduced during dilation and restoring the approximate original size of the contour. Through the closing operation, the originally discontinuous edge lines are transformed into a continuous, closed loop curve, and the smoothness is improved.

[0038] In the processed image, there may be multiple closed regions (such as the outlines inside the eyes and mouth, or clutter in the background). All closed regions are labeled using a connected component algorithm, and their areas are calculated. Based on anatomical knowledge, in a cropped and focused close-up of a face, the largest connected component is the face outline itself. Furthermore, the largest connected component is manually determined to be a region of the patient's face.

[0039] In one embodiment, the formula for calculating the cosine value of the angle of the facial skin surface corresponding to the target pixel is: .

[0040] in, The cosine value of the angle of the facial skin surface corresponding to the target pixel. The difference between the x-axis coordinate of the target pixel and the x-axis coordinate of the center point. The difference between the ordinate of the target pixel and the ordinate of the center point. W Let be the length of the circumscribed rectangle. H The width of the circumscribed rectangle.

[0041] It should be noted that this invention approximates the patient's head as a standard ellipsoid, that is, an ellipsoid obtained by rotating an ellipse about its major axis. Based on this, the length of the circumscribed rectangle... W That is, the major axis of a standard elliptic, and the width of its circumscribed rectangle. H These are the minor axis and height of a standard ellipsoid. The coordinates of the center point correspond to the coordinates of the ellipsoid's vertices. This represents the distance the pigmentation spot is horizontally offset from the center of the face. This represents the distance the pigmentation spot deviates vertically from the center of the face.

[0042] The equation of the ellipsoid is: This invention calculates the normal vector at any point on the surface. The analytical expression for the normal vector can be obtained by taking the partial derivative of the ellipsoid equation. Essentially, it is a normal vector. With camera gaze vector The cosine of the angle between (usually assumed to be the z-axis direction vector (0,0,1) perpendicular to the image plane) and (usually assumed to be the cosine of the angle between).

[0043] In one embodiment, the formula for calculating the total area estimation coefficient of the color spot is: ,in, K n For the first n Gradient compensation coefficients for each target pixel λ The pixel density constant is a preset size. n It is a positive integer. N This represents the total number of target pixels.

[0044] It should be noted that the pixel density constant λ The unit is usually pixels / mm (pixels per millimeter) or pixels / cm, which defines how many pixels in an image correspond to one unit of length in the real world. The dimensionless weighted total number of pixels is divided by... The resulting image then has a definite physical unit (such as a square millimeter). Pixel density constant λ It is a preset value, and the pixel density constant. λ The specific value can be obtained from the camera parameters used to capture facial images.

[0045] Step S4: Input the total area estimation coefficient of the pigmentation into a preset mapping function to obtain the treatment cost; encrypt the facial image, the total area estimation coefficient of the pigmentation, and the treatment cost before outputting them.

[0046] In one embodiment, inputting the total area estimation coefficient of the pigmentation spots into a preset mapping function to obtain the treatment cost includes: obtaining the type of pigmentation spots on the patient's face, and obtaining the mapping function according to the type index; wherein the first... k Mapping functions of various types The formula is: , S k For the first k Standard area values ​​corresponding to different types of facial pigmentation in patients. a k For the first k The standard cost value corresponding to the facial pigmentation of patients of different types is determined; the estimated coefficient of the total area of ​​the pigmentation is input into the mapping function to obtain the treatment cost.

[0047] It should be noted that, The basic unit size for billing is defined. For example, 10mm is defined. 2 A unit of light spot. The unit price for each "spot unit" is defined. For example, per 10mm 2 The fee is 50 yuan. Mapping function. Essentially, this calculates the price per square millimeter. Different types of pigmentation (such as deep nevi and superficial freckles) have different treatment difficulties, laser wavelengths, pulse widths, and risks, therefore the price must differ. In one embodiment, after manually identifying the type of pigmentation, the corresponding price list is automatically retrieved, eliminating arbitrary manual pricing.

[0048] In one embodiment, encrypting and outputting the facial image, the total area estimation coefficient of the pigmentation, and the treatment cost includes: constructing a full-process treatment data package, wherein the data package contains the facial image, the total area estimation coefficient of the pigmentation, and the treatment cost; encrypting the full-process treatment data package using an encryption algorithm; calculating a unique digital hash digest of the full-process treatment data package; synchronously uploading the digital hash digest to the consortium blockchain network for distributed consensus storage; and outputting the returned block transaction hash.

[0049] It should be noted that the full-process data package combines the original facial image, the estimated coefficient of the total area of ​​pigmentation, and the treatment cost together, which constitutes a complete chain of evidence.

[0050] The hash digest uses encryption algorithms such as SHA-256 to generate a unique hash value for the entire medical data package described above. If even a single pixel in the original image is changed, or the cost is altered by even a penny, the generated hash value will completely change. This hash value is then uploaded to a consortium blockchain node. Consortium blockchains are typically maintained jointly by hospitals, insurance companies, regulatory agencies, and technology service providers. Once the data is on the blockchain, it is replicated to all nodes, making it immutable and undeletable. Patients and hospitals can query data on the blockchain using the hash value.

[0051] Figure 2 This is a schematic diagram illustrating the structure of an AI-automated billing system for picosecond laser removal of facial pigmentation according to this embodiment.

[0052] This invention also provides an AI-based automatic billing system for picosecond laser treatment of facial pigmentation. For example... Figure 2 As shown, the system includes a processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement an AI-based automatic billing method for picosecond laser removal of facial pigmentation according to the first aspect of the present invention.

[0053] The system also includes other components well known to those skilled in the art, such as communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0054] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions that can be stored or otherwise maintained by such a computer-readable medium.

[0055] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise explicitly specified.

[0056] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. An AI-based automatic billing method for picosecond laser treatment of facial pigmentation, characterized in that, include: Obtain the patient's facial image; The facial image is preprocessed to obtain the target image; The target image is input into the trained semantic segmentation model to obtain the color spot region and the background region; The pixels in the color spot area are recorded as the target pixels; The semantic segmentation model is used to generate a binary semantic segmentation mask based on the target image; when the binary semantic segmentation mask... i Line number j When the number of pixels in column 1 is 1, the target image is... i Line number j The pixels in the column are the target pixels. i , j All are positive integers; Calculating the total area estimation coefficient of the patient's pigmentation spots includes: obtaining the coordinates of the center point of the facial image and the coordinates of each target pixel; calculating the gradient compensation coefficient of the target pixel based on the coordinates of the center point and the coordinates of the target pixel; and calculating the total area estimation coefficient of the pigmentation spots based on the area gradient compensation coefficient of each target coordinate point. The total area estimation coefficient of the pigmentation spots is input into a preset mapping function to obtain the treatment cost; the facial image, the total area estimation coefficient of the pigmentation spots, and the treatment cost are encrypted and then output.

2. The AI-automated billing method for picosecond laser removal of facial pigmentation as described in claim 1, characterized in that, Preprocessing the facial image includes: The first intermediate image is obtained by estimating the illumination component and restoring the reflection component of the facial image using the multi-scale Retinex algorithm. The first intermediate image is smoothed using a bilateral filtering algorithm to obtain the second intermediate image; The second intermediate image is converted to the YCbCr color space to obtain the target image.

3. The AI-automated billing method for picosecond laser removal of facial pigmentation as described in claim 1, characterized in that, Calculating the gradient compensation coefficients for the target pixel includes: Obtain the patient's facial region in the facial image, and obtain the length and width of the bounding rectangle of the patient's facial region, wherein the center coordinates of the bounding rectangle are the coordinates of the center point; The cosine value of the facial skin surface angle corresponding to the target pixel is calculated based on the target pixel, the coordinates of the center point, and the length and width of the bounding rectangle, and the reciprocal of the cosine value is determined as the gradient compensation coefficient of the target pixel.

4. The AI-automated billing method for picosecond laser removal of facial pigmentation as described in claim 3, characterized in that, The formula for calculating the cosine of the angle of the facial skin surface corresponding to the target pixel is: ; in, The cosine value of the angle of the facial skin surface corresponding to the target pixel. The difference between the x-axis coordinate of the target pixel and the x-axis coordinate of the center point. The difference between the ordinate of the target pixel and the ordinate of the center point. W Let be the length of the circumscribed rectangle. H The width of the circumscribed rectangle.

5. The AI-automated billing method for picosecond laser removal of facial pigmentation as described in claim 4, characterized in that, The formula for calculating the estimated coefficient of the total area of ​​the discolored spots is as follows: ,in, K n For the first n Gradient compensation coefficients for each target pixel λ The pixel density constant is a preset size. n It is a positive integer. N This represents the total number of target pixels.

6. The AI-automated billing method for picosecond laser removal of facial pigmentation according to claim 5, characterized in that, The estimated coefficient of the total area of ​​the pigmentation is input into a preset mapping function to obtain the treatment cost, which includes: Obtain the type of facial pigmentation of the patient, and obtain the mapping function based on the type index; where the first... k Mapping functions of various types The formula is: , S k For the first k Standard area values ​​corresponding to different types of facial pigmentation in patients. a k For the first k The standard cost values ​​corresponding to different types of facial pigmentation in patients; The total area estimation coefficient of the pigmentation spots is input into the mapping function to obtain the treatment cost.

7. The AI-automated billing method for picosecond laser removal of facial pigmentation according to claim 3, characterized in that, Obtaining the patient's facial region in the facial image includes: The facial image is converted into a single-channel grayscale image; gradient calculation is performed on the single-channel grayscale image using an edge detection operator to extract the facial contour edge map; A morphological closing operation is performed on the facial contour edge map to connect discontinuous edge segments into a closed facial contour; the connected regions inside the closed facial contour are obtained, and the connected region with the largest area is determined as the patient's facial region.

8. The AI-automated billing method for picosecond laser removal of facial pigmentation according to claim 1, characterized in that, The encrypted output of the facial image, the total area estimation coefficient of pigmentation spots, and the treatment cost includes: Construct a complete diagnosis and treatment data package, which includes the facial image, the estimated coefficient of the total area of ​​the pigmentation, and the treatment cost. The entire process of diagnosis and treatment data is encrypted using an encryption algorithm, and a unique digital hash digest of the entire process of diagnosis and treatment data is calculated. The digital hash digest is synchronously uploaded to the consortium blockchain network for distributed consensus storage, and the returned block transaction hash is output.

9. The AI-automated billing method for picosecond laser removal of facial pigmentation according to claim 1, characterized in that, The completed semantic segmentation model includes: Multiple training samples are obtained, including training images and corresponding binary semantic segmentation masks. The training images are historical clinical facial images including pigmented regions, and the corresponding binary semantic segmentation masks are manually annotated. Obtain the initial semantic segmentation model of the FCN architecture; train the initial semantic segmentation model of the FCN architecture using the training set to obtain the trained semantic segmentation model.

10. An AI-powered automatic billing system for picosecond laser treatment of facial pigmentation, comprising a processor and a memory, characterized in that, The memory stores a computer program, and the processor executes the computer program to implement an AI-based automatic billing method for facial pigmentation removal using picosecond lasers, as described in any one of claims 1-9.