docshadow / README.md
Mtothexmax's picture
Mirror DocShadow SD7K ONNX (MIT) with license and model card
402234c verified
|
Raw History Blame Contribute Delete
2.49 kB
---
license: mit
library_name: onnx
pipeline_tag: image-to-image
tags:
- onnx
- document
- shadow-removal
- onnxruntime-web
---
# DocShadow (SD7K) — ONNX mirror
This is an **unmodified mirror** of the ONNX export `docshadow_sd7k.onnx` of
**DocShadow**, a high-resolution document shadow removal network. It is hosted
here so that browsers can load it directly (Hugging Face serves files with
CORS headers; GitHub release downloads do not).
I did not create or train this model. All credit goes to the original authors.
## Sources
- **Original model, weights and paper code:** [CXH-Research/DocShadow-SD7K](https://github.com/CXH-Research/DocShadow-SD7K) (MIT)
- **ONNX export (this exact file):** [fabio-sim/DocShadow-ONNX-TensorRT](https://github.com/fabio-sim/DocShadow-ONNX-TensorRT), release [v1.0.0](https://github.com/fabio-sim/DocShadow-ONNX-TensorRT/releases/tag/v1.0.0) (MIT)
- **Paper:** Li, Chen, Pun, Cun — *High-Resolution Document Shadow Removal via A Large-Scale Real-World Dataset and A Frequency-Aware Shadow Erasing Net*, ICCV 2023. [arXiv:2308.14221](https://arxiv.org/abs/2308.14221)
## File
| File | Size | SHA-256 |
|---|---|---|
| `onnx/docshadow_sd7k.onnx` | 120,041,674 bytes | `8c09b9320a0fb3c53806cdf9cb8410b3706c77caed81f4ec1cb0bf2cbd14b049` |
Weights trained on the SD7K dataset. Opset 12, float32.
## Usage
- **Input** `image`: float32 `[1, 3, H, W]`, RGB, values `0..1` (no mean/std normalisation).
- **Output** `result`: float32 `[1, 3, H, W]`, RGB, values `0..1` — the shadow-free image.
Runs in the browser with `onnxruntime-web` (WebGPU and WASM). Tested at
512 × 512 and 1024 × 1024; 1024 removes soft shadows noticeably better.
Used by [paint.svelte](https://github.com/Mtothexmax/paint.svelte) for the
"Remove Document Shadows" tool.
## License
MIT — see [LICENSE](./LICENSE), which carries the copyright notices of both
upstream projects. The SD7K dataset used for training is described in the
paper; its own terms are not stated in the upstream repository.
## Citation
```bibtex
@InProceedings{Li_2023_ICCV,
author = {Li, Zinuo and Chen, Xuhang and Pun, Chi-Man and Cun, Xiaodong},
title = {High-Resolution Document Shadow Removal via A Large-Scale Real-World Dataset and A Frequency-Aware Shadow Erasing Net},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2023},
pages = {12449-12458}
}
```