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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CD-DCU-Net
|
| 2 |
+
|
| 3 |
+
PyTorch code and checkpoints for the CD-DCU-Net experiments. The repository contains two parts:
|
| 4 |
+
|
| 5 |
+
- CD-DCU-Net with Concrete Dropout for uncertainty estimation;
|
| 6 |
+
- CD-DCU-Net and four backbone comparison networks without Concrete Dropout.
|
| 7 |
+
|
| 8 |
+
## Contents
|
| 9 |
+
|
| 10 |
+
The public repository is arranged as follows:
|
| 11 |
+
|
| 12 |
+
```text
|
| 13 |
+
.
|
| 14 |
+
|-- CD-DCU-Net(Incorporate CD-module)/
|
| 15 |
+
| |-- CD-DCU-Net.py
|
| 16 |
+
| |-- dataloader.py
|
| 17 |
+
| |-- train_with_α.py
|
| 18 |
+
| |-- train_without_α.py
|
| 19 |
+
| |-- predict.py
|
| 20 |
+
| |-- porposed.pth
|
| 21 |
+
| `-- proposed(without_α).pth
|
| 22 |
+
|
|
| 23 |
+
|-- dataset/
|
| 24 |
+
| |-- input/
|
| 25 |
+
| | |-- 1/
|
| 26 |
+
| | |-- 2/
|
| 27 |
+
| | `-- ...
|
| 28 |
+
| `-- output/
|
| 29 |
+
| |-- 1/
|
| 30 |
+
| |-- 2/
|
| 31 |
+
| `-- ...
|
| 32 |
+
|
|
| 33 |
+
`-- Different networks compare(without CD-model)/
|
| 34 |
+
|-- dataloader.py
|
| 35 |
+
|-- train.py
|
| 36 |
+
|-- predict.py
|
| 37 |
+
|-- CD-DCU-Net/
|
| 38 |
+
| |-- CD-DCU-Net.py
|
| 39 |
+
| |-- proposed_initial.pth
|
| 40 |
+
| `-- kaiming_initial.pth
|
| 41 |
+
|-- DFPP-Net/
|
| 42 |
+
| |-- DFPP-Net.py
|
| 43 |
+
| `-- DFPP-Net.pth
|
| 44 |
+
|-- DR-U-Net/
|
| 45 |
+
| |-- DR-U-Net.py
|
| 46 |
+
| `-- DR-U-Net.pth
|
| 47 |
+
|-- ISP-Net/
|
| 48 |
+
| |-- ISP-Net.py
|
| 49 |
+
| `-- ISP-Net.pth
|
| 50 |
+
`-- TS-U-Net/
|
| 51 |
+
|-- TS-U-Net.py
|
| 52 |
+
`-- TS-U-Net.pth
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Concrete Dropout Experiments
|
| 56 |
+
|
| 57 |
+
`CD-DCU-Net(Incorporate CD-module)/CD-DCU-Net.py` adds Concrete Dropout after each encoder and decoder stage and at the bottleneck. Its output is
|
| 58 |
+
|
| 59 |
+
```python
|
| 60 |
+
{
|
| 61 |
+
"M_mean": M_mean,
|
| 62 |
+
"M_var": M_var,
|
| 63 |
+
"D_mean": D_mean,
|
| 64 |
+
"D_var": D_var,
|
| 65 |
+
}
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
The two training scripts differ in whether the temperature constant is applied to the log-variance term of the NLL loss:
|
| 69 |
+
|
| 70 |
+
```text
|
| 71 |
+
train_with_α.py
|
| 72 |
+
10e-4 * log(var + eps) + (target - mean)^2 / (var + eps)
|
| 73 |
+
|
| 74 |
+
train_without_α.py
|
| 75 |
+
log(var + eps) + (target - mean)^2 / (var + eps)
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
The temperature constant is `10e-4` and is applied to `log(var + eps)`. It is not the `BNNLoss(alpha=...)` argument, which is present in both scripts and scales the full prediction loss.
|
| 79 |
+
|
| 80 |
+
`10e-4` is the literal used by the code and evaluates to `1e-3` in Python. It is left unchanged in this repository.
|
| 81 |
+
|
| 82 |
+
The corresponding checkpoints are:
|
| 83 |
+
|
| 84 |
+
| Training setting | Checkpoint |
|
| 85 |
+
|---|---|
|
| 86 |
+
| With the temperature constant in the log-variance term | `porposed.pth` |
|
| 87 |
+
| Without the temperature constant | `proposed(without_α).pth` |
|
| 88 |
+
|
| 89 |
+
The spelling of `porposed.pth` matches the provided file.
|
| 90 |
+
|
| 91 |
+
## Backbone Comparisons
|
| 92 |
+
|
| 93 |
+
The comparison directory uses one shared data loader, training script, and prediction script. The available models are:
|
| 94 |
+
|
| 95 |
+
| Model | Model file | Checkpoint |
|
| 96 |
+
|---|---|---|
|
| 97 |
+
| CD-DCU-Net, proposed initialization | `CD-DCU-Net/CD-DCU-Net.py` | `CD-DCU-Net/proposed_initial.pth` |
|
| 98 |
+
| CD-DCU-Net, Kaiming initialization | `CD-DCU-Net/CD-DCU-Net.py` | `CD-DCU-Net/kaiming_initial.pth` |
|
| 99 |
+
| DFPP-Net | `DFPP-Net/DFPP-Net.py` | `DFPP-Net/DFPP-Net.pth` |
|
| 100 |
+
| DR-U-Net | `DR-U-Net/DR-U-Net.py` | `DR-U-Net/DR-U-Net.pth` |
|
| 101 |
+
| ISP-Net | `ISP-Net/ISP-Net.py` | `ISP-Net/ISP-Net.pth` |
|
| 102 |
+
| TS-U-Net | `TS-U-Net/TS-U-Net.py` | `TS-U-Net/TS-U-Net.pth` |
|
| 103 |
+
|
| 104 |
+
CD-DCU-Net is the proposed backbone. `kaiming_initial.pth` is the Kaiming-initialized result. Checkpoints without an explicit Kaiming label use the proposed initialization setting.
|
| 105 |
+
|
| 106 |
+
All comparison models return the same interface:
|
| 107 |
+
|
| 108 |
+
```python
|
| 109 |
+
{"M_mean": M_mean, "D_mean": D_mean}
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
The shared `train.py` and `predict.py` are currently configured for DFPP-Net. See [Selecting a model](#selecting-a-model) before running another backbone.
|
| 113 |
+
|
| 114 |
+
## Environment
|
| 115 |
+
|
| 116 |
+
Required packages:
|
| 117 |
+
|
| 118 |
+
```text
|
| 119 |
+
torch
|
| 120 |
+
torchvision
|
| 121 |
+
numpy
|
| 122 |
+
scipy
|
| 123 |
+
pillow
|
| 124 |
+
matplotlib
|
| 125 |
+
tqdm
|
| 126 |
+
opencv-python
|
| 127 |
+
torchsummary
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
Install PyTorch for the required CUDA version, then install the remaining packages:
|
| 131 |
+
|
| 132 |
+
```bash
|
| 133 |
+
pip install numpy scipy pillow matplotlib tqdm opencv-python torchsummary
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
Multi-GPU training uses the NCCL backend.
|
| 137 |
+
|
| 138 |
+
## Data Format
|
| 139 |
+
|
| 140 |
+
In the public repository layout, both experiment directories use one shared `dataset/` folder at the repository root. The dataset is not duplicated inside either experiment directory. `input/` contains the three input images and `output/` contains the corresponding labels. Sample folder names are numeric.
|
| 141 |
+
|
| 142 |
+
```text
|
| 143 |
+
dataset/
|
| 144 |
+
|-- input/
|
| 145 |
+
| |-- 1/
|
| 146 |
+
| | |-- image1.png
|
| 147 |
+
| | |-- image2.png
|
| 148 |
+
| | `-- image3.png
|
| 149 |
+
| |-- 2/
|
| 150 |
+
| | |-- image1.png
|
| 151 |
+
| | |-- image2.png
|
| 152 |
+
| | `-- image3.png
|
| 153 |
+
| `-- ...
|
| 154 |
+
`-- output/
|
| 155 |
+
|-- 1/
|
| 156 |
+
| `-- label.mat
|
| 157 |
+
|-- 2/
|
| 158 |
+
| `-- label.mat
|
| 159 |
+
`-- ...
|
| 160 |
+
```
|
| 161 |
+
|
| 162 |
+
Each `label.mat` must contain two arrays named `M` and `D`. For every sample:
|
| 163 |
+
|
| 164 |
+
- the three PNG files must be single-channel images of the same size;
|
| 165 |
+
- `M` and `D` must match the image height and width;
|
| 166 |
+
- the numeric folder name must be the same under `input/` and `output/`.
|
| 167 |
+
|
| 168 |
+
The data loader divides input images and labels by `1000.0`. It applies synchronized geometric augmentation only to the training split.
|
| 169 |
+
|
| 170 |
+
### Train/validation split
|
| 171 |
+
|
| 172 |
+
The training and validation sets are generated from the sample folders rather than stored in separate directories. All current training scripts use an 80/20 split:
|
| 173 |
+
|
| 174 |
+
```python
|
| 175 |
+
train_ratio = 0.8
|
| 176 |
+
seed = 42
|
| 177 |
+
```
|
| 178 |
+
|
| 179 |
+
The split is produced in the following order:
|
| 180 |
+
|
| 181 |
+
1. Read and sort the folder names under `dataset/input/` with Python `sorted()`.
|
| 182 |
+
2. Create one index for each sorted folder name.
|
| 183 |
+
3. Shuffle the indices with `np.random.RandomState(seed)`.
|
| 184 |
+
4. Use the first `int(0.8 * number_of_samples)` indices for training.
|
| 185 |
+
5. Use all remaining indices, approximately 20% of the samples, for validation.
|
| 186 |
+
|
| 187 |
+
The following script prints the exact sample folders assigned to each set:
|
| 188 |
+
|
| 189 |
+
```python
|
| 190 |
+
import os
|
| 191 |
+
import numpy as np
|
| 192 |
+
|
| 193 |
+
data_dir = "dataset"
|
| 194 |
+
train_ratio = 0.8
|
| 195 |
+
seed = 42
|
| 196 |
+
|
| 197 |
+
samples = sorted(os.listdir(os.path.join(data_dir, "input")))
|
| 198 |
+
indices = list(range(len(samples)))
|
| 199 |
+
|
| 200 |
+
rng = np.random.RandomState(seed)
|
| 201 |
+
rng.shuffle(indices)
|
| 202 |
+
|
| 203 |
+
train_size = int(train_ratio * len(samples))
|
| 204 |
+
train_samples = [samples[i] for i in indices[:train_size]]
|
| 205 |
+
val_samples = [samples[i] for i in indices[train_size:]]
|
| 206 |
+
|
| 207 |
+
print("Training samples:", train_samples)
|
| 208 |
+
print("Validation samples:", val_samples)
|
| 209 |
+
```
|
| 210 |
+
|
| 211 |
+
Run this script from the repository root. It reproduces the membership generated by `create_data_loaders()`. The distributed sampler may change the order in which training samples are read during each epoch, but it does not change which samples belong to the training or validation set.
|
| 212 |
+
|
| 213 |
+
Folder names are sorted as strings because the data loader uses `sorted(os.listdir(...))`. For example, non-padded names may be ordered as `1`, `10`, `11`, `2`. The script above deliberately uses the same rule so that its result matches the training code exactly.
|
| 214 |
+
|
| 215 |
+
## Selecting a Model
|
| 216 |
+
|
| 217 |
+
The architecture filenames contain hyphens, which cannot be used in a normal Python import. Copy or rename the selected file to an import-safe name before running the scripts.
|
| 218 |
+
|
| 219 |
+
### Concrete Dropout model
|
| 220 |
+
|
| 221 |
+
Inside `CD-DCU-Net(Incorporate CD-module)/`, copy or rename `CD-DCU-Net.py` to `cd_dcu_net.py`. Then use the same import in both training scripts and in `predict.py`:
|
| 222 |
+
|
| 223 |
+
```python
|
| 224 |
+
from cd_dcu_net import UNet
|
| 225 |
+
```
|
| 226 |
+
|
| 227 |
+
The constructor is:
|
| 228 |
+
|
| 229 |
+
```python
|
| 230 |
+
UNet(n_channels=3, bilinear=False)
|
| 231 |
+
```
|
| 232 |
+
|
| 233 |
+
This replaces `from mcunet1 import UNet` in the training scripts and `from proposed_uncertainty import UNet` in the prediction script.
|
| 234 |
+
|
| 235 |
+
### Comparison models
|
| 236 |
+
|
| 237 |
+
Copy the selected model file into `Different networks compare(without CD-model)/`, give it the module name shown below, and update both `train.py` and `predict.py`.
|
| 238 |
+
|
| 239 |
+
| Model | Module and import | Constructor |
|
| 240 |
+
|---|---|---|
|
| 241 |
+
| CD-DCU-Net | `from cd_dcu_net import UNet` | `UNet(n_channels=3, bilinear=False)` |
|
| 242 |
+
| DFPP-Net | `from dfppnet import DFPPNet3FrameMD` | `DFPPNet3FrameMD(n_feat=4, stage0_align=True, stage1_align=False, stage2_align=False, return_aux=False)` |
|
| 243 |
+
| DR-U-Net | `from dr_unet import UNet` | `UNet(n_channels=3, out_channels=2, bilinear=False)` |
|
| 244 |
+
| ISP-Net | `from isp_net import UNet` | `UNet(n_channels=3, bilinear=False)` |
|
| 245 |
+
| TS-U-Net | `from ts_unet import UNet` | `UNet(n_channels=3, bilinear=False)` |
|
| 246 |
+
|
| 247 |
+
Change the constructor in two places:
|
| 248 |
+
|
| 249 |
+
- the main block of `train.py`;
|
| 250 |
+
- `Predictor._load_model()` in `predict.py`.
|
| 251 |
+
|
| 252 |
+
The architecture and constructor must match the checkpoint.
|
| 253 |
+
|
| 254 |
+
## Training
|
| 255 |
+
|
| 256 |
+
Edit the configuration block at the bottom of the selected training script:
|
| 257 |
+
|
| 258 |
+
```python
|
| 259 |
+
data_dir = "../dataset"
|
| 260 |
+
batch_size = 4
|
| 261 |
+
train_ratio = 0.8
|
| 262 |
+
crop_size = (1360, 672)
|
| 263 |
+
num_workers = 16
|
| 264 |
+
num_epochs = 300
|
| 265 |
+
learning_rate = 0.0001
|
| 266 |
+
pretrained_path = "path/to/initialization_checkpoint.pth"
|
| 267 |
+
```
|
| 268 |
+
|
| 269 |
+
Also set `save_dir` in the `Trainer(...)` call. `crop_size` is ordered as `(height, width)` and must not exceed the image size.
|
| 270 |
+
|
| 271 |
+
Training is initialized from a checkpoint:
|
| 272 |
+
|
| 273 |
+
```python
|
| 274 |
+
checkpoint = torch.load(pretrained_path, map_location="cpu")
|
| 275 |
+
model.load_state_dict(checkpoint["model_state_dict"], strict=True)
|
| 276 |
+
```
|
| 277 |
+
|
| 278 |
+
The checkpoint must contain `model_state_dict` and must match the selected architecture.
|
| 279 |
+
|
| 280 |
+
Run one of the Concrete Dropout experiments from its directory:
|
| 281 |
+
|
| 282 |
+
```bash
|
| 283 |
+
python "train_with_α.py"
|
| 284 |
+
python "train_without_α.py"
|
| 285 |
+
```
|
| 286 |
+
|
| 287 |
+
Run a backbone comparison after updating the shared model import and constructor:
|
| 288 |
+
|
| 289 |
+
```bash
|
| 290 |
+
cd "Different networks compare(without CD-model)"
|
| 291 |
+
python train.py
|
| 292 |
+
```
|
| 293 |
+
|
| 294 |
+
For multi-GPU training:
|
| 295 |
+
|
| 296 |
+
```bash
|
| 297 |
+
torchrun --standalone --nproc_per_node=2 "train_with_α.py"
|
| 298 |
+
```
|
| 299 |
+
|
| 300 |
+
The scripts save epoch checkpoints, `best_model.pth`, training curves, and the five most recent rolling checkpoints. Concrete Dropout training also saves the learned dropout-rate curves.
|
| 301 |
+
|
| 302 |
+
## Prediction
|
| 303 |
+
|
| 304 |
+
Set the checkpoint, crop size, device, and three image paths at the bottom of `predict.py`:
|
| 305 |
+
|
| 306 |
+
```python
|
| 307 |
+
predictor = Predictor(
|
| 308 |
+
model_path="path/to/model_checkpoint.pth",
|
| 309 |
+
crop_size=(1360, 672),
|
| 310 |
+
device="cuda",
|
| 311 |
+
)
|
| 312 |
+
|
| 313 |
+
img1_path = "../dataset/input/1/image1.png"
|
| 314 |
+
img2_path = "../dataset/input/1/image2.png"
|
| 315 |
+
img3_path = "../dataset/input/1/image3.png"
|
| 316 |
+
```
|
| 317 |
+
|
| 318 |
+
Use the same crop size as training. Set `device="cpu"` for CPU inference.
|
| 319 |
+
|
| 320 |
+
Run:
|
| 321 |
+
|
| 322 |
+
```bash
|
| 323 |
+
python predict.py
|
| 324 |
+
```
|
| 325 |
+
|
| 326 |
+
### Single prediction
|
| 327 |
+
|
| 328 |
+
```python
|
| 329 |
+
result = predictor.predict_single(img1_path, img2_path, img3_path)
|
| 330 |
+
predictor.save_prediction(result, "predictions/single_result.mat", mode="single")
|
| 331 |
+
```
|
| 332 |
+
|
| 333 |
+
Single prediction returns `M` and `D`.
|
| 334 |
+
|
| 335 |
+
### Uncertainty prediction
|
| 336 |
+
|
| 337 |
+
Monte Carlo prediction is used for the Concrete Dropout model:
|
| 338 |
+
|
| 339 |
+
```python
|
| 340 |
+
results = predictor.predict_with_uncertainty(
|
| 341 |
+
img1_path,
|
| 342 |
+
img2_path,
|
| 343 |
+
img3_path,
|
| 344 |
+
n_samples=50,
|
| 345 |
+
)
|
| 346 |
+
predictor.save_prediction(results, "predictions/mc_result.mat", mode="mc")
|
| 347 |
+
```
|
| 348 |
+
|
| 349 |
+
During Monte Carlo prediction, `predict.py` enables Concrete Dropout, runs `n_samples` stochastic forward passes, and restores evaluation mode afterward. The output contains mean predictions and model, data, and total uncertainty maps for both `M` and `D`.
|
| 350 |
+
|
| 351 |
+
The comparison backbones return only `M_mean` and `D_mean`; use `predict_single()` for those checkpoints.
|
| 352 |
+
|
| 353 |
+
## Hugging Face Upload
|
| 354 |
+
|
| 355 |
+
The checkpoint files are large. Track them with Git LFS before pushing the repository:
|
| 356 |
+
|
| 357 |
+
```bash
|
| 358 |
+
git lfs install
|
| 359 |
+
git lfs track "*.pth"
|
| 360 |
+
git add .gitattributes
|
| 361 |
+
git add .
|
| 362 |
+
git commit -m "Add code and checkpoints"
|
| 363 |
+
```
|