-
Notifications
You must be signed in to change notification settings - Fork 1
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
Am I using the inference.py the right way? #2
Comments
The pretrained model we offer is tailored to the HyperCUT model only. If you intend to employ a different backbone combination, you'll need to retrain the model using your own dataset. It's worth highlighting that the previous method, as explained in the paper, didn't produce satisfactory outcomes, even when concentrating solely on reconstructing data rather than resolving order-ambiguity. To tackle these issues, we've put forward a solution aimed at overcoming these limitations. Furthermore, if you have any queries regarding the environment or the code, feel free to ask right here. However, if your concerns pertain to quality or other statistical issues, please reach out to me via email. |
Firstly, I really appreciate how fast Phạm Băng Đăn has replied, also re-write the readme.md and updated an inference code.
When I first run the inference command ( maybe this just applies the blur2vid model, e.g., Jin et al., Purohit et al. models and not the whole blur2vid + HyperCUT):
I ran into this error:
ModuleNotFoundError: No module named 'models.backbones.jin_et_al'
So I download the Jin et al. repo: https://github.com/MeiguangJin/Learning-to-Extract-a-Video-Sequence-from-a-Single-Motion-Blurred-Image/tree/master , place it in models/backbones/jin_et_al.
Also, I downloaded the pre-trained Jin et al models: https://www.dropbox.com/sh/r0n9x6uz1ke8iuy/AADJBQBf9E2UMzG4Gt2Az-Qza?dl=0 , put the folder 'models' inside models/backbones/jin_et_al, like this:
Then I changed the jin_backbone.py a little bit like this:
After that I test an image and get a 'not good' result, I would say:
Test image:
Results:
This is the the command I used:
python inference.py --backbone Jin --target_frames 1 2 3 4 5 6 7 --pretrained_path models/backbones/jin_et_al/models/center_v3.pth --blur_path custom_dataset/image_4_blurry.png
This is another try, this time I used this image:
and this command (with Hand.pth not center_v3.pth):
python inference.py --backbone Jin --target_frames 1 2 3 4 5 6 7 --pretrained_path pretrained_models/Hand.pth --blur_path 0054.png
I ran into an error that said:
RuntimeError: shape '[1, 1, 112, 4, 112, 4]' is invalid for input of size 202500
So I resized the image from the size of 448x448 to the size of 460x460 since I figured out that somehow the size of image must be divisible by 5 and 4, but still, the bad result:
The text was updated successfully, but these errors were encountered: