GAN-based abnormal biochemical test report image restoration method and device

By generating an adversarial network model based on GAN, the problem of poor repair effect in the image repair technology of biochemical test report form is solved, and efficient repair of abnormal situations such as data loss, blur and stain occlusion is achieved, ensuring the recovery of image details and semantic information, adapting to diverse abnormalities, and improving the accuracy and efficiency of clinical diagnosis.

CN120510985AInactive Publication Date: 2025-08-19CHONGMING HOSPITAL AFFILIATED TO SHANGHAI HEALTH MEDICAL COLLEGE (CHONGMING BRANCH OF XINHUA HOSPITAL AFFILIATED TO SHANGHAI JIAO TONG UNIV SCHOOL OF MEDICINE SHANGHAI CHONGMING DISTRICT CENT HOSPITAL)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510589713.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing biochemical test report image repair technology is poor in handling abnormal situations such as data loss, blurring and stain occlusion, and cannot accurately restore image details and semantic information. It is also lacking in targeting, affecting the accuracy and efficiency of clinical diagnosis.

Method used

A conditionally generated adversarial network (cGAN) model is adopted based on a generative adversarial network (GAN), combining image preprocessing, abnormal area detection, dynamic loss optimization and post-processing, an image repair model is built, and through the adversarial learning between the generator and the discriminator, abnormal areas are restored and medical application requirements are met.

Benefits of technology

It realizes high-quality repair of the biochemical test report images, accurately restores image details and semantic information, adapts to diverse abnormal situations, and ensures the reliability and accuracy of repair results in medical diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120510985A_ABST
    Figure CN120510985A_ABST
Patent Text Reader

Abstract

The invention discloses a GAN-based abnormal biochemical test report image restoration method and device, and the method specifically comprises the steps: firstly carrying out the abnormal region detection and marking of a biochemical test report image, and building an abnormal image sample database; secondly, adopting a conditional GAN model, taking a normal report image as conditional input, constructing a mapping relation between an abnormal image and a normal image, and training an image restoration model; then, the trained repair model is utilized to perform repair generation on the abnormal region, and a repaired complete image is obtained; and finally, the authenticity and consistency of the repaired image are evaluated through the image quality evaluation index to ensure that the repaired image meets the medical clinical diagnosis requirements. According to the method, automatic image restoration is realized through the GAN model, the problems of poor restoration effect, high labor cost and low efficiency in a traditional method are effectively solved, and the method has the advantages of high accuracy, high adaptability, wide application value and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and in particular to a method and device for repairing abnormal biochemical test report images based on GAN. Background Art

[0002] In today's rapidly developing medical information technology, the image quality of biochemical test reports is crucial as they serve as a key basis for disease diagnosis and treatment. However, in practice, biochemical test report images often exhibit various abnormalities, posing numerous challenges to clinical diagnosis.

[0003] Data loss: During the printing, transmission, or storage of reports, some data may be lost due to equipment failure, network interruption, etc. For example, missing information such as the values of certain key indicators and test times makes it difficult for doctors to obtain complete test information, which in turn affects the accuracy of diagnosis.

[0004] Blurred images: Low printer toner, low scanning resolution, or reports that have been rubbed or contaminated during use can all cause blurred images. Blurred information, such as the names of test items and specific data values, can be difficult for doctors to decipher, leading to misdiagnosis or missed diagnosis.

[0005] Stains and obstructions: During storage or circulation, reports may be stained with stains such as blood, water, and dust. These stains can obscure important information, preventing doctors from obtaining complete test results and delaying diagnosis and treatment.

