Abstract
Computer-aided diagnosis based on image color rendering promotes medical image analysis and doctor-patient communication by highlighting important information of medical diagnosis. To overcome the limitations of the color rendering method based on deep learning, such as poor model stability, poor rendering quality, fuzzy boundaries and crossed color boundaries, we propose a novel hinge-cross-entropy generative adversarial network (HCEGAN). The self-attention mechanism was added and improved to focus on the important information of the image. And the hinge-cross-entropy loss function was used to stabilize the training process of GAN models. In this study, we implement the HCEGAN model for image color rendering based on DIV2 K and COCO datasets, and evaluate the results using SSIM and PSNR. The experimental results show that the proposed HCEGAN automatically re-renders images, significantly improves the quality of color rendering and greatly improves the stability of prior GAN models.
Introduction
In the medical field, grayscale images—such as X-rays or CT scans—can sometimes obscure critical diagnostic details. Color rendering, the process of "colorizing" these images, can highlight important information, aiding both computer-aided diagnosis and doctor-patient communication. However, existing deep learning methods, particularly standard Generative Adversarial Networks (GANs), face significant hurdles including training instability (vanishing or exploding gradients), rendering artifacts like "color pollution," and slow convergence due to zero-initialized self-attention weights.
Methodology
The researchers propose HCEGAN (Hinge-Cross-Entropy Generative Adversarial Network), which introduces two primary innovations to the standard GAN architecture (specifically building upon the pix2pix model):
Hinge-Cross-Entropy Loss
The authors developed a hybrid loss function combining Hinge loss and Cross-Entropy loss. Hinge loss is utilized to maintain a "safety margin" between correctly and incorrectly classified samples, which helps stabilize the discriminator.
This is paired with Cross-Entropy loss, which excels at learning the nuances between different feature classes. Together, they prevent the model from over-optimizing on "easy" samples while maintaining a steady gradient for learning, effectively avoiding the "gradient disappearance" common in earlier GAN variants.
Improved Self-Attention Module
Self-attention allows the model to capture global context rather than just local pixel dependencies. While standard modules often initialize weights to zero, this paper uses a diagonal matrix initialization following a standard normal distribution ($\mu=0, \sigma=1$). This "jumpstarts" the attention mechanism, forcing the model to initially respect local features while providing a non-zero starting point to expand into global dependencies, significantly speeding up the iteration process.
The architecture utilizes a U-Net generator with skip connections to preserve spatial detail and a $70 \times 70$ PatchGAN discriminator to evaluate the image in small patches.
Experimental Setup
The model was trained and evaluated on two benchmarks:
- DIV2K: A high-quality dataset for image super-resolution (800 training, 100 testing images).
- COCO2017: Focused on six specific categories (fish, ladybug, orange, lion, dog, and bird), using 500 training and 100 testing images per category.
Results and Discussion
HCEGAN consistently outperformed the baseline pix2pix model across both quantitative metrics and qualitative visual checks.
Quantitative Improvements
On the DIV2K dataset, the proposed method increased the PSNR (Peak Signal-to-Noise Ratio) by 1.76 dB and the SSIM (Structural Similarity Index) by 1.82% compared to the original pix2pix. In the COCO dataset, the model showed significant gains across all categories; for example, in the "Lion" category, PSNR improved from 22.278 to 22.792, and SSIM rose from 87.736% to 89.981%.
Qualitative Clarity
Visual comparisons show that HCEGAN produces sharper edges and more harmonious tones. It successfully reduces "color pollution," keeping colors within logical boundaries (e.g., preventing sky blue from bleeding into buildings) and restoring "real" colors where previous models produced muddy hues.
Conclusion
HCEGAN represents a significant step forward in image colorization for IoMT applications. By combining a hybrid loss function with improved self-attention initialization, the model achieves superior stability and rendering quality. Future work will focus on "model lightweighting" to optimize the architecture for deployment on resource-constrained IoMT devices and extending the approach to tasks like image style transfer and super-resolution.
Summary updated