Skip to content
ModelListedExternal
Download

Malunet Cvc

Lightweight U-shape segmentation network adapted from jcruan519/MALUNet and trained on CVC-ClinicDB for binary polyp segmentation in colonoscopy frames.

KindOtherVersionRevision 334b3e5Cgrade

Model source

Kind
Other
File size
772 KB
Version
vRevision 334b3e5
Updated
Sep 16, 2026
Downloads
0
Source
Hugging Face

Source description

MALUNet · CVC-ClinicDB (Polyp Segmentation)

Lightweight U-shape segmentation network adapted from jcruan519/MALUNet and trained on CVC-ClinicDB for binary polyp segmentation in colonoscopy frames.

Model

  • Architecture: MALUNet (DGA + IEA + CAB + SAB)
  • Channels: [8, 16, 24, 32, 48, 64], split_att="fc", bridge=True
  • Input: RGB, 256×256
  • Output: single-channel sigmoid mask (1 = polyp)
  • Parameters: ~0.18 M

Training

  • Dataset: CVC-ClinicDB (612 paired image/mask frames)
  • Split: 80% train / 20% val (seeded by filename, seed=42)
  • Loss: BCE + Dice
  • Optimizer: AdamW, lr=1e-3, weight_decay=1e-2
  • Schedule: CosineAnnealingLR, T_max=50, eta_min=1e-5
  • Augmentations: random h/v flip, random rotation
  • Epochs: 150

Usage

import torch
from huggingface_hub import hf_hub_download
from infer import load_model, predict_mask  # infer.py from this repo
from PIL import Image

model = load_model("YOUR_USERNAME/malunet-cvc")
mask = predict_mask(model, Image.open("polyp.png"))
Image.fromarray(mask).save("mask.png")

infer.py and models/malunet.py are bundled in this repo so you can also clone it and run inference without the original training code.

Limitations

  • Trained on CVC-ClinicDB only (612 frames, single source). Generalization to other colonoscopy systems / patient populations is unverified.
  • Not a medical device. Research / demo use only.

Sources

1 source
Hugging FacePrimaryVersion 334b3e5041226b60d1b6850b4957d1f66b20b578
huggingface.co/abdulbasitdev/malunet-cvc/tree/334b3e5041226b60d1b6850b4957d1f66b20b578

Verified Sep 1

Model artifacts

1 artifact

best.pth

pth · 772 KB · SHA-256 5966e588253c…848a · Hugging Face

Download file

Source excerpts

2 excerpts

--- license: apache-2.0 tags: - image-segmentation - medical-imaging - polyp-segmentation - pytorch - malunet datasets: - cvc-clinicdb library_name: pytorch pipeline_tag: image-segmentation --- # MALUNet · CVC-ClinicDB (Polyp Segmentation) Lightweight U-shape segmentation network adapted from [jcruan519/MALUNet](https://github.com/jcruan519/MALUNet) and trained on [CVC-ClinicDB](https://www.kaggle.com/datasets/balraj98/cvcclinicdb) for binary polyp segmentation in colonoscopy frames. ## Model - Architecture: MALUNet (DGA + IEA + CAB + SAB) - Channels: `[8, 16, 24, 32, 48, 64]`, `split_att="fc"`, `bridge=True` - Input: RGB, 256×256 - Output: single-channel sigmoid mask (1 = polyp) - Parameters: ~0.18 M ## Training - Dataset: CVC-ClinicDB (612 paired image/mask frames) - Split: 80% train / 20% val (seeded by filename, `seed=42`) - Loss: BCE + Dice - Optimizer: AdamW, `lr=1e-3`, `weight_decay=1e-2` - Schedule: CosineAnnealingLR, `T_max=50`, `eta_min=1e-5` - Augmentations: random h/v flip, random rotation - Epochs: 150 ## Usage ```python import torch from huggingface_hub import hf_hub_download from infer import load_model, predict_mask # infer.py from this repo from PIL import Image model = load_model("YOUR_USERNAME/malunet-cvc") mask = predict_mask(model, Image.open("polyp.png")) Image.fromarray(mask).save("mask.png") ``` `infer.py` and `models/malunet.py` are bundled in this repo so you can also clone it and run inference without the original training code. ## Limitations - Trained on CVC-ClinicDB only (612 frames, single source). Generalization to other colonoscopy systems / patient populations is unverified. - Not a medical device. Research / demo use only.

Source context: 0 downloads · 0 likes · Pipeline image-segmentation · Library pytorch · Repo abdulbasitdev/malunet-cvc