ses7720 commited on
Commit
7f340fa
·
0 Parent(s):

Initial release

Browse files
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ pipeline_tag: image-to-image
4
+ base_model: facebook/dinov3-vitl16-pretrain-lvd1689m
5
+ tags:
6
+ - image-restoration
7
+ - all-in-one-restoration
8
+ - continual-learning
9
+ - neurips-2026
10
+ ---
11
+ # DUDA pretrained release
12
+
13
+ Pretrained assets for **Discovering Unseen Degradations to Adapt Semi-Supervised Image Restoration** (NeurIPS 2026).
14
+
15
+ - Project: https://bo-oseng.github.io/DUDA/
16
+ - Code: https://github.com/bo-oseng/DUDA
17
+ - Dataset: https://huggingface.co/datasets/ses7720/DUDA-WRES
18
+
19
+ ## Files
20
+
21
+ `duda-pretrained.tar.gz` contains the paper assets (about 193 MiB compressed):
22
+
23
+ | Asset | Purpose |
24
+ |---|---|
25
+ | `checkpoints/stage0_latest.pth` | Supervised restoration initialization, epoch 500 |
26
+ | `checkpoints/semi_supervised_epoch10.pth` | Adapted student/teacher and descriptor, epoch 10, step 14,470 |
27
+ | `cgcd/` | PCA, scaler, class mapping and stage Gaussian parameters |
28
+ | `dino_adapter/` | Learned DINOv3 BOFT adapter, permutation buffers, base-layer biases and classification head |
29
+ | `features/wres_with_clear/dinov3-vitl16-sl/class_order.txt` | Degradation class ordering |
30
+ | `manifest.json` | Per-file SHA-256 checksums |
31
+
32
+ The Docker image below includes the runtime and implementation, so a GitHub
33
+ checkout is optional for Docker users.
34
+
35
+ DINOv3 base weights are obtained from the official gated model repository separately.
36
+
37
+ ## Download and run
38
+
39
+ ```bash
40
+ hf download ses7720/DUDA --include "duda-pretrained.tar.gz*" README.md SHA256SUMS release.json --local-dir downloads/duda-models
41
+ cd downloads/duda-models
42
+ sha256sum -c SHA256SUMS
43
+ tar -xzf duda-pretrained.tar.gz
44
+ ```
45
+
46
+ From a [DUDA source checkout](https://github.com/bo-oseng/DUDA), follow its `README.md` to build the Conda environment or Docker image. Obtain
47
+ DINOv3 using the access/download instructions in `README.md`, then link the
48
+ extracted release assets:
49
+
50
+ ```bash
51
+ python scripts/link_assets.py \
52
+ --features /path/to/duda-pretrained/features \
53
+ --dino-adapter /path/to/duda-pretrained/dino_adapter \
54
+ --cgcd /path/to/duda-pretrained/cgcd \
55
+ --stage0 /path/to/duda-pretrained/checkpoints/stage0_latest.pth \
56
+ --adapted /path/to/duda-pretrained/checkpoints/semi_supervised_epoch10.pth
57
+ CUDA_VISIBLE_DEVICES=0 python restoration/infer.py \
58
+ --input /path/to/image.jpg --output outputs/restored.png
59
+ ```
60
+
61
+ The default restoration checkpoint uses the adapted teacher. Add `--stage 0`
62
+ for supervised initialization. The training patches can be generated from the
63
+ original training images with the provided code, or downloaded directly as a
64
+ precomputed archive. See the dataset card for both commands.
65
+
66
+ ## Continual 6+1+2 and 6+1+1+1 streams
67
+
68
+ The optional `continual/duda-continual-weights.tar.gz` contains five regular-stream restoration checkpoints (two stages for 6+1+2 and three for 6+1+1+1), plus each stream's PCA, scaler, class mappings, and stage-specific CGCD means/covariances. The stage-aware source and Bash scripts are maintained in the [DUDA GitHub repository](https://github.com/bo-oseng/DUDA) and documented in `CONTINUAL.md`. The Docker image includes these scripts.
69
+
70
+ ```bash
71
+ hf download ses7720/DUDA --include 'continual/duda-continual-weights.tar.gz' --local-dir downloads/duda-models
72
+ cd /path/to/DUDA
73
+ tar -xzf /path/to/downloads/duda-models/continual/duda-continual-weights.tar.gz --strip-components=1
74
+ STAGE=2 bash bash/test_6p1p2.sh
75
+ STAGE=3 bash bash/test_6p1p1p1.sh
76
+ ```
77
+
78
+ ## Downloadable Docker image
79
+
80
+ The optional `docker/duda-neurips2026.tar.zst` file (7.00 GB compressed) contains the tested Docker
81
+ image, including the runtime and project code. It is separate from the model
82
+ bundle. Model weights, DINOv3 base weights and datasets are obtained separately.
83
+
84
+ Download and load the image:
85
+
86
+ ```bash
87
+ hf download ses7720/DUDA --include "docker/*" --local-dir downloads/duda-docker
88
+ (cd downloads/duda-docker/docker && sha256sum -c SHA256SUMS)
89
+ zstd -dc downloads/duda-docker/docker/duda-neurips2026.tar.zst | docker load
90
+ ```
91
+
92
+ The loaded tag is `duda:neurips2026`. This is an image archive for `docker load`;
93
+ it is not a Docker registry endpoint.
94
+
95
+ To run one image, first extract `duda-pretrained.tar.gz` in your working directory.
96
+ Request access to the [official DINOv3 model](https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m),
97
+ then download its base weights:
98
+
99
+ ```bash
100
+ hf auth login
101
+ hf download facebook/dinov3-vitl16-pretrain-lvd1689m \
102
+ --revision ea8dc2863c51be0a264bab82070e3e8836b02d51 \
103
+ --include config.json model.safetensors preprocessor_config.json LICENSE.md README.md \
104
+ --local-dir dinov3-vitl16
105
+ ```
106
+
107
+ Set your input image path and run the container. Change the host GPU selection
108
+ as needed; the process inside the container uses the single exposed GPU.
109
+
110
+ ```bash
111
+ export DUDA_INPUT=/absolute/path/to/input.jpg
112
+ mkdir -p outputs
113
+ docker run --rm --gpus '"device=0"' --shm-size=2g \
114
+ -v "$PWD/dinov3-vitl16:/app/assets/dino_base:ro" \
115
+ -v "$PWD/duda-pretrained/dino_adapter:/app/assets/dino_adapter:ro" \
116
+ -v "$PWD/duda-pretrained/cgcd:/app/assets/cgcd:ro" \
117
+ -v "$PWD/duda-pretrained/features:/app/assets/features:ro" \
118
+ -v "$PWD/duda-pretrained/checkpoints:/app/assets/checkpoints:ro" \
119
+ -v "$DUDA_INPUT:/inputs/input.jpg:ro" \
120
+ -v "$PWD/outputs:/app/outputs" \
121
+ duda:neurips2026 python restoration/infer.py \
122
+ --input /inputs/input.jpg --output outputs/restored.png
123
+ ```
124
+
125
+ The image pins Pillow 11.3.0, whose libjpeg-turbo JPEG decoding matches the
126
+ paper runs.
127
+
128
+ The image can also run `scripts/prepare_datasets.py` for dataset patch generation
129
+ and monitoring-subset preparation; see the dataset card.
SHA256SUMS ADDED
@@ -0,0 +1 @@
 
 
1
+ 872e059b1b7bdba0e3c71f5c0472fc6c2d9ceb76a763673a953b74177fca6721 duda-pretrained.tar.gz
continual/SHA256SUMS ADDED
@@ -0,0 +1 @@
 
 
1
+ 6faa51c324f0e058745bc6dc57f0ed60ab8afd46d2cfeafc0876d32b248c4d72 duda-continual-weights.tar.gz
continual/duda-continual-weights.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6faa51c324f0e058745bc6dc57f0ed60ab8afd46d2cfeafc0876d32b248c4d72
3
+ size 519650544
docker/SHA256SUMS ADDED
@@ -0,0 +1 @@
 
 
1
+ f2520dcaefa212eec292aeea8594c9ed59d2fa141d988afa442e48da62ad91ee duda-neurips2026.tar.zst
docker/duda-neurips2026.tar.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2520dcaefa212eec292aeea8594c9ed59d2fa141d988afa442e48da62ad91ee
3
+ size 7001249855
docker/image.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tag": "duda:neurips2026",
3
+ "image_id": "sha256:aa6925e15d8491e323ae3466414b5c7b34c747b48a1fc2b5967ed40d785bca3c",
4
+ "uncompressed_image_bytes": 17418005718,
5
+ "archive_bytes": 7001249855,
6
+ "archive_sha256": "f2520dcaefa212eec292aeea8594c9ed59d2fa141d988afa442e48da62ad91ee",
7
+ "platform": "linux/amd64",
8
+ "pillow": "11.3.0",
9
+ "contains_project_code": true,
10
+ "contains_pretrained_assets": false,
11
+ "contains_datasets": false
12
+ }
duda-pretrained.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:872e059b1b7bdba0e3c71f5c0472fc6c2d9ceb76a763673a953b74177fca6721
3
+ size 202771961
duda-pretrained.tar.gz.sha256 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02265dcccffa889f8e75f3b77c8c283805bed56e1bfb46aabdfccf8385121bbe
3
+ size 89
release.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "source_commit": "6cc4c68bae235630642da227683456d3b097100f",
3
+ "model_repo": "ses7720/DUDA",
4
+ "dataset_repo": "ses7720/DUDA-WRES",
5
+ "supervised_epoch": 500,
6
+ "adapted_epoch": 10,
7
+ "adapted_global_step": 14470,
8
+ "docker_base": "pytorch/pytorch@sha256:a55ff10111eb11f998884327d37361592e632899edd24fce99886b69289e33e6",
9
+ "python": "3.11",
10
+ "torch": "2.4.0",
11
+ "transformers": "4.56.0",
12
+ "peft": "0.12.0",
13
+ "cuda": "12.1",
14
+ "docker_image": {
15
+ "path": "docker/duda-neurips2026.tar.zst",
16
+ "tag": "duda:neurips2026",
17
+ "image_id": "sha256:aa6925e15d8491e323ae3466414b5c7b34c747b48a1fc2b5967ed40d785bca3c",
18
+ "uncompressed_image_bytes": 17418005718,
19
+ "archive_bytes": 7001249855,
20
+ "archive_sha256": "f2520dcaefa212eec292aeea8594c9ed59d2fa141d988afa442e48da62ad91ee",
21
+ "platform": "linux/amd64",
22
+ "pillow": "11.3.0",
23
+ "contains_project_code": true,
24
+ "contains_pretrained_assets": false,
25
+ "contains_datasets": false
26
+ },
27
+ "pillow": "11.3.0"
28
+ }