Preterm infant fundus image enhancement method based on semantic guidance and anatomical constraints
Patent Information
- Application Number
- CN202610310665.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-13
- Publication Date
- 2026-10-16
AI Technical Summary
周边部暗角、玻璃体混浊导致的离焦以及眼睑与睫毛遮挡等问题导致早产儿眼底图像经常存在严重的照明缺陷、清晰度缺陷或完整性缺陷
[0013] The beneficial effects of this invention are as follows: This invention overcomes the bottleneck of scarce high-quality paired data in fundus images of premature infants by constructing a pairwise data augmentation and dynamic label recalibration strategy driven by physical light field degradation; on this basis, it further introduces a vascular probability map as a rigid constraint condition, and maintains the alignment of the anatomical topology of the repaired image with the original image by forcibly controlling the pixel generation process within the boundary defined by the blood vessels; in addition, this scheme further guides the model to perform targeted denoising and repair based on semantic image quality perception evaluation results, which significantly improves the model's instruction compliance ability and quality improvement effect.
Smart Images

Figure CN122928651A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital medical technology, and more specifically to a method for enhancing fundus images of premature infants based on semantic guidance and anatomical constraints. Background Technology
[0002] In the field of neonatal intensive care, early screening and timely intervention for retinopathy of prematurity (ROP) are crucial for preventing avoidable blindness in children. ROP is a proliferative retinal vascular disease that occurs in premature or low birth weight infants. Its core pathological mechanism lies in the interruption of retinal vascular development and subsequent abnormal proliferation. If timely and effective intervention is not implemented within a specific time window, the disease will rapidly progress to retinal detachment, leading to irreversible and permanent blindness. Currently, RetCam-based wide-area digital fundus imaging technology plays a vital role in screening. By capturing images from the posterior pole to the periphery of the retina, doctors can observe the degree of vascular dilation and tortuosity according to the ICROP criteria, determine the lesion's region and stage, and thus formulate vision-saving treatment decisions. Therefore, how to acquire high-quality fundus images and make accurate diagnoses within a very short treatment window has become a critical public health issue that urgently needs to be addressed in pediatric fundus disease screening.
[0003] Despite the increasing prevalence of digital fundus imaging technology, achieving robust automated assisted diagnosis still faces significant data and algorithmic bottlenecks. Unlike fundus imaging in adults with high cooperation rates, fundus images of premature infants exhibit distinct quality characteristics, primarily due to low infant cooperation, unique physiological structures, and unstable imaging environments. Issues such as peripheral vignetting, vitreous opacities leading to defocusing, and eyelid and eyelash obstruction result in severe illumination, sharpness, and integrity defects in premature infant fundus images. These quality issues not only cause up to 30% of images to be removed in current automated diagnostic practices due to poor readability, exacerbating the data scarcity problem in this field, but also make traditional image enhancement methods prone to introducing noise or artifacts during processing. Furthermore, by compromising the pathological fidelity essential for medical diagnosis, they can easily lead to misjudgments of lesion severity. Therefore, developing an image enhancement algorithm that can accurately repair complex imaging defects while preserving key anatomical features such as retinal vascular topology is a core technical challenge for improving the clinical usability of automated ROP screening and diagnostic systems. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention aims to provide a method for enhancing fundus images in premature infants based on semantic guidance and anatomical constraints. This method first utilizes pairwise data augmentation and label recalibration driven by physical light field degradation to construct and expand paired datasets of fundus images of varying quality. Subsequently, a multi-task fundus image quality perception assessment network is constructed, outputting image localization, multi-dimensional defect classification, and a comprehensive quality score as detailed guidance for subsequent repair algorithms. Building upon this, a multimodal conditional injection module guided by anatomical topology constraints and semantic correction is further constructed. A ControlNet branch is used to lock the anatomical topology based on a vascular probability map, and vectorized semantic prompts are combined to provide quality enhancement guidance for the model. Finally, semantic instructions and anatomical priors are jointly injected, and a parameter-efficient fine-tuning technique is used to optimize a diffusion denoising dynamics model based on hybrid conditional guidance.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for enhancing fundus images of premature infants based on semantic guidance and anatomical constraints, comprising the following steps: Step 1: Construct a physical light field degradation model to simulate illumination, blurring, and structural integrity defects and generate massive low-quality to high-quality paired fundus image data, and relabel the data according to the degradation parameters; Step 2: Construct a multi-task fundus image quality perception assessment network (MT-QPN) to output image localization, multi-dimensional defect classification, and comprehensive quality score, and design a loss function to ensure medical logic consistency; Step 3: Construct a multimodal conditional injection module based on anatomical topology constraints and semantic correction guidance. Use the vessel probability map as a rigid condition to anchor the anatomical topology, and convert the quality assessment results of MT-QPN into semantic correction cue vectors to complete the construction and injection of multimodal conditions. Step four involves executing diffusion denoising dynamics and efficient parameter fine-tuning based on hybrid conditional guidance, jointly injecting semantic instructions and anatomical priors, and using efficient parameter fine-tuning techniques to optimize the fundus image quality improvement model.
[0006] As a further improvement of the present invention, the specific steps of constructing a physical light field degradation model in step one to simulate illumination, blurring, and structural integrity defects and generate massive low-quality to high-quality paired fundus image data, and relabeling the data according to degradation parameters are as follows: Step one by one, perform lighting degradation simulation, let To simulate the spatial attenuation mask of the vignetting angle unique to fundus cameras, To control the overall brightness attenuation coefficient, This is the Gaussian noise term used to simulate the thermal noise of the sensor. It is adjusted... In the hyperparameter range The values within can be determined based on the original image as shown in the following formula. Generate its lighting degradation version : ; Steps one and two involve performing optical fuzzy simulation using an anisotropic Gaussian kernel. Perform a convolution operation with the original sharp image, where Used to control the scale of the fuzzy kernel. Used to control the directionality of the blur, resulting in a blurred enhanced image. It can be obtained by the following formula: ; Step 13 involves simulating structural integrity degradation. This is achieved by using Bézier curves to generate parabolic shapes with random positions and curvatures to simulate the eyelid edge, and introducing randomly generated elongated curves to simulate eyelashes, thereby constructing the occlusion mask region. Based on this, a set of high-intensity two-dimensional Gaussian distributions are superimposed to simulate the ring-shaped or point-shaped specular reflection artifacts unique to RetCam. ,make To simulate the blurred texture of out-of-focus occlusions by overlaying a high-intensity Gaussian blur, a structurally damaged image was generated. Calculate as follows: .
[0007] As a further improvement of the present invention, based on the generation of the physical light field degradation image in step one, a strict label recalibration strategy is further implemented. The three labels contained in the original data—direction, quality defect classification, and image score—are corrected according to the implemented enhancements to solve the semantic inconsistency between the enhanced data and the original labels. Specifically, the newly applied quality degradation is added to the quality defect classification label of the original data, and for any sample in the original dataset, a dynamic score decay formula based on statistical priors is used for correction. The average score difference corresponding to samples with illumination defects, blurring, and integrity defects in the original dataset is obtained statistically. Furthermore, it calculates the percentile of the intensity of the current sample's added degradation type within the allowable upper and lower limits. ,make To prevent excessive score decay, a new score is added to the enhanced image. The quality score can be based on the original image using the following formula. The calculations are performed to complete a comprehensive augmented data label recalibration, from classification labels to regression scores.
[0008] .
[0009] As a further improvement of the present invention, the specific steps of constructing the multi-task fundus image quality perception assessment network (MT-QPN) to output image localization, multi-dimensional defect classification, and comprehensive quality score in step two, and designing a loss function to ensure medical logical consistency, are as follows: Step 21: Construct a multi-task quality-aware evaluation network. This network uses a pre-trained lightweight SwinTransformer-Tiny as a shared feature extraction backbone network and inputs the extracted deep feature vectors into three decoupled MLP prediction heads to output the following: the judgment result of whether the image was captured at the posterior pole or the periphery; the multi-dimensional classification result of whether there are quality defects in the three dimensions of image illumination, sharpness, and integrity; and the three qualitative and quantitative indicators of the overall image quality score. This enables the full-range automated quantification of the image from anatomical location to quality status. Step 22: Construct a composite loss function system that includes classification, regression, and consistency constraints for anatomical location localization loss. Optimization using cross-entropy loss; defect identification across three dimensions: illumination, sharpness, and integrity. The loss is optimized using a binary cross-entropy loss function with Logits; for the overall quality score regression loss... Optimize using the mean squared error loss function; Steps two and three: Design the batch-level sorting consistency loss function. ,make The average probability of the model output across the three dimensions of illumination, sharpness, and integrity. The quality score output by the model. For symbolic functions, To control the hyperparameter of the threshold, for any two samples within a training batch... The batch-level consistency loss function is calculated using the following formula, and the various losses can be weighted and combined according to clinical experience to finally obtain the overall loss function of MT-QPN: .
[0010] As a further improvement of the present invention, the specific method for constructing a multimodal conditional injection module based on anatomical topology constraints and semantic correction guidance in step three, using a vascular probability map as a rigid condition to anchor the anatomical topology, and converting the quality assessment results of MT-QPN into semantic correction cue vectors to complete the construction and injection of multimodal conditions is as follows: First, Frangi filtering is used to extract multi-scale vascular probability maps as the retinal vascular topology, and this probability map is used as the input condition of ControlNet. After that, The main diffusion model, To control network branches, Represents the initial zero-convolution operation, the input after anatomical structure injection. Calculate using the following formula: .
[0011] As a further improvement of the present invention, based on step three, semantic-level distribution correction based on Prompt is implemented. Using the MT-QPN network trained in step two, the localization and classification results and multi-label defect classification results of the current input image are converted into correction prompts in natural language form. Furthermore, the pre-trained CLIPTextEncoder is used to encode the correction prompts into semantic vectors. These vectors are injected into each layer of the diffusion model network through a cross-attention mechanism, enabling the model to use the prior knowledge obtained from the rating network to perform targeted quality improvement on the image.
[0012] As a further improvement of the present invention, the specific steps of step four, which involve performing diffusion denoising dynamics based on hybrid conditional guidance and efficient parameter fine-tuning, jointly injecting semantic instructions and anatomical priors, and using efficient parameter fine-tuning techniques to optimize the fundus image quality improvement model, are as follows: Step 41: In the reverse denoising process of the latent diffusion model, a hybrid conditional guidance mechanism is constructed. This mechanism injects the semantic correction instruction vector obtained in the previous steps into the noise prediction network through a cross-attention mechanism and the anatomical vessel prior through a ControlNet branch. Furthermore, a classifier-free guidance strategy is used to calculate the final denoising gradient, thereby obtaining a deterministic denoising equation under dual constraints. To guide the scale, For the current time step Potential characteristics, This is a semantic correction hint vector. For anatomical structural conditions. If the condition is empty, then the final noise gradient after the diffusion model correction is... The calculation will be performed as shown in the following formula: ; Step 42: Use LoRA technology to efficiently fine-tune the parameters of the pre-trained LDM by freezing the backbone weights of the pre-trained model. Only inject trainable low-rank factorization matrices at key locations such as the attention layer. and Update by incremental simulation weights During forward propagation, the input Output It is formed by superimposing the output of the frozen weights and the output of the low-rank bypass, let Let be the rank of the low-rank matrix. Let be the scaling factor. Then, the calculation process after injecting LoRA can be represented as follows: .
[0013] The beneficial effects of this invention are as follows: This invention overcomes the bottleneck of scarce high-quality paired data in fundus images of premature infants by constructing a pairwise data augmentation and dynamic label recalibration strategy driven by physical light field degradation; on this basis, it further introduces a vascular probability map as a rigid constraint condition, and maintains the alignment of the anatomical topology of the repaired image with the original image by forcibly controlling the pixel generation process within the boundary defined by the blood vessels; in addition, this scheme further guides the model to perform targeted denoising and repair based on semantic image quality perception evaluation results, which significantly improves the model's instruction compliance ability and quality improvement effect. Attached Figure Description
[0014] Figure 1 This is a flowchart of the method for enhancing fundus images of premature infants based on semantic guidance and anatomical constraints according to the present invention; Figure 2 This is a structural diagram of the preterm infant fundus image enhancement method based on semantic guidance and anatomical constraints of the present invention. Detailed Implementation
[0015] The present invention will now be described in further detail with reference to the embodiments shown in the accompanying drawings.
[0016] Example 1: As Figure 1-2 As shown, a method for enhancing fundus images of premature infants based on semantic guidance and anatomical constraints is described, and the steps of the method are as follows: Step 1: Construct a physical light field degradation model to simulate illumination, blurring, and structural integrity defects, and generate massive low-quality to high-quality paired fundus image data. Then, relabel the data according to the degradation parameters.
[0017] To address the conflict between the objective input requirement of "low-quality-high-quality" image combinations for image enhancement tasks and the scarcity of high-quality fundus images of premature infants and the difficulty in collecting paired data at the same time in clinical practice, this step utilizes a physical light field degradation model to simulate three common imaging defects in RetCam imaging: illumination, sharpness, and structural integrity. By constructing a parameterized degradation model, a large number of quality-degraded images are artificially generated, and the data labels are dynamically recalibrated according to the degradation intensity, thereby providing sufficient paired supervision data for subsequent model training.
[0018] Illumination degradation simulation aims to reproduce the imaging characteristics of peripheral vignetting and overall underexposure. To simulate the spatial attenuation mask of the vignetting angle unique to fundus cameras, To control the overall brightness attenuation coefficient, This is the Gaussian noise term used to simulate the thermal noise of the sensor. It is adjusted... In the hyperparameter range The values within can be determined based on the original image as shown in the following formula. Generate its lighting degradation version : Optical blur simulation aims to mimic image blurring caused by focusing failure or involuntary eye movements in premature infants. It utilizes anisotropic Gaussian kernels. Perform a convolution operation with the original sharp image, where Used to control the scale of the fuzzy kernel. Used to control the directionality of the blur, resulting in a blurred enhanced image. It can be obtained by the following formula: The structural integrity degradation simulation aims to mimic eyelid and eyelash occlusion, as well as corneal reflection artifacts. Bézier curves are used to generate parabolic shapes with random positions and curvatures to simulate the eyelid margin, and randomly generated elongated curves are introduced to simulate eyelashes, thus constructing the occlusion mask region. Based on this, a set of high-intensity two-dimensional Gaussian distributions are superimposed to simulate the ring-shaped or point-shaped specular reflection artifacts unique to RetCam. .make To simulate the blurred texture of out-of-focus occlusions by overlaying a high-intensity Gaussian blur, a structurally damaged image was generated. The calculation can be performed as follows: Building upon the generation of physically degraded images, this method further implements a rigorous label recalibration strategy. It corrects the three labels—direction, quality defect classification, and image score—in the original data based on the applied enhancements, addressing the semantic inconsistency between the enhanced data and the original labels. The enhancement strategy involves randomly selecting a non-existent quality defect classification label from any sample in the original dataset and applying degradation accordingly. Therefore, the direction label in the enhanced data remains unchanged from the original data, and the quality defect classification label is the union of the original label and the newly applied degradation label. For the comprehensive quality score label of the enhanced image, this method uses a dynamic score decay formula based on statistical priors for correction. This is based on statistically obtained average score differences corresponding to samples with illumination defects, blur, and integrity defects in the original dataset. Furthermore, it calculates the percentile of the intensity of the current sample's added degradation type within the allowable upper and lower limits. ,make To prevent excessive score decay, a new score is added to the enhanced image. The quality score can be based on the original image using the following formula. The calculations are performed to complete a comprehensive augmented data label recalibration, from classification labels to regression scores.
[0019] Step 2: Construct a multi-task fundus image quality perception assessment network (MT-QPN) to output image localization, multi-dimensional defect classification and comprehensive quality score, and design a loss function to ensure medical logic consistency.
[0020] To further provide precise semantic guidance and metadata support for subsequent generative image quality restoration models, and to present clinicians with intuitive quality assessment results of pediatric fundus photographs, this solution constructs a multi-task quality-aware assessment network (MT-QPN). This network utilizes a pre-trained lightweight SwinTransformer-Tiny as a shared feature extraction backbone network, and inputs the extracted deep feature vectors into three decoupled MLP prediction heads to output the following: a judgment result indicating whether the image was captured in the posterior pole or peripheral region; a multi-dimensional classification result indicating the presence of quality defects in the image's illumination, sharpness, and integrity dimensions; and a comprehensive quality score for the overall image. This achieves a comprehensive and automated quantification of the image from its anatomical location to its quality status.
[0021] To synergistically optimize the aforementioned multi-dimensional prediction tasks, this scheme constructs a composite loss function system that includes classification, regression, and consistency constraints. For anatomical location localization loss... Optimization using cross-entropy loss; defect identification across three dimensions: illumination, sharpness, and integrity. The loss is optimized using a binary cross-entropy loss function with Logits; for the overall quality score regression loss... The mean squared error loss function is used for optimization. To ensure the consistency between the defect classification results output by the model and the comprehensive score, this scheme further designs an intra-batch ranking consistency loss function. ,make The average probability of the model output across the three dimensions of illumination, sharpness, and integrity. The quality score output by the model. For symbolic functions, To control the hyperparameter of the threshold, for any two samples within a training batch... The batch-level consistency loss function can be calculated using the following formula, and the various losses can be weighted and combined according to clinical experience to finally obtain the overall loss function of MT-QPN.
[0022] Step 3: Construct a multimodal conditional injection module based on anatomical topology constraints and semantic correction guidance. Use the vessel probability map as a rigid condition to anchor the anatomical topology, and convert the quality assessment results of MT-QPN into semantic correction cue vectors to complete the construction and injection of multimodal conditions.
[0023] Practical experience shows that directly using ordinary generative models for image quality enhancement, due to their strong divergence, can easily lead to the creation or erasure of key anatomical features such as vascular structures during fundus image restoration. Therefore, this approach introduces the ControlNet architecture as a bypass branch of the pre-trained diffusion model SDU-Net to achieve rigid anchoring of anatomical structures. Considering the tubular structure characteristics of retinal vessels, Frangi filtering is first used to extract multi-scale vascular probability maps as the retinal vascular topology, and this probability map is then used as the input condition for ControlNet. ControlNet replicates the weights of the SD encoder and connects them to the main network through initial zero-convolutional layers, gradually injecting structural information into the diffusion network as gradients are updated. Let... The main diffusion model, To control network branches, Represents the initial zero-convolution operation, the input after anatomical structure injection. Calculate using the following formula: Building upon this, existing image enhancement practices typically exhibit end-to-end characteristics, making it difficult for models to accurately identify and specifically repair particular image quality defects based solely on image input. To address this issue, this solution implements semantic-level distributed error correction based on prompts. Utilizing the MT-QPN network trained in previous steps, the localization and classification results of the current input image, along with the multi-label defect classification results, are converted into natural language correction prompts. Furthermore, a pre-trained CLIP TextEncoder is used to encode these correction prompts into semantic vectors. These vectors are then injected into each layer of the diffusion model network via a cross-attention mechanism, enabling the model to leverage prior knowledge obtained from the rating network to perform targeted quality improvements on the image.
[0024] Step 4: Execute diffusion denoising dynamics and parameter fine-tuning based on hybrid conditional guidance, jointly inject semantic instructions and anatomical priors, and use parameter fine-tuning techniques to optimize the fundus image quality improvement model.
[0025] To enable the diffusion model to finely adjust image enhancement results based on ControlNet and Prompt under strong constraints, and to avoid overfitting caused by full fine-tuning with limited medical data, this scheme constructs a hybrid conditional guidance mechanism in the reverse denoising process of the latent diffusion model. This mechanism injects the semantic correction instruction vector obtained from the preceding steps into the noise prediction network through a cross-attention mechanism and anatomical vessel priors via a ControlNet branch. Furthermore, a classifier-free guided (CFG) strategy is used to calculate the final denoising gradient, thereby obtaining a deterministic denoising equation under dual constraints. Let... To guide the scale, For the current time step Potential characteristics, This is a semantic correction hint vector. For anatomical structural conditions. If the condition is empty, then the final noise gradient after the diffusion model correction is... The calculation will be performed as shown in the following formula: Building upon this foundation, and addressing the objective reality of sample scarcity in preterm infant fundus disease screening scenarios, this solution employs LoRA technology for efficient parameter fine-tuning of the pre-trained LDM. This is achieved by freezing the backbone weights of the pre-trained model. Only inject trainable low-rank factorization matrices at key locations such as the attention layer. and Update by incremental simulation weights During forward propagation, the input Output It is formed by superimposing the output of the frozen weights and the output of the low-rank bypass, let Let be the rank of the low-rank matrix. Let be the scaling factor. Then, the calculation process after injecting LoRA can be represented as follows: Based on a parameter-efficient fine-tuning method, the model can quickly adapt to the distribution of fundus images with minimal parameter updates. The hybrid conditionally guided diffusion denoising dynamics and parameter-efficient fine-tuning strategy not only significantly reduce computational resource consumption but also enable the model to strictly adhere to the semantic instructions and anatomical constraints of the input, outputting high-quality fundus images with accurate structure and significantly improved image quality while avoiding overfitting.
[0026] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A method for enhancing fundus images of premature infants based on semantic guidance and anatomical constraints, characterized in that: Includes the following steps: Step 1: Construct a physical light field degradation model to simulate illumination, blurring, and structural integrity defects and generate massive low-quality to high-quality paired fundus image data, and relabel the data according to the degradation parameters; Step 2: Construct the multi-task fundus image quality perception assessment network MT-QPN to output image localization, multi-dimensional defect classification and comprehensive quality score, and design a loss function to ensure medical logic consistency; Step 3: Construct a multimodal conditional injection module based on anatomical topology constraints and semantic correction guidance. Use the vessel probability map as a rigid condition to anchor the anatomical topology, and convert the quality assessment results of MT-QPN into semantic correction cue vectors to complete the construction and injection of multimodal conditions. Step four involves executing diffusion denoising dynamics and efficient parameter fine-tuning based on hybrid conditional guidance, jointly injecting semantic instructions and anatomical priors, and using efficient parameter fine-tuning techniques to optimize the fundus image quality improvement model.
2. The method for enhancing fundus images of preterm infants based on semantic guidance and anatomical constraints according to claim 1, characterized in that: The specific steps in step one of constructing a physical light field degradation model to simulate illumination, blurring, and structural integrity defects, generating massive amounts of low-quality to high-quality paired fundus image data, and relabeling the data based on degradation parameters are as follows: Step one by one, perform lighting degradation simulation, let To simulate the spatial attenuation mask of the vignetting angle unique to fundus cameras, To control the overall brightness attenuation coefficient, This is the Gaussian noise term used to simulate the thermal noise of the sensor. It is adjusted... In the hyperparameter range The values within can be determined based on the original image as shown in the following formula. Generate its lighting degradation version : ; Steps one and two involve performing optical fuzzy simulation using an anisotropic Gaussian kernel. Perform a convolution operation with the original sharp image, where Used to control the scale of the fuzzy kernel. Used to control the directionality of the blur, resulting in a blurred enhanced image. It can be obtained by the following formula: ; Step 13 involves simulating structural integrity degradation. This is achieved by using Bézier curves to generate parabolic shapes with random positions and curvatures to simulate the eyelid edge, and introducing randomly generated elongated curves to simulate eyelashes, thereby constructing the occlusion mask region. Based on this, a set of high-intensity two-dimensional Gaussian distributions are superimposed to simulate the ring-shaped or point-shaped specular reflection artifacts unique to RetCam. ,make To simulate the blurred texture of out-of-focus occlusions by overlaying a high-intensity Gaussian blur, a structurally damaged image was generated. Calculate as follows: 。 3. The method for enhancing fundus images of preterm infants based on semantic guidance and anatomical constraints according to claim 2, characterized in that: Based on the physical light field degradation image generation in step one, a strict label recalibration strategy is further implemented. The three labels in the original data—direction, quality defect classification, and image score—are corrected according to the applied enhancements to address the semantic inconsistency between the enhanced data and the original labels. Specifically, the newly applied quality degradation is added to the quality defect classification label of the original data. Furthermore, for any sample in the original dataset, a dynamic score decay formula based on statistical priors is used for correction. The average score difference corresponding to samples with illumination defects, blurriness, and integrity defects in the original dataset is statistically obtained. Furthermore, it calculates the percentile of the intensity of the current sample's added degradation type within the allowable upper and lower limits. ,make To prevent excessive score decay, a new score is added to the enhanced image. The quality score can be based on the original image using the following formula. The calculations are performed to complete a comprehensive augmented data label recalibration, from classification labels to regression scores. 。 4. The method for enhancing fundus images of preterm infants based on semantic guidance and anatomical constraints according to claim 1 or 2, characterized in that: The specific steps in step two of constructing the multi-task fundus image quality perception assessment network MT-QPN to output image localization, multi-dimensional defect classification, and comprehensive quality scoring, and designing a loss function to ensure medical logical consistency, are as follows: Step 21: Construct a multi-task quality-aware evaluation network. This network uses a pre-trained lightweight SwinTransformer-Tiny as a shared feature extraction backbone network and inputs the extracted deep feature vectors into three decoupled MLP prediction heads to output the following: the judgment result of whether the image was captured at the posterior pole or the periphery; the multi-dimensional classification result of whether there are quality defects in the three dimensions of image illumination, sharpness, and integrity; and the three qualitative and quantitative indicators of the overall image quality score. This enables the full-range automated quantification of the image from anatomical location to quality status. Step 22: Construct a composite loss function system that includes classification, regression, and consistency constraints for anatomical location localization loss. Optimization using cross-entropy loss; defect identification across three dimensions: illumination, sharpness, and integrity. The loss is optimized using a binary cross-entropy loss function with Logits; for the overall quality score regression loss... Optimize using the mean squared error loss function; Steps two and three: Design the batch-level sorting consistency loss function. ,make The average probability of the model output across the three dimensions of illumination, sharpness, and integrity. The quality score output by the model. For symbolic functions, To control the hyperparameter of the threshold, for any two samples within a training batch... The batch-level consistency loss function is calculated using the following formula, and the various losses can be weighted and combined according to clinical experience to finally obtain the overall loss function of MT-QPN: 。 5. The method for enhancing fundus images of preterm infants based on semantic guidance and anatomical constraints according to claim 1 or 2, characterized in that: In step three, a multimodal conditional injection module based on anatomical topology constraints and semantic correction is constructed. The vascular probability map is used as a rigid condition to anchor the anatomical topology, and the quality assessment results of MT-QPN are converted into semantic correction cue vectors to complete the multimodal conditional construction and injection. The specific method is as follows: First, Frangi filtering is used to extract multi-scale vascular probability maps as the retinal vascular topology, and this probability map is used as the input condition for ControlNet. After that, The main diffusion model, To control network branches, Represents the initial zero-convolution operation, the input after anatomical structure injection. Calculate using the following formula: 。 6. The method for enhancing fundus images of preterm infants based on semantic guidance and anatomical constraints according to claim 5, characterized in that: Building upon step three, semantic-level distributional correction based on prompts is implemented. Using the MT-QPN network trained in step two, the localization and classification results of the current input image and the multi-label defect classification results are converted into correction prompts in natural language. Furthermore, the pre-trained CLIP Text Encoder is used to encode these correction prompts into semantic vectors. These vectors are then injected into each layer of the diffusion model network through a cross-attention mechanism, enabling the model to utilize the prior knowledge obtained from the rating network to perform targeted quality improvements on the image.
7. The method for enhancing fundus images of preterm infants based on semantic guidance and anatomical constraints according to claim 1 or 2, characterized in that: The specific steps in step four of the process, which involve performing hybrid condition-guided diffusion denoising dynamics and efficient parameter fine-tuning, jointly injecting semantic instructions and anatomical priors, and using efficient parameter fine-tuning techniques to optimize the fundus image quality improvement model, are as follows: Step 41: In the reverse denoising process of the latent diffusion model, a hybrid conditional guidance mechanism is constructed. This mechanism injects the semantic correction instruction vector obtained in the previous steps into the noise prediction network through a cross-attention mechanism and the anatomical vessel prior through a ControlNet branch. Furthermore, a classifier-free guidance strategy is used to calculate the final denoising gradient, thereby obtaining a deterministic denoising equation under dual constraints. To guide the scale, For the current time step Potential characteristics, This is a semantic correction hint vector. For anatomical structural conditions. If the condition is empty, then the final noise gradient after the diffusion model correction is... The calculation will be performed as shown in the following formula: ; Step 42: Use LoRA technology to efficiently fine-tune the parameters of the pre-trained LDM by freezing the backbone weights of the pre-trained model. Only inject trainable low-rank factorization matrices at key locations such as the attention layer. and Update by incremental simulation weights During forward propagation, the input Output It is formed by superimposing the output of the frozen weights and the output of the low-rank bypass, let Let be the rank of the low-rank matrix. Let be the scaling factor. Then, the calculation process after injecting LoRA can be represented as follows: 。