Fix direct predict usage: output_directory is positional
Browse files
README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: direct
|
| 4 |
+
tags:
|
| 5 |
+
- mri
|
| 6 |
+
- reconstruction
|
| 7 |
+
- modulated-convolution
|
| 8 |
+
- fastmri
|
| 9 |
+
- conditional
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# DIRECT — Modulated Convolution for Conditional MRI Reconstruction
|
| 13 |
+
|
| 14 |
+
Pretrained checkpoints and matching YAML configs for
|
| 15 |
+
[Conditional Learned Reconstruction for Medical Imaging](https://proceedings.mlr.press/v315/moriakov26a.html)
|
| 16 |
+
(Moriakov et al., MIDL 2026).
|
| 17 |
+
|
| 18 |
+
## Dataset
|
| 19 |
+
|
| 20 |
+
| Anatomy | Dataset | Notes |
|
| 21 |
+
|---|---|---|
|
| 22 |
+
| **Knee** | [fastMRI](https://fastmri.med.nyu.edu/) knee | Multi-coil; conditioned on acceleration \(R\) and ACS fraction |
|
| 23 |
+
| **Prostate** | [fastMRI](https://fastmri.med.nyu.edu/) prostate | Same conditioning |
|
| 24 |
+
|
| 25 |
+
## Paper
|
| 26 |
+
|
| 27 |
+
- **MIDL 2026 (PMLR 315:754–780):** [proceedings](https://proceedings.mlr.press/v315/moriakov26a.html) · [OpenReview PDF](https://openreview.net/pdf?id=qNjleGZJis)
|
| 28 |
+
|
| 29 |
+
## Files
|
| 30 |
+
|
| 31 |
+
```text
|
| 32 |
+
knee/<name>.yaml
|
| 33 |
+
knee/<name>.pt
|
| 34 |
+
prostate/<name>.yaml
|
| 35 |
+
prostate/<name>.pt
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
### Knee
|
| 39 |
+
|
| 40 |
+
| Name | Description |
|
| 41 |
+
|---|---|
|
| 42 |
+
| `vsharp_triang` | Non-modulated vSHARP baseline (triangular \(R\) sampling) |
|
| 43 |
+
| `vsharp_modconv_features_triang` | ModConv features, triangular |
|
| 44 |
+
| `vsharp_modconv_features_triang_32_16` | ModConv features, MLP 32→16 |
|
| 45 |
+
| `vsharp_modconv_features_triang_32_8` | ModConv features, MLP 32→8 |
|
| 46 |
+
| `vsharp_modconv_features_triang_32_16_mod_inp` | ModConv at input |
|
| 47 |
+
| `vsharp_adain_triang_32_16` | AdaIN conditioning baseline |
|
| 48 |
+
|
| 49 |
+
### Prostate
|
| 50 |
+
|
| 51 |
+
| Name | Description |
|
| 52 |
+
|---|---|
|
| 53 |
+
| `vsharp_triang` | Non-modulated baseline |
|
| 54 |
+
| `vsharp_modconv_features_triang` | ModConv features |
|
| 55 |
+
| `vsharp_modconv_features_triang_32_16` | ModConv features, MLP 32→16 |
|
| 56 |
+
| `vsharp_modconv_features_triang_32_8` | ModConv features, MLP 32→8 |
|
| 57 |
+
|
| 58 |
+
## Usage
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
hf download NKI-AI/direct-modulated-convolution --local-dir ./modconv
|
| 62 |
+
|
| 63 |
+
direct predict ./predictions \
|
| 64 |
+
--cfg ./modconv/knee/vsharp_modconv_features_triang_32_8.yaml \
|
| 65 |
+
--checkpoint ./modconv/knee/vsharp_modconv_features_triang_32_8.pt \
|
| 66 |
+
--data-root /path/to/fastmri/knee/val \
|
| 67 |
+
--num-gpus 1
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
The first argument is the **output directory** (predictions), not an experiment folder.
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
## Framework
|
| 74 |
+
|
| 75 |
+
[DIRECT](https://github.com/NKI-AI/direct) · project docs in `projects/modulated_convolution/` · [NKI-AI](https://huggingface.co/NKI-AI)
|