ljzycmd / SimDeblur

Simple framework for image and video deblurring, implemented by PyTorch
MIT License
306 stars 38 forks source link

Colab Questions #7

Open noobtoob4lyfe opened 2 years ago

noobtoob4lyfe commented 2 years ago

Thank you so much for sharing the this! Forgive me, because I'm not super technical but I was hoping you could walk me through how to use the Colab notebook to test my own image sequence. When I "run all" in Colab it shows a single output comparison jpeg. Does it save the entire deblurred image sequence anywhere? All I can see are the input images when I search the folder structure. How would I deblur and entire image sequence and save the resulting images? Thanks in advance!

ljzycmd commented 2 years ago

If you want to output all frames, you should add a FOR-LOOP in Sec.4 of the Colab Notebook. Just like the following:

for i, batch_data in enumerate(frames_data): 
    out = model(batch_data["input_frames"].unsqueeze(0).cuda())
    out = out.clamp(0, 1)
    # save the output
    ...

You also need to implement saving the output frames.

noobtoob4lyfe commented 2 years ago

Awesome! Thanks so much for your help. So is that what the full text of Sec.4 should look like, or would that snippet be pasted in after a certain line in the existing text. How would one implement the "saving the output frames" aspect of this? Also what would I change if I want to try the ESTRNN model instead of the DBN model? Thanks again!

robbsaber commented 2 years ago

I would also like to know how to save the output frames.

ljzycmd commented 2 years ago

Yep, I will update the notebook with saving the output frames soon!