alex04072000 / ObstructionRemoval

[CVPR 2020] Learning to See Through Obstructions
1k stars 187 forks source link

Guidance on how to run the model without online optimization ? #15

Closed Raja-Salman-Tariq closed 3 years ago

Raja-Salman-Tariq commented 3 years ago

Hello, hope you're well !

I'm a college student and am relatively new to deep learning, so to quite an extent my issue may seem naive and simple. I'm trying to run your model but have been unssuccessful despite attempting to follow the instructions in your READ.md. Currently I've shifted to your Colab Notebook [https://colab.research.google.com/drive/1kCG5SJd3usgzi6Bx979KiaO_YTanNVVz?usp=sharing] (titled SOLD) to run the model. At the moment I'd like to know how I can run it without online optimization i.e. by just using your pretrained weights.

Extremely humbled by your help !

Raja-Salman-Tariq commented 3 years ago

Apologies, I realized that all I had to do was comment the second last line from run_reflections.py. My goal still has been to somehow have the model produce results quickly for an android application. So far I've thought to condense it via TF Lite and then use it. If anyone would have any suggestions or would share the process, that'd be much help too !

[EDIT: the file where I removed the second last line was run_reflection, not test_reflection (see reply below).]

Sicily-F commented 3 years ago

Hi Raja, I'm having a similar issue - I didn't quite understand what you meant by comment the second line, did you mean that you removed it? I am a lot of difficulty using this locally as well, so will try in Colabs from now on:

I tried with this file as well https://colab.research.google.com/drive/1kCG5SJd3usgzi6Bx979KiaO_YTanNVVz?usp=sharing#scrollTo=efnhsP_3fwZb

Raja-Salman-Tariq commented 3 years ago

Hi Raja, I'm having a similar issue - I didn't quite understand what you meant by comment the second line, did you mean that you removed it? I am a lot of difficulty using this locally as well, so will try in Colabs from now on:

I tried with this file as well https://colab.research.google.com/drive/1kCG5SJd3usgzi6Bx979KiaO_YTanNVVz?usp=sharing#scrollTo=efnhsP_3fwZb

Hi Sicily ! Hope you're well and safe !

Yes, I removed the second last line from _"runreflection.py" (editing my original comment where I mistakenly wrote test_reflection.py). Apparently, this line is responsible for the online training and updating of parameters. The next line (last line) performs a single forwards pass through the model and was the only one which I needed.

Simply commenting out line 10 as seen in the picture below worked for me. image

Also, the SOLD notebook seemed to work fine for me. It obviously took time but it did produce the output from the sample images...

Sicily-F commented 3 years ago

Hi Raja,

Is the above code from a screenshot of your command line or from a Python script? I'd much rather run it locally. Have you tried running this on other images? Thank for your help!

Raja-Salman-Tariq commented 3 years ago

Hi ! The screenshot is from the python file "run_reflection.py" present in the project which the README indicated to use (ObstructionRemoval-master/run_reflection.py).

No I did not check it with my own sequence as I got busy, but I do intend to do that soon. As for running locally, I have a Radeon graphics card but recently shifted to ubuntu. Unsure how to use the gpu for processing at the moment. Whenever I ran it locally it seemed to crash due to memory issues. But it did produce the correct output on SOLD.

Sicily-F commented 3 years ago

Hi Raja,

Great, I will try this out - please comment here if you have any success on your own images, I'd love to here

Raja-Salman-Tariq commented 3 years ago

Hey Sicily-F, I hope you're well.

Did you manage to run the programme with your own sequence, ship it to TF-Lite, or achieved any further progress in any way towards utilizing it ? I'm eager to hear from you on this and would like to know what you're working on, we might be able to collaborate.

Sicily-F commented 3 years ago

Hi Raja, no unfortunately I did not manage to run the programme with my own sequence, I ended up not using it for my research

Raja-Salman-Tariq commented 3 years ago

Oh I see. Good luck with your work then !