atriumlts / subpixel

subpixel: A subpixel convnet for super resolution with Tensorflow
MIT License
2.13k stars 301 forks source link

Do you have any suggestion on implementing this in caffe #25

Open gaopeng-eugene opened 7 years ago

xiaoshidai commented 7 years ago

Have you implemented this model on caffe?

timothybrooks commented 7 years ago

I too am interested in using an implementation of this in Caffe. Are either of you working on one or aware of any useful/related resources?

IMG-PRCSNG commented 7 years ago

You can write this as a python layer in caffe using numpy. Check out Caffe's python layer support. Numpy and TF are almost interchangeable in terms of the functions used in the operator. Sadly, the backward pass must also be implemented but it is fairly easy. You just have to do the operations in reverse. I am starting to write it, will post a link if I finish it.

timothybrooks commented 7 years ago

I found a pytorch implementation here: https://github.com/pytorch/examples/tree/master/super_resolution As well as pytorch -> caffe conversion here: https://zhanghang1989.github.io/Torch2CaffeConverter/ You may just be able to convert it, although I have not yet tried it out myself. I'll let you know if make progress as well--thanks for the help!

IMG-PRCSNG commented 7 years ago

@timothybrooks This is my attempt at porting. I have tested the layer in a standalone fashion and have attached a script as well so that you can also test with various inputs. If you are interested do check and let me know if there are any mistakes.

timothybrooks commented 7 years ago

Thanks! I will definitely try it out.

suke27 commented 6 years ago

is it based on ESPCN?