ab Arjun Basandrai
Projects  /  2025

xU-NetFullSharp Chest XRay Bone Shadow Suppression

Python · PyTorch · Matplotlib

Research Paper Implementation of the xU-NetFullSharp model for Chest X-Ray Bone Shadow Suppression.

xU-NetFullSharp Chest XRay Bone Shadow Suppression
0.987 test SSIM
37.39 dB test PSNR
4,000+ X-ray pairs augmented JSRT

Problem

On a chest X-ray, the ribs and clavicle sit directly over the lungs, and their shadows hide the critical soft-tissue details. Bone shadow suppression is the task of removing those overlapping bone structures while leaving the lung detail intact, effectively turning a standard X-ray into a soft-tissue image without a second exposure.

Dataset

For this project I used the Augmented JSRT and BSE-JSRT datasets available on Kaggle. This dataset contains more than 4000 Chest X-Ray images along with their corresponding images with shadows of major bones (Ribs and Clavicle) removed.

Model

I implemented the recent xU-NetFullSharp architecture. As described in the official GitHub repository: “The xU-NetFullSharp is based on the most recent U-NetSharp architecture and utilizes bidirectional multi-scale skip connections like in the preceding U-Net3+. The ReLU activation is changed for more modern xUnit activation to ensure more accurate activation maps.”

xU-NetFullSharp architecture

Since the model code is too large, I will not display it here. However, you can find the code in my GitHub repository here.

Loss

I trained the model on the L1-SSIM loss which is a weighted combination of the L1 (Mean Absolute Error) loss along with SSIM (Structural Similarity Index Measure) loss.

loss=aL1+b(1SSIM)\mathrm{loss} = a \cdot \mathrm{L1} + b \cdot (1 - \mathrm{SSIM}) L1-SSIM, a + b = 1

The L1 loss is the absolute error between the prediction and the target:

L(yy^)=i=1nyy^i\mathcal{L}(y - \hat{y}) = \sum_{i=1}^{n} \left| y - \hat{y}_i \right| L1 (MAE)

SSIM measures the structural similarity between the two images:

SSIM(x,y)=(2μxμy+C1)(2σxy+C2)(μx2+μy2+C1)(σx2+σy2+C2)\mathrm{SSIM}(\mathbf{x}, \mathbf{y}) = \frac{(2\mu_x\mu_y + C_1)(2\sigma_{xy} + C_2)}{(\mu_x^2 + \mu_y^2 + C_1)(\sigma_x^2 + \sigma_y^2 + C_2)} SSIM

Results

Chest X-ray bone shadow suppression result (1 of 3): input, target, and predicted output
Chest X-ray bone shadow suppression result (2 of 3): input, target, and predicted output
Chest X-ray bone shadow suppression result (3 of 3): input, target, and predicted output

The trained model is able to accurately reconstruct the finer details in the lungs.

Reconstructed lung detail after bone shadow suppression (1 of 3)
Reconstructed lung detail after bone shadow suppression (2 of 3)
Reconstructed lung detail after bone shadow suppression (3 of 3)
Next project →
Bird Image Semantic Segmentation