- Notifications
You must be signed in to change notification settings - Fork12
n0obcoder/UNet-based-Denoising-Autoencoder-In-PyTorch
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Cleaning printed text using Denoising Autoencoder based on UNet architecture in PyTorch
The UNet architecture used here is borrowed fromhttps://github.com/jvanvugt/pytorch-unet.The only modification made in the UNet architecture mentioned in the above link is the addition of dropout layers.
- torch >= 0.4
- torchvision >= 0.2.2
- opencv-python
- numpy >= 1.7.3
- matplotlib
- tqdm
Set the number of total synthetic images to be generatednum_synthetic_imgs and set the percentage of training datatrain_percentage inconfig.pyThen run
python generate_synthetic_dataset.pyIt will generate the synthetic data in a directory nameddata (can be changed in the config.py) in the root dirctory.
Set the desired values oflr,epochs andbatch_size inconfig.py
Inconfig.py,
- setresume to False
python train.pyInconfig.py,
- setresume to True and
- setckpt to the path of the model to be loaded, i.e. ckpt = 'model02.pth'
python train.pyThe model was trained for 12 epochs for the configuration mentioned inconfig.py
Inconfig.py,
- setckpt to the path of the model to be loaded, i.e. ckpt = 'model02.pth'
- settest_dir to the path that contains the noisy images that you need to denoise ('data/val/noisy' by default)
- settest_bs to the desired batch size for the test set (1 by default)
python test.pyOnce the testing is done, the results will be saved in a directory namedresults
About
Cleaning printed text using Denoising Autoencoder based on UNet architecture in PyTorch
Resources
Uh oh!
There was an error while loading.Please reload this page.




