CRM is a
mask refinement
model, not a from-scratch segmenter. It takes:
an RGB image
a coarse binary mask (from PSPNet, DeepLab, SAM, etc.)
and continuously aligns encoder features with the refinement target via an implicit MLP (LIIF-style local ensemble). Inference can stay at native resolution; the paper's multi-scale schedule is
0.125 → 0.25 → 0.5 → 1.0
.
Checkpoint
Folder
Backbone
Stem
Decoder
Source
crm-resnet50
Dilated ResNet-50 + 3-level ASPP
4-channel (RGB + mask)
MLP
[32, 32, 32, 32]
model_45705
Synchronized BatchNorm from the original training code is stored as ordinary
nn.BatchNorm2d
(equivalent at eval time). Layer-4 weights are kept for checkpoint compatibility but are unused by the ASPP decoder, matching the original forward.
Usage
from transformers import pipeline
from PIL import Image
MODEL = "/path/to/CRM-transformers/crm-resnet50"
pipe = pipeline(
task="image-segmentation",
model=MODEL,
trust_remote_code=True,
)
image = Image.open("image.png").convert("RGB")
coarse_mask = Image.open("coarse_mask.png").convert("L") # 0/255
segments = pipe(image, mask=coarse_mask)
# Native Hugging Face image-segmentation schema:# [{"score": None, "label": "foreground", "mask": PIL.Image}, ...]for item in segments:
print(item["label"], item["mask"].size)
The task is also inferred if you omit it (this repo registers a single custom pipeline):
off by default (
do_resize: false
) so native
(H, W)
is preserved
Citation
@inproceedings{shen2022high,
title={High Quality Segmentation for Ultra High-resolution Images},
author={Shen, Tiancheng and Zhang, Yuechen and Qi, Lu and Kuen, Jason and Xie, Xingyu and Wu, Jianlong and Lin, Zhe and Jia, Jiaya},
booktitle={CVPR},
year={2022}
}
Runs of BiliSakura CRM-transformers on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About CRM-transformers huggingface.co Model
CRM-transformers huggingface.co is an AI model on huggingface.co that provides CRM-transformers's model effect (), which can be used instantly with this BiliSakura CRM-transformers model. huggingface.co supports a free trial of the CRM-transformers model, and also provides paid use of the CRM-transformers. Support call CRM-transformers model through api, including Node.js, Python, http.
CRM-transformers huggingface.co is an online trial and call api platform, which integrates CRM-transformers's modeling effects, including api services, and provides a free online trial of CRM-transformers, you can try CRM-transformers online for free by clicking the link below.
BiliSakura CRM-transformers online free url in huggingface.co:
CRM-transformers is an open source model from GitHub that offers a free installation service, and any user can find CRM-transformers on GitHub to install. At the same time, huggingface.co provides the effect of CRM-transformers install, users can directly use CRM-transformers installed effect in huggingface.co for debugging and trial. It also supports api for free installation.