[0006] Currently, methods for addressing these abnormalities have significant shortcomings. Traditional image restoration techniques, such as interpolation-based methods, often simply fill in pixels when dealing with complex abnormal regions, failing to restore image detail and semantic information, resulting in unsatisfactory restoration results. While deep learning-based methods have made some progress, most models fail to fully consider the specific characteristics of biochemical test report images and lack specificity. For example, existing models struggle to accurately restore special information such as medical terminology and data formats found in reports, resulting in limitations in the use of restored images in medical applications. Furthermore, existing methods lack versatility in handling different types of abnormalities and are unable to adapt to diverse abnormalities, severely impacting the efficiency and accuracy of clinical diagnosis. A more effective method for restoring abnormal biochemical test report images is urgently needed. Generative Adversarial Networks (GANs), a deep learning model primarily used to generate new data samples, have been widely applied in image generation and image restoration. They learn the distribution of data through adversarial game learning, thereby generating images with high fidelity and diversity. Summary of the Invention

[0007] The purpose of this invention is to provide a GAN-based method and device for restoring abnormal biochemical test report images, aiming to address the shortcomings of existing biochemical test report image restoration technologies. By constructing a targeted conditional generative adversarial network model and combining multiple collaborative processes such as image preprocessing, abnormal region detection, dynamic loss optimization, and post-processing, high-quality restoration of abnormal biochemical test report images can be achieved. Specifically, it can accurately identify and repair various abnormal regions such as missing data, blur, and stain occlusion, restore image details and semantic information, and ensure that the restored image is authentic and reliable in medical applications.

[0008] For this reason, the technical solution adopted in the present invention is as follows:

[0009] A GAN-based abnormal biochemical test report image restoration method comprises the following steps: S1, collecting and arranging biochemical test report image data, marking abnormal areas, and constructing a paired database of abnormal images and normal images; collecting and arranging a medical terminology database; S2, preprocessing the paired database data, including image normalization, size adjustment, and abnormal area mask processing; S3, using a conditional generative adversarial network (cGAN), taking the normal image as a conditional input, constructing a mapping relationship between the abnormal area of the abnormal image and the normal area of the normal image, and establishing an image restoration model; S4, training the conditional generative adversarial network, and using the generator and the discriminator to confront each other. The network parameters are optimized by the formula until the image restoration model converges; S5, the abnormal image is restored by using the trained image restoration model to generate a restored image; a semantic understanding model is introduced to extract and analyze the text information in the restored image, and whether the restored image data conforms to the medical terminology according to the medical terminology database is determined; if it does not conform, the parameters of the image restoration model are readjusted; S6, image quality evaluation indicators, including peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM), are used to quantitatively evaluate the restored image, and step S4 is re-executed for the abnormal image corresponding to the peak signal-to-noise ratio and structural similarity index of the restored image that exceed the preset threshold.

[0010] Furthermore, the marking of abnormal areas in step S1 specifically involves manually marking abnormal areas in the biochemical test report image, wherein the abnormal areas include areas with missing data, blur, or stains.

[0011] Furthermore, the resizing in step S2 is to uniformly resize all images to the same resolution to conform to the input format of the image restoration model;

[0012] The abnormal area mask processing is to generate a mask image with the same resolution as the original abnormal image, and set the position corresponding to the abnormal area to 1 and the normal area to 0.

[0013] Furthermore, the conditional generative adversarial network in step S3 is composed of a generator G and a discriminator D. The goal of the generator G is to map the input abnormal image and condition information into a repaired image, where the condition information is a normal image. The loss function formula is:

[0014] L G =E x,y [log(1-D(y,x,G(x,y)))]

[0015] Among them, L G is the loss function of the generator, x represents the abnormal image, y represents the normal image, E represents the expected operation, G is the generator function, and D is the discriminator function;

[0016] The goal of the discriminator D is to distinguish between real normal images and repaired images generated by the generator. Its loss function formula is:

[0017] L D =E x,y [log(D(y,x,y))]+E x,y [log(1-D(y,x,G(x,y)))]

[0018] Among them, L D is the loss function of the discriminator.

[0019] Furthermore, the conditional generative adversarial network described in step S4 is trained, and the optimization algorithm adopted is Adam to update the parameters of the generator and the discriminator; in each iteration, the generator and the discriminator are trained alternately until the loss functions of the generator and the discriminator converge to a stable value.

[0020] Furthermore, the restoration process in step S5 takes the abnormal image and the corresponding normal image as input, and outputs the restored image through forward propagation of the generator.

