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.
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.”
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.
The L1 loss is the absolute error between the prediction and the target:
SSIM measures the structural similarity between the two images:
Results
The trained model is able to accurately reconstruct the finer details in the lungs.