Model Card: U-Net ResNet34 Abdominal Trauma Hemorrhage Segmenter

Model Details

Model Description

This model is a U-Net architecture with a ResNet-34 encoder backbone, fine-tuned specifically for the pixel-level segmentation of intraabdominal hemorrhages and active contrast extravasation. It was developed to serve as "Layer 3" in the Trauma Lifesaver medical AI pipeline, estimating the precise volume (in mL) of blood to facilitate AAST grading and EAST guideline recommendations.

  • Developed by: Jayant Som
  • Model type: Convolutional Neural Network (U-Net with ResNet-34 encoder)
  • Language(s) (NLP): N/A (Computer Vision)
  • License: Apache 2.0
  • Finetuned from model: ImageNet pre-trained ResNet-34 via segmentation_models_pytorch

Model Sources

  • Repository: Trained via Google Colab, deployed for the Trauma Lifesaver Dashboard.

Uses

Direct Use

The model takes a 2.5D RGB array (3 stacked axial CT slices at soft-tissue windows: Center 50, Width 400) and outputs a binary pixel mask indicating the presence of active hemorrhage. It is intended for:

  • Automated pixel-level segmentation of hemoperitoneum and organ lacerations.
  • Volumetric estimation of blood loss.

Out-of-Scope Use

  • Not for standalone diagnostic use. This is an investigational tool designed to assist trauma surgeons and must always be verified by a board-certified radiologist.
  • Should not be applied to non-contrast CTs, as the model was trained exclusively on CT Angiograms (portal venous/arterial phases) where active extravasation is visible.

Bias, Risks, and Limitations

  • False Positives: High-density structures like bowel contrast, surgical clips, or heavily calcified arteries may be misclassified as active hemorrhage.
  • Slice Thickness: The model was trained on 2.5D slices and assumes adjacent slice context. Applying it to isolated 2D images or drastically different slice intervals (e.g., >5mm) may degrade performance.

How to Get Started with the Model

Use the code below to download the model and perform inference using PyTorch and segmentation_models_pytorch.

import torch
import segmentation_models_pytorch as smp
from huggingface_hub import hf_hub_download

# 1. Download the weights from Hugging Face
model_path = hf_hub_download(
    repo_id="jayantsom/unet-resnet34-rsna23-abd-ct-seg-ep10-lr1e4-v1", 
    filename="model.pth"
)

# 2. Initialize the architecture
model = smp.Unet(
    encoder_name="resnet34",
    encoder_weights=None, # We load our trained weights below
    in_channels=3,
    classes=1,
    activation=None
)

# 3. Load the weights
model.load_state_dict(torch.load(model_path, map_location="cpu"))
model.eval()

print("Hemorrhage segmenter ready for inference!")

Training Details

Training Data

The model was fine-tuned on a 1,000-sample streaming subset of the RSNA 2023 Abdominal Trauma Detection dataset.

Training Procedure

Preprocessing

  • CT Windowing: Soft-tissue window (Center: 50 HU, Width: 400 HU).
  • 2.5D Construction: The target axial slice z was stacked with its adjacent slices z-1 and z+1 to form a 3-channel RGB image, providing spatial depth context to the 2D U-Net.
  • Augmentation (Albumentations):
    • Random Horizontal/Vertical flips (p=0.5)
    • Random Rotate 90 (p=0.5)
    • Elastic Transforms (alpha=120, sigma=6)
    • Color Jitter (Brightness/Contrast)
    • ImageNet Normalization

Training Hyperparameters

  • Loss Function: Combined Dice Loss + Binary Cross Entropy (BCE) with Logits Loss.
  • Optimizer: AdamW (Weight decay: 1e-4)
  • Learning Rate Scheduler: Cosine Annealing (Peak LR: 1e-4)
  • Training regime: Mixed Precision (torch.amp.autocast) using Colab GPU.
  • Epochs: 10
  • Batch Size: 4 per device (Gradient Accumulation: 4) -> Effective Batch Size: 16

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: NVIDIA A100-SXM4-40GB (Google Colab High-RAM)
  • Hours used: ~1 Hour
  • Cloud Provider: Google Cloud
  • Compute Region: US
  • Carbon Emitted: ~0.1 kg CO₂eq (Estimated)

Version History

  • v1 (Current):
    • Trained on 1,000 streaming samples from the RSNA 2023 dataset.
    • Hyperparameters: 10 Epochs, Effective Batch Size 16, Peak LR 1e-4.
    • Final Epoch Average Loss (Dice + BCE): 1.0916.

Technical Specifications

Compute Infrastructure

Hardware

  • GPU: NVIDIA A100-SXM4-40GB
  • System Memory: 83.5 GB (Colab High-RAM instance)

Software

  • PyTorch: 2.0+
  • segmentation_models_pytorch: 0.3+
  • Albumentations: 1.3+
  • Datasets: <3.0.0

Citation

BibTeX:

@misc{rsna2023trauma,
  author = {RSNA},
  title = {RSNA 2023 Abdominal Trauma Detection},
  year = {2023},
  publisher = {Kaggle},
  url = {https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection}
}

APA:

Radiological Society of North America (RSNA). (2023). RSNA 2023 abdominal trauma detection. Kaggle. https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection

Glossary

U-Net: A Convolutional Neural Network (CNN) architecture designed for fast and precise biomedical image segmentation.

ResNet34: A 34-layer Residual Network used here as the encoder backbone for the U-Net, pre-trained on ImageNet to provide strong feature extraction.

Dice Loss: A spatial overlap-based loss function highly effective for medical image segmentation, especially when the target (hemorrhage) occupies a very small percentage of the total image pixels.

NIfTI: Neuroimaging Informatics Technology Initiative. A popular file format for storing 3D medical imaging data (e.g., CT volumes).

HU (Hounsfield Units): A quantitative scale for describing radiodensity in medical CT. Soft tissue windowing (center: 50, width: 400) is used here.

More Information

This segmentation model is released for educational and research purposes. I encourage the community to:

  • Experiment with and improve upon this model
  • Share your results, insights, and adaptations
  • Collaborate on advancing AI-assisted clinical screening and related medical imaging tasks

I am open to collaboration, questions, and feedback. Feel free to reach out via Hugging Face or email below.

Model Card Authors

Jayant Som

Model Card Contact

Jayant Som
(Reach out via Hugging Face profile or jayant2025ms@gmail.com)

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train jayantsom/unet-resnet34-rsna23-abd-ct-seg-ep10-lr1e4-v1

Paper for jayantsom/unet-resnet34-rsna23-abd-ct-seg-ep10-lr1e4-v1