[0021] Furthermore, in step S5, the semantic understanding model determines whether the restoration result conforms to the medical terminology through a semantic consistency judgment formula, and adjusts the image restoration model parameters;

[0022] The semantic consistency judgment formula is expressed as follows:

[0023] The medical term set extracted from the restored image is T = {t1, t2, ..., t n}, the medical term database is A={d1,d2,...,d m}, n is the number of medical terms in the restored image, and m is the number of medical terms in the medical term database;

[0024] For each medical term t in the restored image i Calculate the semantic similarity loss L sim , for each t i , calculate its semantic difference with the nearest neighbor term in A:

[0025]

[0026] Among them, sim(t i ,d j ) is each medical term t in the restored image i The medical terminology database j The similarity of L sim If the value is greater than the preset threshold, the parameters of the image restoration model are readjusted;

[0027] The parameters of the image restoration model are readjusted, the semantic similarity loss is added to the loss of the generator, and the parameters are adjusted through backpropagation, which is expressed as follows:

[0028] L G =L G +λL sim

[0029] Among them, L G is the generator loss, L sim is the semantic similarity loss, λ is the weight of the semantic loss, and controls the balance between image restoration quality and semantic consistency.

[0030] Furthermore, the calculation formula of the peak signal-to-noise ratio in step S6 is:

[0031]

[0032] Among them, MAX I is the maximum possible value of the image pixel value, and MSE is the mean square error between the repaired image and the original normal image, calculated as:

[0033]

[0034] Where b and c are the number of rows and columns of the image, respectively. original is the normal image, I repaired is the restored image;

[0035] The calculation formula of the structural similarity index (SSIM) is:

[0036]

[0037] Among them, μ x and μ y are the mean of images x and y, σ x and σ y are the standard deviations of images x and y, σ xy is the covariance of images x and y, and C1 and C2 are constants used to stabilize the calculation.

[0038] Furthermore, in step S6, when the peak signal-to-noise ratio and the structural similarity index are used to judge the restoration result, the specific judging method is as follows:

[0039] For the peak signal-to-noise ratio, when the calculated peak signal-to-noise ratio value is greater than a set threshold, the restoration result is highly identical to the original normal image in terms of brightness and contrast;

[0040] For the structural similarity index, when the calculated structural similarity index value is greater than a set threshold, it indicates that the restored image is identical to the original normal image in terms of structural information;

[0041] When the peak signal-to-noise ratio and the structural similarity index are both greater than the set threshold, it indicates that the repair effect meets the requirements.

[0042] A GAN-based abnormal biochemical test report image repair device, comprising:

[0043] Data collection and annotation module: This module is responsible for collecting biochemical test report image data, carefully inspecting and marking abnormal areas, and pairing normal images with corresponding abnormal images to build a paired database for subsequent processing.

[0044] Preprocessing module: connected to the data acquisition and annotation module, this module performs a series of preprocessing operations on the input paired database data, including image normalization, size adjustment, and abnormal area mask processing;

[0045] Image restoration model construction module: This module uses conditional generative adversarial network technology, with normal images as the guiding condition, to construct a mapping relationship from abnormal areas of abnormal images to normal areas of normal images. Both the generator and the discriminator adopt convolutional neural network structures.

[0046] Model training module: trains the constructed conditional generative adversarial network. During the training process, the generator and discriminator compete with each other and continuously optimize their respective network parameters.

[0047] Image restoration execution module: Using a trained and stable image restoration model, the abnormal image to be restored and the corresponding normal image are input into the model. After processing by the generator, the restored image is output. At the same time, a semantic understanding model is introduced to determine whether the restored image data conforms to medical terminology based on the medical terminology database. If not, the parameters of the image restoration model are readjusted.

[0048] Restoration effect evaluation and output module: Use peak signal-to-noise ratio and structural similarity index to evaluate the quality of the restored image.

[0049] Compared with the prior art, the advantages of the present invention are:

