pytorch-deepglr
                                
                                 pytorch-deepglr copied to clipboard
                                
                                    pytorch-deepglr copied to clipboard
                            
                            
                            
                        A pytorch implementation of Deep Graph Laplacian Regularization for image denoising
pytorch-deepglr
A pytorch implementation of Deep Graph Laplacian Regularization for image denoising. Original work: Zeng et al.
  
Table of Contents
- Installation
- Basic usage
- Evaluate a trained model
- Evaluate DeepGLR
- Evaluate GLR
 
- Train a model
- Train a DeepGLR
- Train a GLR
 
 
- Evaluate a trained model
Installation
- 
Clone this repository git clone https://github.com/huyvd7/pytorch-deepglr
- 
Install required packages listed in requirements.txt (with Python 3.7) 
Basic usage
We provide implementations for both DeepGLR and GLR since DeepGLR is a stacking version of GLRs. GLR is a smaller network and can be test more quickly, but it has poorer performance than DeepGLR.
Evaluate a trained model
Evaluate DeepGLR
python validate_DGLR.py dataset/sample/ -m model/YOUR_MODEL -w
Evaluate GLR
python validate_GLR.py dataset/sample/ -m model/YOUR_MODEL -w 
The above commands resize the input images located at dataset/sample/ to square images with size width x width, then performs evaluation for the given trained model model/YOUR_MODEL and saves outputs to current directory.
Train a model
Train a DeepGLR
python train_DGLR.py dataset/sample/ -n MODEL_NAME -d ./ -w width -e epoch -b batch_size -l learning_rate
The above command will train a new DeepGLR. If you want to continue training an existing DeepGLR instead of training from scratch, you can add -m PATH_TO_EXISTED_MODEL:
python train_DGLR.py dataset/train/ -m model/deepglr.pretrained -n MODEL_NAME -d ./ -w width -e epoch -b batch_size -l learning_rate
Train a GLR
python train_GLR.py dataset/train/ -n MODEL_NAME -d ./ -w width -e epoch -b batch_size -l learning_rate
Same parameters as DeepGLR.
Remove noise of a single image using a trained DeepGLR (LEGACY, MIGHT NOT WORKING)
python denoise.py dataset/test/noisy/2_n.bmp -m model/deepglr.pretrained -w 324 -o OUTPUT_IMAGE.PNG
The above command will resize the dataset/test/noisy/2_n.bmp to 324x324, then denoise it using a trained DeepGLR model/deepglr.pretrained and save the result at OUTPUT_IMAGE.PNG.