Downloads · 30 days
0
kimsungil/brain-ich-ensemble
brain-ich-ensemble is a image classification model from kimsungil. Use it when you need a label for an image. It is set up for timm. The card lists the license as apache-2.0.
뇌 CT 두개내출혈(ICH) 6클래스 분류 앙상블입니다. EfficientNet-B4 + ConvNeXt-Small + ResNet18 확률 평균을 사용합니다.
Downloads · 30 days
0
Access
Public
Updated Aug 19, 2026
Repo size
314 MB
Likes
0
Public
Click a slice to open those files.
.pt314 MB · 100%
From the Hugging Face model README
뇌 CT 두개내출혈(ICH) 6클래스 분류 앙상블입니다.
EfficientNet-B4 + ConvNeXt-Small + ResNet18 확률 평균을 사용합니다.
연구/교육용이며 임상 진단용이 아닙니다.
| id | name | 한글 |
|---|---|---|
| 0 | epidural | 경막외출혈 |
| 1 | intraparenchymal | 뇌실질내출혈 |
| 2 | intraventricular | 뇌실내출혈 |
| 3 | subarachnoid | 지주막하출혈 |
| 4 | subdural | 경막하출혈 |
| 5 | any | 두개내출혈 |
tf_efficientnet_b4_ns_jft_in1k_fold0.ptconvnext_small_fb_in22k_ft_in1k_fold0.ptich_resnet18.pt체크포인트는 model_state_dict (또는 ResNet18의 model) 키를 포함한 torch.save dict입니다.
from pathlib import Path
import torch
import timm
from huggingface_hub import hf_hub_download
REPO = "kimsungil/brain-ich-ensemble"
NUM_CLASSES = 6
def load_ckpt(filename, model_name, device):
path = hf_hub_download(REPO, filename)
blob = torch.load(path, map_location=device, weights_only=False)
sd = blob.get("model_state_dict") or blob.get("model") or blob
kwargs = dict(pretrained=False, num_classes=NUM_CLASSES)
if "resnet" not in model_name.lower():
kwargs.update(drop_rate=0.2, drop_path_rate=0.1)
model = timm.create_model(model_name, **kwargs)
model.load_state_dict(sd, strict=False)
return model.to(device).eval()
device = torch.device("cpu")
models = [
load_ckpt("tf_efficientnet_b4_ns_jft_in1k_fold0.pt", "tf_efficientnet_b4.ns_jft_in1k", device),
load_ckpt("convnext_small_fb_in22k_ft_in1k_fold0.pt", "convnext_small.fb_in22k_ft_in1k", device),
load_ckpt("ich_resnet18.pt", "resnet18", device),
]
입력 이미지는 학습과 같이 380×380, brain/subdural 윈도우를 사용하세요.