[0050] (1) Accurately repair image details: This invention uses the cGAN model to accurately map the repair direction of abnormal areas based on the normal image. Traditional interpolation methods simply fill pixels and are ineffective. However, the generator and discriminator of this invention work together to effectively restore image details and semantics. For example, blurred medical data and obscured test item names can be clearly restored, significantly improving the accuracy of repair.

[0051] (2) Highly adaptable to report images: The image characteristics of biochemical test reports are fully considered. Preprocessing highlights abnormal areas, and the anomaly detection module accurately locates them. The multi-scale generator takes into account both global semantics and local details, and can restore medical terminology and data formats in a targeted manner. It is more suitable for report repair needs than general deep learning models, ensuring that the repair results meet medical diagnostic requirements.

[0052] (3) Flexible response to diverse anomalies: The dynamic loss optimization module is key. It integrates multiple losses and dynamically adjusts weights, allowing the model to adapt to different anomalies. Traditional methods have poor versatility and are unable to cope with complex anomalies. This invention can easily handle various situations such as missing data and occlusion, automatically adjust the repair strategy, and has a wider range of applications.

[0053] (4) Ensure stable repair quality: The PSNR and SSIM metrics are used to evaluate the repair effect and establish a closed-loop optimization system. If the repair does not meet the standard, the model is retrained. Existing technologies often lack a complete evaluation and optimization mechanism, resulting in unstable repair quality. The present invention ensures that each repair meets high quality standards through continuous optimization, providing a reliable basis for medical diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0055] Figure 1 is a flow chart of the method of the present invention;

[0056] Figure 2 This is a flow chart of step S2 of the present invention;

[0057] Figure 3 This is a flow chart of step S5 of the present invention. DETAILED DESCRIPTION

[0058] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0059] Example 1: Please refer to Figure 1 As shown, the GAN-based abnormal biochemical test report image repair method described in this embodiment includes the following steps:

[0060] S1. Collect and organize biochemical test report image data, mark abnormal areas, and build a paired database of abnormal and normal images; collect and organize a medical terminology database;

[0061] The paired database and the medical terminology database are obtained from the information system of the medical department through establishing a cooperative relationship with the medical department, and abnormal images and normal images are collected from the public medical image database;

[0062] The collating cleans the image data stored in the database, checks whether the images are damaged or incomplete, marks and deletes the images that are damaged beyond repair, and removes duplicate image data to avoid data redundancy.

[0063] Specifically, the marking of abnormal areas is to mark abnormal areas in the biochemical test report image by manual marking, and the abnormal areas include data missing, blur, stain and occlusion.

[0064] S2. Preprocess the paired database data, including image normalization, size adjustment, and abnormal area mask processing, referring to Figure 2 As shown;

[0065] The formula used for image normalization is:

[0066]

[0067] Among them, I is the normal image pixel value, Imin and I max are the minimum and maximum pixel values in the normal image, I norm is the normalized image pixel value;

[0068] The resizing is to uniformly adjust all images to the same resolution to conform to the input format of the image restoration model;

[0069] The abnormal area mask processing is to generate a mask image with the same resolution as the original abnormal image, and set the position corresponding to the abnormal area to 1 and the normal area to 0.

[0070] S3. Using a conditional generative adversarial network (cGAN), with the normal image as a conditional input, constructing a mapping relationship between the abnormal region of the abnormal image and the normal region of the normal image, and establishing an image restoration model;

[0071] The conditional generative adversarial network in step S3 consists of a generator G and a discriminator D. The goal of the generator G is to map the input abnormal image and conditional information into a repaired image, where the conditional information is a normal image. The loss function formula is:

[0072] L G =E x,y [log(1-D(y,x,G(x,y)))]

[0073] Among them, L G is the loss function of the generator, x represents the abnormal image, y represents the normal image, E represents the expected operation, G is the generator function, and D is the discriminator function;

[0074] The goal of the discriminator D is to distinguish between real normal images and repaired images generated by the generator. Its loss function formula is:

[0075] L D =E x,y [log(D(y,x,y))]+E x,y [log(1-D(y,x,G(x,y)))]

