--- license: apache-2.0 tags: - medical-imaging - segmentation - self-supervised-learning - coronary-artery - unet --- # Model Card for CM-UNet CM-UNet is a **UNet-based model** designed for **coronary artery segmentation** in X-Ray angiography. It leverages **self-supervised pretraining** on unannotated datasets and **transfer learning** on limited annotated data, reducing the need for large-scale manual annotations. --- ## Model Details - **Developed by:** Camille Challier et al. - **Model type:** UNet (convolutional encoder-decoder) - **License:** Apache-2.0 - **Tasks:** Coronary artery segmentation in X-Ray angiography images ### Model Sources - **Repository:** [GitHub](https://github.com/CamilleChallier/Contrastive-Masked-UNet) - **Paper:** [arXiv:2507.17779](https://arxiv.org/abs/2507.17779) --- ## Uses ### Direct Use - Intended for research and educational purposes in medical image segmentation. --- ## How to Get Started with the Model ```python import torch import numpy as np import matplotlib.pyplot as plt from PIL import Image from UNET.model import UNet # 1. Load model model = UNet() model.load_state_dict(torch.load("unet_weights.pth", map_location="cpu")) model.eval() # 2. Load an image (.npy format) arr = np.load("example.npy") # replace with your image path image = Image.fromarray(arr).resize((256, 256), resample=Image.BICUBIC) x = torch.from_numpy(np.asarray(image)).unsqueeze(0).float() # 3. Run inference with torch.no_grad(): logits = model(x) # 4. Postprocess → predicted mask pred_mask = torch.argmax(logits, dim=1).squeeze(0).numpy() # 5. Plot input and predicted mask fig, axs = plt.subplots(1, 2, figsize=(8, 4)) axs[0].imshow(arr, cmap="gray") axs[0].set_title("Input Image") axs[0].axis("off") axs[1].imshow(pred_mask, cmap="gray") axs[1].set_title("Predicted Mask") axs[1].axis("off") plt.show() ``` --- ## 📖 Citation If you find this work useful, please consider citing it: ```bibtex @misc{challier2025cmunetselfsupervisedlearningbasedmodel, title={CM-UNet: A Self-Supervised Learning-Based Model for Coronary Artery Segmentation in X-Ray Angiography}, author={Camille Challier and Xiaowu Sun and Thabo Mahendiran and Ortal Senouf and Bernard De Bruyne and Denise Auberson and Olivier Müller and Stephane Fournier and Pascal Frossard and Emmanuel Abbé and Dorina Thanou}, year={2025}, eprint={2507.17779}, archivePrefix={arXiv}, primaryClass={q-bio.QM}, url={https://arxiv.org/abs/2507.17779}, }