xinntao / EDVR

Winning Solution in NTIRE19 Challenges on Video Restoration and Enhancement (CVPR19 Workshops) - Video Restoration with Enhanced Deformable Convolutional Networks. EDVR has been merged into BasicSR and this repo is a mirror of BasicSR.
https://github.com/xinntao/BasicSR
1.48k stars 320 forks source link

How do I use EDVR on my own images? #162

Open pwnsweet opened 3 years ago

pwnsweet commented 3 years ago

Because EDVR is not officially supported in Windows, I have spent the past 2 weeks installing, configuring and having to learn how to use Ubuntu. With zero prior Linux experience, I have struggled though installing CUDA (a simple process in Windows, a NIGHTMARE in Ubuntu) and DCN v2 and having to figure out how to deconstruct a video to a numbered series of png files. All of these things have not been easy. In fact, Linux is probably the most unintuitive piece of **** I have ever had the displeasure of using, but that's a different topic for a different time. And now, because of a total lack of documentation, I am struggling to do the simplest of things - using EDVR to upscale my png files. I've spent hours combing through python code, modifying paths to datasets etc but to no avail. Why does all the documentation for this software assume you have a PhD in computer science?

Can someone PLEASE give me a step-by-step guide on how to do this? I don't want to do anything fancy. I don't need to train my own model. I simply want to use a pre-existing model (EDVR_Video90K_SR_L.pth) with EDVR to upscale 30,000 pngs to a folder of my choosing. That's it. I have the model in /EDVR-master/experiments/pretrained_models. I don't need PSNR metrics to compare the upscale to the GT. I JUST WANT TO UPSCALE MY CUSTOM IMAGES. That's all.

ghost commented 3 years ago

Because EDVR is not officially supported in Windows, I have spent the past 2 weeks installing, configuring and having to learn how to use Ubuntu. With zero prior Linux experience, I have struggled though installing CUDA (a simple process in Windows, a NIGHTMARE in Ubuntu) and DCN v2 and having to figure out how to deconstruct a video to a numbered series of png files. All of these things have not been easy. In fact, Linux is probably the most unintuitive piece of **** I have ever had the displeasure of using, but that's a different topic for a different time. And now, because of a total lack of documentation, I am struggling to do the simplest of things - using EDVR to upscale my png files. I've spent hours combing through python code, modifying paths to datasets etc but to no avail. Why does all the documentation for this software assume you have a PhD in computer science?

Can someone PLEASE give me a step-by-step guide on how to do this? I don't want to do anything fancy. I don't need to train my own model. I simply want to use a pre-existing model (EDVR_Video90K_SR_L.pth) with EDVR to upscale 30,000 pngs to a folder of my choosing. That's it. I have the model in /EDVR-master/experiments/pretrained_models. I don't need PSNR metrics to compare the upscale to the GT. I JUST WANT TO UPSCALE MY CUSTOM IMAGES. That's all.

Hi, did you figure this out? And I've been there with the migration from Windows to Linux, sucks!

pwnsweet commented 3 years ago

No I didn't

Hi, did you figure this out? And I've been there with the migration from Windows to Linux, sucks!

iBobbyTS commented 3 years ago

The usage of ESRGAN by xinntao is quite complicated, he didn't provide a file that I can simply specify the input output and model and run it. Users need to write a torch script in order to use his super-resolution kernel, about 30 lines. I'm trying to figure this out. Keep this issue open.

ghost commented 3 years ago

The usage of ESRGAN by xinntao is quite complicated, he didn't provide a file that I can simply specify the input output and model and run it. Users need to write a torch script in order to use his super-resolution kernel, about 30 lines. I'm trying to figure this out. Keep this issue open.

Thanks @iBobbyTS His usage of EDVR (for video super-resolution) itself is nearly impossible to follow. Would be grateful for any guidance with this, especially when one is using their own custom datasets (not REDS/Vimeo). Thank you.

iBobbyTS commented 3 years ago

I just found these two repos that includes EDVR usage. DeOldify And EDVR (Includes EDVR for super-resolution and DeOldify for colourise) by btahir VideoEnhancer (Includes EDVR for super-resolution and DAIN for frame interpolation) by buildist Check this and see if you can make the single use of EDVR possible. I'm also working on it, just sharing the repo I found. I'll also give out the solution when I figure it out. Ps. You better take a look at DAIN and DeOldify first, I used these before so it's not so hard to extract EDVR from the code in these two repos.

By the way, I don't have an Nvidia GPU. So I'm doing all the work in Colab, It provides free GPUs. You really should go check it out if you don't know it yet.

ghost commented 3 years ago

I just found these two repos that includes EDVR usage. DeOldify And EDVR (Includes EDVR for super-resolution and DeOldify for colourise) by btahir VideoEnhancer (Includes EDVR for super-resolution and DAIN for frame interpolation) by buildist Check this and see if you can make the single use of EDVR possible. I'm also working on it, just sharing the repo I found. I'll also give out the solution when I figure it out. Ps. You better take a look at DAIN and DeOldify first, I used these before so it's not so hard to extract EDVR from the code in these two repos.

By the way, I don't have an Nvidia GPU. So I'm doing all the work in Colab, It provides free GPUs. You really should go check it out if you don't know it yet.

@iBobbyTS Thank you so much buddy, I'll try those two out. Looking forward to your own implementation. I've seen other guys raise the same issue, the code is practically unreadable for a thirdy party trying to run their own EDVR super-resolution using their own data. Thanks again!

iBobbyTS commented 3 years ago

@ChrisMasafu I just made it work. Here's the link on Colab. EDVR on Cloab I'm still editing the code, the original notebook didn't work, I think it's because xinntao did some modification to the files in EDVR, I forked it and the notebook in the link is cloning my repo. I hope you are able to use it, it's a little bit more understandable, but still not easy enough. I'll keep working on it and share my result.

ghost commented 3 years ago

@ChrisMasafu I just made it work. Here's the link on Colab. EDVR on Cloab I'm still editing the code, the original notebook didn't work, I think it's because xinntao did some modification to the files in EDVR, I forked it and the notebook in the link is cloning my repo. I hope you are able to use it, it's a little bit more understandable, but still not easy enough. I'll keep working on it and share my result.

This is perfect @iBobbyTS, been away on holiday but back to crack this EDVR thing now. Let me check the colab scripts you worked on. You're a life saver, thank you ever so much!

jaivanti commented 3 years ago

@iBobbyTS Thanks a lot for the colab implementation, but i have a doubt, like how should print the psnr values of the test images. Like I have spend a week understanding documentation, reframing codes and etc, If possible please do help on this issue.

iBobbyTS commented 3 years ago

@iBobbyTS Thanks a lot for the colab implementation, but i have a doubt, like how should print the psnr values of the test images. Like I have spend a week understanding documentation, reframing codes and etc, If possible please do help on this issue.

I did this implementation just for running it on our own videos with the pre-trained models provided by the author, not for any kind of fine-tune or testing.

shukkkur commented 11 months ago

@iBobbyTS Thanks a lot, but it seems that your EDVR for repository is missing. Can I use the original this original repository with your colab notebook?