[0076] Among them, L D is the loss function of the discriminator.

[0077] S4. Train the conditional generative adversarial network and optimize the network parameters by using the generator and discriminator to compete with each other until the image restoration model converges.

[0078] The conditional generative adversarial network is trained using the Adam optimization algorithm to update the parameters of the generator and discriminator. In each iteration, the generator and discriminator are trained alternately until the loss functions of the generator and discriminator converge to stable values.

[0079] During the training process of step S4, in order to prevent the model from overfitting, regularization terms are added to the generator and discriminator. The loss function formula of L2 regularization is:

[0080]

[0081] Wherein, L is the original loss function (in this embodiment, it refers to the loss function of the generator and the discriminator), λ is the regularization parameter, W is the parameter set of the model, and w is each parameter in the parameter set.

[0082] S5. Use the trained image restoration model to restore the abnormal image and generate a restored image. Introduce a semantic understanding model to extract and analyze the text information in the restored image and determine whether the restored image data conforms to the medical terminology according to the medical terminology database. If not, readjust the parameters of the image restoration model and refer to Figure 3 As shown;

[0083] The repair process takes the abnormal image and the corresponding normal image as input, passes through the forward propagation of the generator, and outputs the repaired image.

[0084] The semantic understanding model determines whether the restoration result conforms to medical terminology through a semantic consistency judgment formula, and adjusts the image restoration model parameters;

[0085] The semantic consistency judgment formula is expressed as follows:

[0086] The medical term set extracted from the restored image is T = {t1, t2, ..., t n}, the medical term database is A={d1,d2,...,d m}, n is the number of medical terms in the restored image, and m is the number of medical terms in the medical term database;

[0087] For each medical term t in the restored image i Calculate the semantic similarity loss L sim , for each t i , calculate its semantic difference with the nearest neighbor term in A:

[0088]

[0089] Among them, sim(t i ,dj ) is the relationship between each medical term t in the restored image and d in the medical term database j The similarity of L sim If the value is greater than the preset threshold, the parameters of the image restoration model are readjusted;

[0090] The parameters of the image restoration model are readjusted, the semantic similarity loss is added to the loss of the generator, and the parameters are adjusted through backpropagation, which is expressed as follows:

[0091] L G =L G +λL sim

[0092] Among them, L G is the generator loss, L sim is the semantic similarity loss, λ is the weight of the semantic loss, and controls the balance between image restoration quality and semantic consistency.

[0093] S6. Quantitatively evaluate the restored image using image quality evaluation indicators, including peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM). For abnormal images whose peak signal-to-noise ratio and structural similarity index of the restored image exceed preset thresholds, re-execute step S4.

[0094] The calculation formula of the peak signal-to-noise ratio is:

[0095]

[0096] Among them, MAX I is the maximum possible value of the image pixel value, and MSE is the mean square error between the repaired image and the original normal image, calculated as:

[0097]

[0098] Where b and c are the number of rows and columns of the image, respectively. original is the original normal image, I repaired is the restored image; the calculation formula of the structural similarity index (SSIM) is:

[0099]

[0100] Among them, μ x and μ y are the mean of images x and y, σ x and σ y are the standard deviations of images x and y, σ xy is the covariance of images x and y, and C1 and C2 are constants used to stabilize the calculation.

[0101] When the peak signal-to-noise ratio and structural similarity index are used to judge the restoration results in step S6, the specific judging method is as follows:

[0102] For the peak signal-to-noise ratio, when the calculated peak signal-to-noise ratio value is greater than a set threshold, the restoration result is highly identical to the original normal image in terms of brightness and contrast;

[0103] For the structural similarity index, when the calculated structural similarity index value is greater than a set threshold, it indicates that the restored image is identical to the original normal image in terms of structural information;

[0104] When the peak signal-to-noise ratio and the structural similarity index are both greater than the set threshold, it indicates that the repair effect meets the requirements.

[0105] The retraining is to repair the abnormal images and the corresponding normal image data whose effects do not meet the requirements, and re-execute steps S3 and S4.

