|
Download README.md from ses7720/DUDA: direct link, hf CLI and curl.
- Browser
- Download file 5.53 kB
-
https://huggingface.co/ses7720/DUDA/resolve/main/README.md
- Command line
-
hf download hf://ses7720/DUDA/README.md
-
curl -L -o README.md https://huggingface.co/ses7720/DUDA/resolve/main/README.md
5.53 kB
| library_name: pytorch | |
| pipeline_tag: image-to-image | |
| base_model: facebook/dinov3-vitl16-pretrain-lvd1689m | |
| tags: | |
| - image-restoration | |
| - all-in-one-restoration | |
| - continual-learning | |
| - neurips-2026 | |
| # DUDA pretrained release | |
| Pretrained assets for **Discovering Unseen Degradations to Adapt Semi-Supervised Image Restoration** (NeurIPS 2026). | |
| - Project: https://bo-oseng.github.io/DUDA/ | |
| - Code: https://github.com/bo-oseng/DUDA | |
| - Dataset: https://huggingface.co/datasets/ses7720/DUDA-WRES | |
| ## Files | |
| `duda-pretrained.tar.gz` contains the paper assets (about 193 MiB compressed): | |
| | Asset | Purpose | | |
| |---|---| | |
| | `checkpoints/stage0_latest.pth` | Supervised restoration initialization, epoch 500 | | |
| | `checkpoints/semi_supervised_epoch10.pth` | Adapted student/teacher and descriptor, epoch 10, step 14,470 | | |
| | `cgcd/` | PCA, scaler, class mapping and stage Gaussian parameters | | |
| | `dino_adapter/` | Learned DINOv3 BOFT adapter, permutation buffers, base-layer biases and classification head | | |
| | `features/wres_with_clear/dinov3-vitl16-sl/class_order.txt` | Degradation class ordering | | |
| | `manifest.json` | Per-file SHA-256 checksums | | |
| The Docker image below includes the runtime and implementation, so a GitHub | |
| checkout is optional for Docker users. | |
| DINOv3 base weights are obtained from the official gated model repository separately. | |
| ## Download and run | |
| ```bash | |
| hf download ses7720/DUDA --include "duda-pretrained.tar.gz*" README.md SHA256SUMS release.json --local-dir downloads/duda-models | |
| cd downloads/duda-models | |
| sha256sum -c SHA256SUMS | |
| tar -xzf duda-pretrained.tar.gz | |
| ``` | |
| From a [DUDA source checkout](https://github.com/bo-oseng/DUDA), follow its `README.md` to build the Conda environment or Docker image. Obtain | |
| DINOv3 using the access/download instructions in `README.md`, then link the | |
| extracted release assets: | |
| ```bash | |
| python scripts/link_assets.py \ | |
| --features /path/to/duda-pretrained/features \ | |
| --dino-adapter /path/to/duda-pretrained/dino_adapter \ | |
| --cgcd /path/to/duda-pretrained/cgcd \ | |
| --stage0 /path/to/duda-pretrained/checkpoints/stage0_latest.pth \ | |
| --adapted /path/to/duda-pretrained/checkpoints/semi_supervised_epoch10.pth | |
| CUDA_VISIBLE_DEVICES=0 python restoration/infer.py \ | |
| --input /path/to/image.jpg --output outputs/restored.png | |
| ``` | |
| The default restoration checkpoint uses the adapted teacher. Add `--stage 0` | |
| for supervised initialization. The training patches can be generated from the | |
| original training images with the provided code, or downloaded directly as a | |
| precomputed archive. See the dataset card for both commands. | |
| ## Continual 6+1+2 and 6+1+1+1 streams | |
| 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. | |
| ```bash | |
| hf download ses7720/DUDA --include 'continual/duda-continual-weights.tar.gz' --local-dir downloads/duda-models | |
| cd /path/to/DUDA | |
| tar -xzf /path/to/downloads/duda-models/continual/duda-continual-weights.tar.gz --strip-components=1 | |
| STAGE=2 bash bash/test_6p1p2.sh | |
| STAGE=3 bash bash/test_6p1p1p1.sh | |
| ``` | |
| ## Downloadable Docker image | |
| The optional `docker/duda-neurips2026.tar.zst` file (7.00 GB compressed) contains the tested Docker | |
| image, including the runtime and project code. It is separate from the model | |
| bundle. Model weights, DINOv3 base weights and datasets are obtained separately. | |
| Download and load the image: | |
| ```bash | |
| hf download ses7720/DUDA --include "docker/*" --local-dir downloads/duda-docker | |
| (cd downloads/duda-docker/docker && sha256sum -c SHA256SUMS) | |
| zstd -dc downloads/duda-docker/docker/duda-neurips2026.tar.zst | docker load | |
| ``` | |
| The loaded tag is `duda:neurips2026`. This is an image archive for `docker load`; | |
| it is not a Docker registry endpoint. | |
| To run one image, first extract `duda-pretrained.tar.gz` in your working directory. | |
| Request access to the [official DINOv3 model](https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m), | |
| then download its base weights: | |
| ```bash | |
| hf auth login | |
| hf download facebook/dinov3-vitl16-pretrain-lvd1689m \ | |
| --revision ea8dc2863c51be0a264bab82070e3e8836b02d51 \ | |
| --include config.json model.safetensors preprocessor_config.json LICENSE.md README.md \ | |
| --local-dir dinov3-vitl16 | |
| ``` | |
| Set your input image path and run the container. Change the host GPU selection | |
| as needed; the process inside the container uses the single exposed GPU. | |
| ```bash | |
| export DUDA_INPUT=/absolute/path/to/input.jpg | |
| mkdir -p outputs | |
| docker run --rm --gpus '"device=0"' --shm-size=2g \ | |
| -v "$PWD/dinov3-vitl16:/app/assets/dino_base:ro" \ | |
| -v "$PWD/duda-pretrained/dino_adapter:/app/assets/dino_adapter:ro" \ | |
| -v "$PWD/duda-pretrained/cgcd:/app/assets/cgcd:ro" \ | |
| -v "$PWD/duda-pretrained/features:/app/assets/features:ro" \ | |
| -v "$PWD/duda-pretrained/checkpoints:/app/assets/checkpoints:ro" \ | |
| -v "$DUDA_INPUT:/inputs/input.jpg:ro" \ | |
| -v "$PWD/outputs:/app/outputs" \ | |
| duda:neurips2026 python restoration/infer.py \ | |
| --input /inputs/input.jpg --output outputs/restored.png | |
| ``` | |
| The image pins Pillow 11.3.0, whose libjpeg-turbo JPEG decoding matches the | |
| paper runs. | |
| The image can also run `scripts/prepare_datasets.py` for dataset patch generation | |
| and monitoring-subset preparation; see the dataset card. | |