Views
No views yet
joint-segresnet-3d-ex-lidc (same architecture, LIDC
dropped entirely instead of pseudo-labeled), and to
joint-dynunet-3d-{ex,pseudo}-lidc (same task, different architecture).(1, 256, 256, 256) full CT resampled to 256³ (no bbox crop), intensity-normalised to [0, 1](3, 256, 256, 256) softmax logits — class 0 = background, class 1 = lung, class 2 = noduleunified split (patient-grouped, dataset-stratified,
full corpus):| Source | Role | Lung labels |
|---|---|---|
| NLST | train + val | GT (per-slice 2D masks stacked to 3D) |
| NSCLC-Radiomics | train + val | GT (per-slice 2D masks stacked to 3D) |
| LIDC-IDRI | train + val | pseudo-GT — produced by Kakimaki00/roi-segresnet-2d on each LIDC slice, then stacked |
| Class | Dice | Recall | Precision |
|---|---|---|---|
| Lung | 0.9754 | 0.983 | 0.967 |
| Nodule | 0.6421 | 0.643 | 0.641 |
| Combined (mean) | 0.8087 | — | — |
1import yaml, torch
2from monai.networks.nets import SegResNet
3
4cfg = yaml.safe_load(open("config.yaml"))["model"]
5model = SegResNet(
6 spatial_dims = cfg["spatial_dims"],
7 in_channels = cfg["in_channels"],
8 out_channels = cfg["out_channels"], # 3
9 init_filters = cfg["init_filters"],
10 blocks_down = tuple(cfg["blocks_down"]),
11 blocks_up = tuple(cfg["blocks_up"]),
12 dropout_prob = cfg["dropout_prob"],
13)
14state = torch.load("model.pth", map_location="cpu", weights_only=True)
15model.load_state_dict(state)
16model.eval()
17
18with torch.no_grad():
19 x = torch.randn(1, 1, 256, 256, 256) # (B, C, H, W, D)
20 logits = model(x) # (B, 3, D, H, W)
21 pred_class = logits.argmax(dim=1) # (B, D, H, W) in {0, 1, 2}
22 lung_mask = (pred_class == 1).to(torch.uint8)
23 nodule_mask = (pred_class == 2).to(torch.uint8)nodule-* checkpoints in this collection, this
model does not need a lung-bbox crop — feed it the whole CT
resampled to 256³.[1.0, 1.0, 100.0] for [bg, lung, nodule])config.yaml.joint-segresnet-3d-ex-lidc (same architecture, LIDC
dropped): the pseudo-LIDC variant is 0.009 combined Dice worse
(0.8087 vs 0.8180) despite training on 51 % more cases. The
pseudo-labels' noise slightly hurts the lung head's supervision signal;
the additional LIDC diversity does not compensate. If you need a joint
model, the ex-LIDC variant is the recommended default.