We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there python code for just running a test image?
The text was updated successfully, but these errors were encountered:
For pass through the pred_right layer is producing all zeros. What is the input to the first net?
{'pred_right': array([[[[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.]],
[[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.]], [[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.]]]], dtype=float32)}
import cv2 import sys sys.path.insert(0, "/home/x/crl/crl-release/python/") import caffe import numpy as np from PIL import Image import numpy as np import numpy.matlib
width_test = 1792; height_test = 320;
MODEL_FILE = 'svs_deploy.prototxt' PRETRAINED = 'caffemodel/svs_end2end.caffemodel'
caffe.set_mode_gpu() caffe.set_device(0)
net = caffe.Net(MODEL_FILE, PRETRAINED, caffe.TEST) path_left = str(sys.argv[1])
left_img = cv2.imread(path_left) left_img = cv2.resize(left_img, (net.blobs['data'].data.shape[3],net.blobs['data'].data.shape[2]))
left_img = left_img.astype(np.float32) left_img = left_img.transpose((2, 0, 1)) net.blobs['data'].data[...] = left_img caffe.set_mode_gpu() caffe.set_device(0) disp = net.forward(end='pred_right')
print disp
Sorry, something went wrong.
No branches or pull requests
Is there python code for just running a test image?
The text was updated successfully, but these errors were encountered: