nagi_sharpen โ checkpoints
Trained checkpoints for nagi_sharpen, a memory-bounded tiled defocus / soft-focus restoration tool built on PyTorch.
The code lives on GitHub; this repository holds only the model weights, which are kept out of the source repo.
Files
| File | Role |
|---|---|
nagi_sharpen_stage4.pt |
Baseline defocus / soft-focus restoration checkpoint from the early experiments. |
nagi_sharpen_stage5_dpdd_guard.pt |
DPDD fine-tune candidate selected by validation-aware training. Best DPDD validation result; not the production default. |
nagi_sharpen_stage9_multiscale384.pt |
Synthetic partial-defocus candidate for more visible subjective correction. Use with the stage9-visual / stage9-strong presets. |
nagi_sharpen_stage11_realistic.pt |
Realistic synthetic-defocus candidate; improves realistic and mixed synthetic validation over stage9. Presets stage11-visual / stage11-strong. |
nagi_sharpen_stage12_realistic384.pt |
Continued from stage11 with 384px realistic synthetic-defocus training. Presets stage12-visual / stage12-strong. |
nagi_sharpen_stage13_largeblur384.pt |
Continued from stage12 with stronger large-radius realistic synthetic defocus. Presets stage13-visual, stage13-strong, stage13-adaptive, stage13-defocus-map and their strong variants. |
nagi_sharpen_stage14_balanced_long.pt |
Best Stage14 balanced candidate by pipeline synthetic/paired validation. Presets stage14 / stage14-balanced. |
nagi_sharpen_stage14_pipeline500.pt |
Stronger Stage14 visual-review candidate: higher synthetic defocus gain, slightly negative paired validation. Presets stage14-pipeline500 / stage14-strong-preview. |
nagi_sharpen_stage15_guarded_refine.pt |
Recommended. Low-LR refinement from stage14_balanced_long; best pipeline-scored natural defocus result. Presets stage15 (general natural cleanup) and stage15-petal-natural (subtle flower-edge cleanup). |
MANIFEST.json |
Machine-readable index of the checkpoints above, as used by the source repo. |
Generative presets (stage15-petal-generate, stage16โstage18) are experimental and are not defaults.
Usage
Download the checkpoints into the source tree, then run the CLI:
from huggingface_hub import snapshot_download
snapshot_download(
"uniuyuni/nagi_sharpen",
allow_patterns=["*.pt", "MANIFEST.json"],
local_dir="nagi_sharpen/checkpoints",
)
python -m nagi_sharpen deblur input.jpg output.jpg --preset stage15
See the GitHub repository's docs/NATURAL_PRESETS.md for the current recommended presets and docs/EXPERIMENTS.md for the training history behind each stage.
License
Released under the Apache License 2.0, same as the source repository. Commercial use of these weights is permitted.
Acknowledgements
These checkpoints were trained on the DPDD dataset (Abuolaim & Brown, Defocus Deblurring Using Dual-Pixel Data, ECCV 2020), released under the MIT License, and on synthetic defocus generated from its sharp targets. Please cite the DPDD paper if you use this work in research:
@inproceedings{abuolaim2020defocus,
title = {Defocus Deblurring Using Dual-Pixel Data},
author = {Abuolaim, Abdullah and Brown, Michael S.},
booktitle = {European Conference on Computer Vision (ECCV)},
year = {2020}
}