# DocShadow-SD7K **Repository Path**: tmycode/DocShadow-SD7K ## Basic Information - **Project Name**: DocShadow-SD7K - **Description**: qqqqqqqqqqqqqq - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-09-06 - **Last Updated**: 2023-09-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 📋 High-Resolution Document Shadow Removal High-Resolution Document Shadow Removal via A Large-Scale Real-World Dataset and A Frequency-Aware Shadow Erasing Net.
# 🔮 Dataset
SD7K is the only large-scale high-resolution dataset that satisfies all important data features about document shadow currently, which covers a large number of document shadow images.
We use over 30 types of occluders along with more than 350 documents to contribute to the dataset. These occluders have the shape of both regular and irregular forms, which provides adequate coverage for various situations. For more information, you can refer to the demo and paper.
# ⚙️ Usage
## Installation
```
git clone https://github.com/CXH-Research/DocShadow-SD7K.git
cd DocShadow-SD7K
pip install -r requirements.txt
```
## Training
You may download the dataset first, and then specify TRAIN_DIR, VAL_DIR and SAVE_DIR in the section TRAINING in `config.yml`.
For single GPU training:
```
python train.py
```
For multiple GPUs training:
```
accelerate config
accelerate launch train.py
```
If you have difficulties with the usage of `accelerate`, please refer to Accelerate.
## Inference
Please first specify TRAIN_DIR, VAL_DIR and SAVE_DIR in section TESTING in `config.yml`.
```
python infer.py
```
If you need pre-trained models on SD7K, please download here.
For the results of all baselines experiments and our results on SD7K, please refer here.
# 💗 Acknowledgements We would like to thank DocShadow-ONNX-TensorRT for the implementation of our work. If you are looking for easier implementation, please refer to them. # 🛎 Citation If you find our work helpful for your research, please cite: ```bib @article{docshadow_sd7k, title={High-Resolution Document Shadow Removal via A Large-Scale Real-World Dataset and A Frequency-Aware Shadow Erasing Net}, author={Li, Zinuo and Chen, Xuhang and Pun, Chi-Man and Cun, Xiaodong}, journal={arXiv preprint arXiv:2308.14221}, year={2023} } ```