[0106] A GAN-based abnormal biochemical test report image repair device, comprising:

[0107] Data acquisition and annotation module: responsible for collecting biochemical test report image data, carefully inspecting and marking abnormal areas, and pairing normal images with corresponding abnormal images to build an image database for subsequent processing;

[0108] Preprocessing module: connected to the data acquisition and annotation module, this module performs a series of preprocessing operations on the input image data, including image normalization, size adjustment, and abnormal area mask processing;

[0109] Image restoration model construction module: This module uses conditional generative adversarial network technology, using normal report images as guidance to construct a mapping relationship from abnormal areas to normal areas. Both the generator and the discriminator use convolutional neural network structures.

[0110] Model training module: trains the constructed conditional generative adversarial network. During the training process, the generator and discriminator compete with each other and continuously optimize their respective network parameters.

[0111] Image restoration execution module: Using a trained and stable image restoration model, the abnormal report image to be restored and the corresponding normal report image are input into the model, and the restored image is output through processing by the generator;

[0112] Restoration effect evaluation and output module: Use peak signal-to-noise ratio and structural similarity index to evaluate the quality of the restored image.

[0113] The above formulas are dimensionless and use only numerical values for calculations. These formulas are based on extensive data and software simulations, and are intended to be as close to actual conditions as possible. Those skilled in the art can adjust the preset parameters in the formulas based on their specific needs.

[0114] Throughout this specification, references to terms such as "one embodiment," "example," or "specific example" indicate that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0115] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the present invention to specific embodiments. Obviously, many modifications and variations are possible based on the contents of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A GAN-based abnormal biochemical test report image restoration method, characterized in that: The following steps are involved: S1. Collect and organize biochemical test report image data, mark abnormal areas, and build a paired database of abnormal and normal images; Collect and organize medical terminology database; S2. Preprocessing the paired database data, including image normalization, size adjustment, and abnormal area mask processing; S3. Using a conditional generative adversarial network (cGAN), with the normal image as a conditional input, constructing a mapping relationship between the abnormal region of the abnormal image and the normal region of the normal image, and establishing an image restoration model; S4. Train the conditional generative adversarial network and optimize the network parameters by using the generator and discriminator to compete with each other until the image restoration model converges. S5. Use the trained image restoration model to restore the abnormal image and generate a restored image. A semantic understanding model is introduced to extract and analyze text information in the restored image, and determine whether the restored image data conforms to medical terminology according to the medical terminology database; if not, the parameters of the image restoration model are readjusted; S6. Use image quality evaluation indicators, including peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM), to quantitatively evaluate the repaired image, and re-execute step S4 for the abnormal images corresponding to the peak signal-to-noise ratio and structural similarity index of the repaired image that exceed the preset threshold.

2. The method according to claim 1, characterized in that The marking of abnormal areas in step S1 specifically involves manually marking abnormal areas in the biochemical test report image, wherein the abnormal areas include areas with missing data, blur, or stains.

3. The method according to claim 1, characterized in that The resizing in step S2 is to uniformly adjust all images to the same resolution to conform to the input format of the image restoration model; The abnormal area mask processing is to generate a mask image with the same resolution as the original abnormal image, and set the position corresponding to the abnormal area to 1 and the normal area to 0.

4. The method according to claim 1, wherein The conditional generative adversarial network in step S3 consists of a generator G and a discriminator D. The goal of the generator G is to map the input abnormal image and conditional information into a repaired image, where the conditional information is a normal image. The loss function formula is: L G =E x,y [log(1-D(y,x,G(x,y)))] Among them, L G is the loss function of the generator, x represents the abnormal image, y represents the normal image, E represents the expected operation, G is the generator function, and D is the discriminator function; The goal of the discriminator D is to distinguish between real normal images and repaired images generated by the generator. Its loss function formula is: L D =E x,y [log(D(y,x,y))]+E x,y [log(1-D(y,x,G(x,y)))] Among them, L D is the loss function of the discriminator.

