Editor’s introduction
The study evaluated a conditional latent diffusion model designed to generate realistic palpebral conjunctiva images based on hemoglobin values, gender, and country data. The model outperformed GAN-based approaches in image realism, as measured by a lower FID score, and demonstrated strong conditioning consistency with a Pearson correlation of 0.910. Realism and structural accuracy were further validated through frequency-domain analysis, cross-population testing with pediatric data, and blinded clinical assessment. The findings suggest the model can produce clinically plausible images under limited dataset conditions.
Introduction
Deep learning has achieved significant advances in medical image analysis, demonstrating strong performance in tasks such as disease detection, segmentation, and computer-aided diagnosis. Palpebral conjunctiva imaging has attracted interest as a non-invasive approach for hemoglobin assessment and anemia screening because of the highly vascularized nature of the conjunctiva and its relatively limited influence from melanin pigmentation. Previous studies have reported associations between conjunctival appearance and hemoglobin levels using smartphone-acquired RGB images. Prior efforts to address limited dataset size have primarily relied on traditional geometric augmentation techniques, such as rotation, flipping, and translation. However, publicly available conjunctiva imaging datasets remain limited in size and demographic diversity, highlighting the need for approaches that can generate additional synthetic images while preserving clinically relevant characteristics.
Generative models provide an alternative means of producing synthetic medical images by learning the distribution of real images and generating new samples with similar characteristics. Generative Adversarial Networks (GANs) have been widely investigated for synthetic image generation, including DCGAN, conditional GANs, and StyleGAN-based architectures. StyleGAN has demonstrated the ability to generate realistic retinal fundus images, with ophthalmologists achieving near-random accuracy when distinguishing synthetic images from real images. StyleGAN2-ADA further addressed limited-data settings through adaptive augmentation, demonstrating improved image quality, reduced overfitting, and enhanced training stability across medical imaging applications. Conditional GANs have also enabled controllable image synthesis by incorporating predefined clinical or demographic attributes into the generation process. Nevertheless, GAN-based approaches may experience training instability, mode collapse, and difficulty in capturing the full variability of complex image distributions.
Generative modeling for conjunctiva imaging remains relatively unexplored. To the best of our knowledge, only one previous study investigated conjunctiva image generation using DCGAN. However, that work primarily focused on the downstream classification task and provided limited evaluation of the generated images and their generative characteristics. Thus, there remains a gap in the systematic development and evaluation of generative frameworks for realistic and controllable palpebral conjunctiva image synthesis, particularly under limited-data conditions.
Diffusion models have recently emerged as an alternative generative framework capable of producing realistic and diverse images while supporting flexible conditioning mechanisms. Latent Diffusion Models (LDMs) perform the diffusion process in a lower-dimensional latent space, providing a computationally efficient framework for high-quality image generation. Their potential for controllable medical image synthesis has been demonstrated across several imaging domains. For example, ref. A cited study used LDMs to generate high-resolution 3D brain MRI images conditioned on demographic and clinical variables, demonstrating realistic and diverse image generation. Diffusion-based approaches have also been explored for dermatology imaging, where generation was controlled using disease and skin-tone attributes, and for pediatric chest X-ray synthesis, where image-to-image LDMs were conditioned on disease-specific information. These studies demonstrate the potential of diffusion models to incorporate clinically relevant conditioning information while generating realistic synthetic medical images.
Despite these developments, diffusion-based generation has not yet been investigated for palpebral conjunctiva image synthesis. This gap provides the rationale for exploring a conditioning-guided LDM for this imaging domain. In particular, the ability to incorporate continuous clinical information together with categorical conditioning variables provides an opportunity to generate synthetic conjunctiva images with explicitly controlled characteristics. Accordingly, this study hypothesized that a conditioning-guided LDM could generate realistic and controllable palpebral conjunctiva images under limited-data conditions while achieving improved image realism and conditioning consistency compared with representative GAN-based approaches.
The objective of this study was therefore to develop and evaluate a conditioning-guided LDM based on Stable Diffusion v1.5 for controllable synthetic palpebral conjunctiva image generation using an image-to-image generation pipeline. The generation process was conditioned on continuous hemoglobin values together with gender and country information. The proposed framework was evaluated through complementary analyses of image realism, conditioning consistency, frequency-domain characteristics, zero-shot cross-population evaluation, blinded clinical assessment, and computational efficiency, with comparisons against cDCGAN and StyleGAN2-ADA. Through this evaluation, the study provides a comprehensive assessment of the realism, controllability, structural characteristics, and clinical plausibility of diffusion-generated palpebral conjunctiva images under limited-data conditions.
Generative Frameworks
The proposed study employs three conditional generative models for synthetic palpebral conjunctiva image generation. A conditional Deep Convolutional Generative Adversarial Network (cDCGAN) and StyleGAN2-ADA were adopted as comparative GAN-based baselines, while a Latent Diffusion Model (LDM) based on Stable Diffusion v1.5 was employed as the proposed model. The cDCGAN was selected as a conventional conditional GAN baseline because it provides a relatively simple convolutional adversarial framework for controllable image synthesis, while StyleGAN2-ADA was included as an advanced GAN-based baseline because its adaptive discriminator augmentation mechanism was specifically proposed to stabilize GAN training in limited-data regimes. Together, these baselines provide a comparison between a conventional conditional GAN, a modern style-based GAN with adaptive augmentation, and the proposed diffusion-based framework. All three models utilized the same conditioning variables, namely hemoglobin level, gender, and country of origin, enabling comparison under identical clinical and demographic settings. These models were selected to compare conventional and advanced GAN-based approaches with the proposed diffusion-based approach under the same conditioning strategy. The experiments were conducted on a high-performance computing (HPC) cluster equipped with an NVIDIA A100 PCIe GPU (NVIDIA Corporation, Santa Clara, CA, USA) with 40 GB VRAM. This computing environment was used for training the evaluated generative models, synthetic image generation, and all quantitative evaluations.
Before describing the individual generative models, the conditioning variables common to all models are first introduced. These variables provide the clinical and demographic information used to guide the image generation process, ensuring a consistent conditioning strategy across all models.
Conditioning Variables
All generative models were conditioned on hemoglobin level, gender, and country of origin. Hemoglobin values were normalized using min–max normalization and provided as continuous conditioning inputs, whereas gender and country of origin were represented as categorical conditioning variables. For categorical conditioning, an “unknown” state was implemented for gender and country to allow the corresponding conditioning information to be omitted when unavailable, rather than imposing a specific demographic condition.
Hemoglobin level was selected as the primary conditioning variable because it is the primary clinical variable associated with each image and enables the generation of synthetic conjunctiva images across different hemoglobin levels. Gender was included to account for demographic variations in hemoglobin distribution. Country was incorporated as a conditioning variable to preserve the distributional characteristics of the EDA dataset during image generation, given the documented differences in demographic and clinical characteristics between the Indian and Italian subsets. Together, these conditioning variables enable controllable image synthesis while preserving the clinical and demographic characteristics represented in the original dataset.
Discriminator Architecture
The discriminator was implemented using a conditional PatchGAN architecture. The conditioning representation was projected into a spatial feature map and incorporated into the discriminator input. The discriminator consisted of multiple convolutional layers with batch normalization and LeakyReLU activations, producing patch-level real-versus-synthetic predictions.
The discriminator was trained to distinguish real conjunctiva images from generated images while simultaneously considering the associated conditioning variables. This conditional discrimination strategy guides the generator to produce images that are both visually realistic and consistent with the specified clinical and demographic attributes.
Latent Diffusion-Based Image Synthesis Framework
Following the Stable Diffusion v1.5 framework, which is based on the Latent Diffusion Model (LDM) architecture proposed by, a conditioning-guided image-to-image latent diffusion framework is employed for controllable palpebral conjunctiva image synthesis. Unlike conventional diffusion models operating directly in pixel space, the adopted framework performs the diffusion process in a compressed latent space learned by a pre-trained Variational Autoencoder (VAE), reducing computational complexity while preserving image quality.
For synthetic image generation, the proposed framework adopted a conditioning-guided image-to-image latent diffusion strategy to preserve anatomical consistency while introducing controlled clinical and demographic variations. Unlike conventional diffusion models that generate images from pure random noise, the proposed framework utilized real palpebral conjunctiva images as structural initialization. Each input image was first encoded into a latent representation using the frozen VAE encoder, after which controlled perturbation was introduced by partially noising the latent representation.
The perturbed latent representation was subsequently denoised using DDIM sampling with 35 inference steps, during which hemoglobin level, gender, and country information were incorporated through the cross-attention mechanism to guide the generation process toward the desired clinical and demographic attributes. This formulation enables controllable image generation according to the specified conditioning variables while preserving clinically relevant anatomical structures.
Conditioning Evaluation
To quantitatively evaluate conditioning consistency, an EfficientNet-B2 regression model was trained using subject-level GroupKFold cross-validation, ensuring that no subject overlap occurred between the training and validation sets. The regression model was trained exclusively on real palpebral conjunctiva images and was subsequently applied to synthetic images generated by StyleGAN2-ADA and the proposed LDM. Given its substantially lower image realism than the other generative models, the cDCGAN baseline was excluded from the conditioning analysis. Conditioning consistency was assessed by measuring the Pearson correlation between the target conditioning hemoglobin values and the corresponding values predicted from the generated images.
Discussion
This study investigated the use of a conditioning-guided Latent Diffusion Model (LDM) for controllable synthesis of palpebral conjunctiva images under limited-data conditions. Unlike conventional GAN-based approaches, the proposed framework simultaneously incorporated continuous hemoglobin values together with demographic conditioning variables through a cross-attention mechanism, enabling clinically guided image generation while preserving anatomically meaningful conjunctival structures. Comprehensive evaluation was performed using image realism, diversity, conditioning consistency, frequency-domain analysis, zero-shot cross-population evaluation, blinded clinical assessment, and computational efficiency.
The qualitative and quantitative evaluations consistently demonstrated that the proposed LDM generated higher-quality conjunctiva images than the conventional cDCGAN baseline. Among all evaluated generative models, the proposed framework achieved the lowest FID score, indicating the highest distributional similarity between the generated and real conjunctiva images. Although StyleGAN2-ADA achieved slightly lower KID, MS-SSIM, and 4-G-R-SSIM values, these differences were not statistically significant. Statistical analysis further confirmed that only the improvement in FID reached statistical significance, suggesting that the primary advantage of the proposed LDM lies in producing images that more closely follow the distribution of real conjunctiva images while maintaining diversity comparable to that of StyleGAN2-ADA. These findings are consistent with previous diffusion-based medical imaging studies, which reported improved generation realism, stability, and diversity compared with GAN-based approaches under limited-data settings. These observations are also consistent with previous studies reporting that diffusion models generally produce more realistic medical images than GAN-based approaches because image synthesis is formulated as an iterative denoising process rather than adversarial optimization.
The superior realism observed in the proposed framework may be partly related to two complementary design choices. First, operating in the latent space reduces the complexity of the diffusion process while leveraging representations learned by the pre-trained variational autoencoder. Second, the adopted image-to-image generation strategy uses real conjunctival images as structural guidance during the diffusion process, while controlled noise injection and conditional generation introduce variations according to the specified conditioning variables. This combination may support anatomically plausible synthesis under limited-data conditions while maintaining controlled variability in the generated images.
The conditioning experiments further evaluated the consistency between the specified conditioning variables and the generated images. Compared with StyleGAN2-ADA, the proposed LDM achieved a substantially stronger correlation between the conditioning hemoglobin values and the corresponding predicted hemoglobin values, indicating closer agreement between the specified and predicted hemoglobin levels. The scatter plots further showed that the generated samples were distributed considerably closer to the identity line, suggesting that the generated images were generally consistent with the intended hemoglobin conditioning. In addition, statistically significant differences were observed across the specified anemia severity, gender, and country groups. These findings indicate that the generated images exhibited systematic differences across the conditioning groups, consistent with the conditioning information provided to the model. Overall, the results suggest that the proposed cross-attention conditioning mechanism was able to incorporate both continuous and categorical conditioning information during image generation. These findings are consistent with previous conditional diffusion studies in medical imaging, where diffusion-based conditioning mechanisms have been used to generate images corresponding to continuous or categorical clinical variables.
Frequency-domain analysis provided additional evidence that the proposed framework preserved image characteristics beyond the spatial domain. The mean Fourier spectra of the generated and real conjunctiva images exhibited highly similar global frequency distributions, while the Fourier-based classifiers achieved only moderate discrimination performance. Together, these findings suggest that the generated images contain only subtle spectral discrepancies relative to real conjunctiva images. Since frequency-domain artifacts are often associated with generative models, the observed spectral similarity further supports the realism of the proposed diffusion-based synthesis framework.
The cross-population evaluation further demonstrated encouraging generalization capability. Without any retraining or domain adaptation, the model trained exclusively on the adult EYES-DEFY-ANEMIA dataset was directly applied to the pediatric CP-AnemiC dataset. As expected, image realism decreased under this zero-shot setting because of the considerable differences in population characteristics and acquisition conditions between the two datasets. Nevertheless, the generated pediatric images preserved generation diversity comparable to that of the real pediatric images, while qualitative inspection showed anatomically plausible conjunctival structures across the evaluated hemoglobin levels. These findings suggest that the proposed framework learned anatomical characteristics that remain partially transferable across clinically distinct populations, although additional domain adaptation would likely be required for optimal performance in new acquisition settings.
The blinded clinical evaluation further supported the practical realism of the generated images. Neither clinical expert was able to reliably distinguish synthetic images from real images, with discrimination accuracies remaining close to chance level. Moreover, no statistically significant differences were observed between real and synthetic images with respect to overall realism or physiological plausibility of the capillary patterns. These observations indicate that the proposed framework generated anatomically plausible conjunctiva images that were visually consistent with real clinical images from the perspective of experienced clinical experts.
From a computational perspective, the proposed framework also demonstrated a practical balance between image quality and computational cost. Although inference required more time than the GAN-based models because of the iterative denoising process, the total training time remained substantially lower than that of StyleGAN2-ADA while achieving superior image realism. Overall, the proposed LDM provided a favorable trade-off between computational cost and image quality.
Conclusions
In this study, a conditioning-guided latent diffusion framework was proposed for controllable synthesis of palpebral conjunctiva images under limited-data conditions. The proposed framework incorporated continuous hemoglobin values together with demographic conditioning variables through a cross-attention mechanism, enabling clinically guided image generation while preserving anatomically meaningful conjunctival structures.
Experimental results demonstrated that the proposed framework generated realistic conjunctiva images with the lowest FID among the evaluated generative models while maintaining image diversity comparable to StyleGAN2-ADA. In addition, the proposed conditioning strategy showed strong consistency with the target hemoglobin values and systematic differences across the demographic conditioning groups, whereas frequency-domain analysis, zero-shot cross-population evaluation, and blinded clinical assessment further supported the realism, structural consistency, and clinical plausibility of the generated images.
Overall, the proposed conditioning-guided latent diffusion framework provides an effective approach for controllable conjunctiva image synthesis and offers a promising strategy for synthetic data generation. Its potential utility for dataset augmentation and for improving conjunctiva-based hemoglobin prediction or anemia-screening performance remains to be evaluated in future downstream studies.


