Open YDDDDG opened 4 years ago
I am not sure for your provided wrong log. It seems that there are some errors at the place calling ''cv2.resize''.
ok...I knew something wrong with "cv2.resize". Leave my bug aside, could you tell me which part of the code should I modify to produce full resolution denosing results like pictures in Gu's paper? Thanks a lot !
Hi, I ran _validationfolder.py with model provided by you(SGN_iter100000_bs8_mu0_sigma30.pth) and my own testing set(DIV2K_valid_HR). I found that the output images are randomly cropped from the full-resolution. I want to store the full-resolution-denoised images,so I reviewed your code and modify this:
to this:
testset = dataset.FullResDenoisingDataset(opt)
(I thought it was the key to get full-res images)
however, something wrong happened:
Traceback (most recent call last): File "validation_folder.py", line 67, in <module> for batch_idx, (noisy_img, img) in enumerate(dataloader): File "E:\Anaconda3\Anaconda\envs\Experiment\lib\site-packages\torch\utils\data\dataloader.py", line 363, in __next__ data = self._next_data() File "E:\Anaconda3\Anaconda\envs\Experiment\lib\site-packages\torch\utils\data\dataloader.py", line 403, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "E:\Anaconda3\Anaconda\envs\Experiment\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "E:\Anaconda3\Anaconda\envs\Experiment\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\paper_experiments\Self-Guided-Network-for-Fast-Image-Denoising\SGN\dataset.py", line 100, in __getitem__ img = cv2.resize(img, (W_out, H_out)) cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-52oirelq\opencv\modules\imgproc\src\resize.cpp:3932: error: (-215:Assertion failed) inv_scale_x > 0 in function 'cv::resize'
by the way, i met similar cv2 error when i ran validation.py
So, Is it wrong to modify code from DenoisingDataset to FullResDenoisingDataset in order to get full-res outputs?
If i am wrong ,what should i do to get full-resolution outputs?
Hope for your reply !