Giter VIP home page Giter VIP logo

dbpn-caffe's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dbpn-caffe's Issues

running code

Could anyone give me some guidance on how to run the code in caffe environment?

I have tried several times. But it did not give me any results.

Thanks a lot!

Help with pycaffe

Hi, thanks for sharing the code.

I am trying to test your pre trained model in pycaffe however I must be doing something wrong because the results is not as expected. Here is the code and the result.

scale = 4.0
test_img_path = "butterfly_GT.bmp"
net = caffe.Net("model/DBPN_mat_4x.prototxt", "model/DBPN_4x.caffemodel", caffe.TEST)

img = cv2.imread(test_img_path, cv2.IMREAD_COLOR)
img = modcrop(img, scale)
lr_img = cv2.resize(img, None, fx=1/scale, fy=1/scale, interpolation=cv2.INTER_CUBIC) / 255.0
lr_img = lr_img[np.newaxis, :, :, :]
b, w, h, c = lr_img.shape
lr_img = np.reshape(lr_img, [b, c, w, h])

net.blobs['data'].reshape(*lr_img.shape)
net.blobs['data'].data[...] = lr_img
out = net.forward()
pred_img = np.asarray(out['conv_final'])
pred_img = pred_img.squeeze()
pred_img = np.reshape(pred_img, [img.shape[0], img.shape[1], img.shape[2]])

result

how to run the code

I have installed matcaffe. And I have downloaded pretrained models.
But after I run DBPN_main_rgb.m at the root of DBPN-caffe which I have directly downloaded from GitHub. I only get the following results:
Bi cubic: NaN , NaN , NaN , NaN
dbpn: NaN , NaN , NaN , NaN
What's the matter with what l did? And could you tell me how I can get the correct results?
Thanks!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.