Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error #22

Closed
yustiks opened this issue May 17, 2021 · 4 comments
Closed

error #22

yustiks opened this issue May 17, 2021 · 4 comments

Comments

@yustiks
Copy link

yustiks commented May 17, 2021

I try to run the code and I have the following error:

Inference - 2021-05-17 03:42:15
save_image: True
border: False
model_path: model/CDVD_TSP_DVD_Paper.pt
data_path: data/dataset/
result_path: ../infer_results
n_seq: 5
size_must_mode: 4
device: cuda
Creating CDVD-TSP Net
Is meanfilter image when process mask: True
Select mask mode: concat, num_mask=1
Creating Flow PWC
Creating Recons-Video Net
SRN Video Net extra in channels: 1
The input of SRN is image
Loading model from model/CDVD_TSP_DVD_Paper.pt
Traceback (most recent call last):
  File "inference.py", line 243, in <module>
    Infer.infer()
  File "inference.py", line 123, in infer
    self.logger.write_log("# Total AVG-PSNR={:.5}, AVG-SSIM={:.4}".format(sum_psnr / n_img, sum_ssim / n_img))
ZeroDivisionError: float division by zero

What can be the reason?

@csbhr
Copy link
Owner

csbhr commented May 17, 2021

This is because that your dataset does not load correctly.

Please check your dataset path and the organization form of the dataset.

@yustiks
Copy link
Author

yustiks commented May 17, 2021

I create the dataset accordingly, and now I have another issue: only one image is restored, all the other images are not considered by the method.
What could be the reason?

@csbhr
Copy link
Owner

csbhr commented May 17, 2021

The model takes 5 blur frames as inputs and restores 1 deblurred frame. This inference code does not consider the border frames at the beginning and end of the video sequence.

You can copy the border frames to make this code consider border frames.

@csbhr
Copy link
Owner

csbhr commented May 17, 2021

For example:

burry frames [1, 2, 3, 4, 5] -> deblurred frames [3]

copy the border frames:
burry frames [1, 1, 1, 2, 3, 4, 5, 5, 5] -> deblurred frames [1, 2, 3, 4, 5]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants