ssaad5678 commited on
Commit
f2a9693
1 Parent(s): 5e2cd79

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -68
README.md CHANGED
@@ -1,68 +1,10 @@
1
- # DE-GAN: A Conditional Generative Adversarial Network for Document Enhancement
2
- ## Description
3
- This is an implementation for the paper [DE-GAN: A Conditional Generative Adversarial Network for Document Enhancement](https://ieeexplore.ieee.org/document/9187695)<br>
4
- DE-GAN is a conditional generative adversarial network designed to enhance the document quality before the recognition process. It could be used for document cleaning, binarization, deblurring and watermark removal. The weights are available to test the enhancement.
5
- ## License
6
- This work is only allowed for academic research use. For commercial use, please contact the author.
7
- ## Download
8
-
9
- - Clone this repo:
10
- ```bash
11
- git clone https://github.com/dali92002/DE-GAN
12
- cd DE-GAN
13
- ```
14
- - Then, download the trained weghts to directly use the model for document enhancement, it is important to save these weights in the subfolder named weights, in the DE-GAN folder. The link to download the weights is : https://drive.google.com/file/d/1J_t-TzR2rxp94SzfPoeuJniSFLfY3HM-/view?usp=sharing
15
- ## Requirements
16
- - install the requirements.txt
17
- ## Using DE-GAN
18
- ### Document binarization
19
- - To binarize an image use the followng command:
20
- ```bash
21
- python enhance.py binarize ./image_to_binarize ./directory_to_binarized_image
22
- ```
23
- image:<br /><br />
24
- ![alt text](https://github.com/dali92002/DE-GAN/blob/master/images/2.bmp?raw=true)<br /><br />
25
- binarized image:<br /><br />
26
- ![alt text](https://github.com/dali92002/DE-GAN/blob/master/images/2cleaned.bmp?raw=true)<br /><br />
27
- ### Document deblurring
28
- - To deblur an image use the followng command:
29
- ```bash
30
- python enhance.py deblur ./image_to_deblur ./directory_to_deblurred_image
31
- ```
32
-
33
- blurred image:<br /><br />
34
- ![alt text](https://github.com/dali92002/DE-GAN/blob/master/images/4014.png?raw=true)<br /><br />
35
- enhanced image:<br /><br />
36
- ![alt text](https://github.com/dali92002/DE-GAN/blob/master/images/4014cleaned.png?raw=true)<br /><br />
37
- ### Watermark removal
38
- - To remove a watermark from an image use the followng command:
39
- ```bash
40
- python enhance.py unwatermark ./image_to_unwatermark ./directory_to_unwatermarked_image
41
- ```
42
- watermarked image:<br /><br />
43
- ![alt text](https://github.com/dali92002/DE-GAN/blob/master/images/960.png?raw=true)<br /><br />
44
- clean image:<br /><br />
45
- ![alt text](https://github.com/dali92002/DE-GAN/blob/master/images/960cleaned.png?raw=true)<br /><br />
46
- ### Document cleaning
47
- - Will be added:
48
- degraded image:<br /><br />
49
- ![alt text](https://github.com/dali92002/DE-GAN/blob/master/images/1.png?raw=true)<br /><br />
50
- cleaned image:<br /><br />
51
- ![alt text](https://github.com/dali92002/DE-GAN/blob/master/images/1cleaned.png?raw=true)<br /><br />
52
- ## Training with your own data
53
- - To train with your own data, place your degraded images in the folder "images/A/" and the corresponding ground-truth in the folder "images/B/". It is necessary that each degraded image and its corresponding gt are having the same name (could have different extentions), also, the number images should be the same in both folders.
54
- - Command to train:
55
- ```bash
56
- python train.py
57
- ```
58
- - Specifying the batch size and the number of epochs could be done inside the code.
59
- ## Citation
60
- - If this work was useful for you, please cite it as:
61
- ```
62
- @ARTICLE{Souibgui2020,
63
- author={Mohamed Ali Souibgui and Yousri Kessentini},
64
- journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
65
- title={DE-GAN: A Conditional Generative Adversarial Network for Document Enhancement},
66
- year={2020},
67
- doi={10.1109/TPAMI.2020.3022406}}
68
- ```
 
1
+ ---
2
+ title: Image Processing with Gradio
3
+ emoji: 🖼️
4
+ colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: gradio
7
+ sdk_version: 2.0.0
8
+ app_file: app.py
9
+ pinned: false
10
+ ---