{"action":"opened","issue":{"url":"https://api.github.com/repos/alterzero/DBPN-caffe/issues/1","repository_url":"https://api.github.com/repos/alterzero/DBPN-caffe","labels_url":"https://api.github.com/repos/alterzero/DBPN-caffe/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/alterzero/DBPN-caffe/issues/1/comments","events_url":"https://api.github.com/repos/alterzero/DBPN-caffe/issues/1/events","html_url":"https://github.com/alterzero/DBPN-caffe/issues/1","id":333822004,"node_id":"MDU6SXNzdWUzMzM4MjIwMDQ=","number":1,"title":"Help with pycaffe","user":{"login":"cmcuza","id":38991005,"node_id":"MDQ6VXNlcjM4OTkxMDA1","avatar_url":"https://avatars2.githubusercontent.com/u/38991005?v=4","gravatar_id":"","url":"https://api.github.com/users/cmcuza","html_url":"https://github.com/cmcuza","followers_url":"https://api.github.com/users/cmcuza/followers","following_url":"https://api.github.com/users/cmcuza/following{/other_user}","gists_url":"https://api.github.com/users/cmcuza/gists{/gist_id}","starred_url":"https://api.github.com/users/cmcuza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmcuza/subscriptions","organizations_url":"https://api.github.com/users/cmcuza/orgs","repos_url":"https://api.github.com/users/cmcuza/repos","events_url":"https://api.github.com/users/cmcuza/events{/privacy}","received_events_url":"https://api.github.com/users/cmcuza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-19T20:14:29Z","updated_at":"2018-06-19T20:14:29Z","closed_at":null,"author_association":"NONE","body":"Hi, thanks for sharing the code.\r\n\r\nI 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.\r\n\r\nscale = 4.0\r\ntest_img_path = \"butterfly_GT.bmp\"\r\nnet = caffe.Net(\"model/DBPN_mat_4x.prototxt\", \"model/DBPN_4x.caffemodel\", caffe.TEST)\r\n\r\nimg = cv2.imread(test_img_path, cv2.IMREAD_COLOR)\r\nimg = modcrop(img, scale)\r\nlr_img = cv2.resize(img, None, fx=1/scale, fy=1/scale, interpolation=cv2.INTER_CUBIC) / 255.0\r\nlr_img = lr_img[np.newaxis, :, :, :]\r\nb, w, h, c = lr_img.shape\r\nlr_img = np.reshape(lr_img, [b, c, w, h])\r\n\r\nnet.blobs['data'].reshape(*lr_img.shape)\r\nnet.blobs['data'].data[...] = lr_img\r\nout = net.forward()\r\npred_img = np.asarray(out['conv_final'])\r\npred_img = pred_img.squeeze()\r\npred_img = np.reshape(pred_img, [img.shape[0], img.shape[1], img.shape[2]])\r\n\r\n\r\n![result](https://user-images.githubusercontent.com/38991005/41621503-d74b96fe-73da-11e8-97cc-b9cb5cf21255.jpg)\r\n\r\n\r\n"}}
{"actor":{"display_login":"cmcuza"}}