5. The method according to claim 4, characterized in that The conditional generative adversarial network described in step S4 is trained, and the optimization algorithm adopted is Adam to update the parameters of the generator and the discriminator; in each iteration, the generator and the discriminator are trained alternately until the loss functions of the generator and the discriminator converge to a stable value.

6. The method according to claim 1, characterized in that The repair process in step S5 takes the abnormal image and the corresponding normal image as input, passes through the forward propagation of the generator, and outputs the repaired image.

7. The method according to claim 1, characterized in that In step S5, the semantic understanding model determines whether the restoration result conforms to the medical terminology through a semantic consistency judgment formula, and adjusts the image restoration model parameters; The semantic consistency judgment formula is expressed as follows: The medical term set extracted from the restored image is T = {t1, t2, ..., t n }, the medical term database is A={d1,d2,...,d m }, n is the number of medical terms in the restored image, and m is the number of medical terms in the medical term database; For each medical term t in the restored image i Calculate the semantic similarity loss L sim , for each t i , calculate its semantic difference with the nearest neighbor term in A: Among them, sim(t i ,d j ) is the relationship between each medical term t in the restored image and d in the medical term database j The similarity of L sim If the value is greater than the preset threshold, the parameters of the image restoration model are readjusted; The parameters of the image restoration model are readjusted, the semantic similarity loss is added to the loss of the generator, and the parameters are adjusted through backpropagation, which is expressed as follows: THE G =L G +λL sim Among them, L G is the generator loss, L sim is the semantic similarity loss, λ is the weight of the semantic loss, and controls the balance between image restoration quality and semantic consistency.

8. The method according to claim 1, characterized in that The calculation formula of the peak signal-to-noise ratio in step S6 is: Among them, MAX I is the maximum possible value of the image pixel value, and MSE is the mean square error between the repaired image and the original normal image, calculated as: Where b and c are the number of rows and columns of the image, respectively. original is the normal image, I repared is the restored image; The calculation formula of the structural similarity index (SSIM) is: Among them, μ x and μ y are the mean of images x and y, σ x and σ y are the standard deviations of images x and y, σ xy is the covariance of images x and y, and C1 and C2 are constants used to stabilize the calculation.

9. The method according to claim 1, characterized in that When the peak signal-to-noise ratio and structural similarity index are used to judge the restoration results in step S6, the specific judging method is as follows: For the peak signal-to-noise ratio, when the calculated peak signal-to-noise ratio value is greater than a set threshold, the restoration result is highly identical to the original normal image in terms of brightness and contrast; For the structural similarity index, when the calculated structural similarity index value is greater than a set threshold, it indicates that the restored image is identical to the original normal image in terms of structural information; When the peak signal-to-noise ratio and the structural similarity index are both greater than the set threshold, it indicates that the repair effect meets the requirements.

10. A GAN-based abnormal biochemical test report image repair device, characterized in that: include: Data collection and annotation module: This module is responsible for collecting biochemical test report image data, carefully inspecting and marking abnormal areas, and pairing normal images with corresponding abnormal images to build a paired database for subsequent processing. Preprocessing module: connected to the data acquisition and annotation module, this module performs a series of preprocessing operations on the input paired database data, including image normalization, size adjustment, and abnormal area mask processing; Image restoration model construction module: This module uses conditional generative adversarial network technology, with normal images as the guiding condition, to construct a mapping relationship from abnormal areas of abnormal images to normal areas of normal images. Both the generator and the discriminator adopt convolutional neural network structures. Model training module: trains the constructed conditional generative adversarial network. During the training process, the generator and discriminator compete with each other and continuously optimize their respective network parameters. Image restoration execution module: Using a trained and stable image restoration model, the abnormal image to be restored and the corresponding normal image are input into the model. After processing by the generator, the restored image is output. At the same time, a semantic understanding model is introduced to determine whether the restored image data conforms to medical terminology based on the medical terminology database. If not, the parameters of the image restoration model are readjusted. Restoration effect evaluation and output module: Use peak signal-to-noise ratio and structural similarity index to evaluate the quality of the restored image.