Code and aggregate results for three-class liver tumor classification on multiphase CT. The notebooks document the study workflow, and the scripts check the released aggregate analyses. The study combines a multiphase CNN, crop-restricted radiomics, age, and sex through late fusion to distinguish hepatocellular carcinoma (HCC), intrahepatic cholangiocarcinoma (ICC), and combined hepatocellular-cholangiocarcinoma (cHCC-CCA).
Start here: Quick start · Documentation · Notebooks · Results · Reproducibility
Clone the repository, then create and activate a virtual environment using the Windows or macOS/Linux instructions. From the repository root, run:
python -m pip install -e ".[test]"
python scripts/smoke_test.py
python examples/synthetic_fusion.py
python -m pytest -qThe smoke test ends with Public-clone smoke test passed. The example prints a
(6, 8) training matrix and a (2, 8) evaluation matrix. It uses explicitly synthetic
inputs to show how training-fold median imputation precedes fusion feature construction.
These commands download no datasets and train no imaging models.
Python 3.10 or newer is required. The tested public-tools environment
records the versions used for local checks; it does not reconstruct the historical
training environment. Imaging notebooks require the optional .[workflow] dependencies
and the inputs listed in the notebook guide.
The internal PLC-CECT V4 cohort contains 278 patients: 94 HCC, 99 ICC, and 85 cHCC-CCA. A patient-level split assigns 222 patients to five-fold development and 56 to held-out evaluation. All phases from a patient remain in the same partition.
| Model | Development CV macro-AUC, mean ± SD | Held-out macro-AUC (95% CI) |
|---|---|---|
| Clinical baseline | 0.649 ± 0.073 | 0.614 (0.499–0.721) |
| W3: single-phase CNN | 0.912 ± 0.048 | 0.860 (0.784–0.928) |
| W4: multiphase CNN | 0.951 ± 0.040 | 0.906 (0.829–0.971) |
| W5: radiomics-LightGBM | 0.922 ± 0.044 | 0.938 (0.879–0.979) |
| CNN + radiomics | 0.955 ± 0.034 | 0.930 (0.854–0.986) |
| Full fusion | 0.955 ± 0.033 | 0.945 (0.890–0.984) |
Full fusion classified 45/56 patients correctly (accuracy 0.804, macro-F1 0.805). Its AUC advantage did not establish superiority in the nine multiplicity-adjusted DeLong comparisons. W4 had the highest held-out accuracy. See the aggregate tables and provenance for the remaining metrics, exploratory tests, and historical encoding sensitivity analysis.
flowchart LR
CT["Four CT phases and lesion masks"] --> Crop["Independent phase-specific 96³ crops"]
Crop --> W4["W4: multiphase CNN"]
Crop --> W5["W5: radiomics + LightGBM"]
Crop --> W3["W3: C2-only CNN comparator"]
W4 --> Fusion["Late fusion: eight features"]
W5 --> Fusion
Clinical["Age and sex"] --> Fusion
Fusion --> Classes["HCC / ICC / cHCC-CCA"]
The fusion vector contains the three W4 probabilities, the three W5 probabilities, age, and sex, in that order. W3 is a comparator. Missing clinical values are imputed using training-fold medians before the public constructor receives them. Feature order and imputation and preprocessing describe the implementation.
The external HCC-TACE-Seg cohort contains 103 known-HCC patients, so it measures HCC sensitivity rather than three-class discrimination. No retained case has all four required phases. W3 and W4 sensitivities were 0.049 and 0.000. Full-fusion sensitivity was 0.806 with missing clinical values replaced by internal training-fold medians, and 0.019 with sex encoded as zero. These are model-defined scenarios. Radiomics sensitivity depended strongly on feature imputation; Condition C used an internal diagnostic refit. See external results and controls.
The public release supports aggregate checks, synthetic examples, and inspection of the workflow. Exact end-to-end reconstruction remains limited by missing W3 fold 1 and W4 fold 0 checkpoints, source geometry, and crop coordinates. Phases were independently centered without registration; radiomics used unit-spacing crop arrays. CV and stacking estimates also have the limitations documented here.
Obtain PLC-CECT V4 from Science Data Bank and HCC-TACE-Seg from TCIA, following each provider's terms. Patient images, masks, clinical rows, splits, predictions, and checkpoints are not distributed here. See dataset access.
Use CITATION.cff to cite the software. The existing v1.1.0 study release remains the fixed reference; subsequent changes are recorded in CHANGELOG.md. Contributions follow CONTRIBUTING.md. Repository-authored materials use the MIT License; source datasets retain their own terms. This software is for research and is not intended for clinical decisions.
