from image_handling_with_xy import real_world_values import glob import pickle import os import scipy.io def normalise_x(x): return np.abs(x - 320.0) / 320.0 def normalise_y(y): return y / 480.0 [image_set, depths] = load_dataset('/home/nico/data/nyu_depth_v2_labeled.mat') splits_path = '/home/nico/data/splits.mat' splits = scipy.io.loadmat(splits_path) train_inds = splits['trainNdxs'] train_slices = np.array_split(train_inds - 1, 10) pretrained = "/home/nico/DepthPrediction/xy_extension/models/snapshot_cord_redo/_iter_33000.caffemodel" net = "/home/nico/DepthPrediction/xy_extension/models/cord_extension_deploy.prototxt" CNN = caffe.Net(net, pretrained, caffe.TEST) no_superpixels = 400 for s in train_slices: images = tuple(s) for img_ind in images: print "processing image: " + str(img_ind[0])
from pylab import * from image_handling_with_xy import load_dataset from image_handling_with_xy import preprocess_image from image_handling_with_xy import apply_depths from image_handling_with_xy import real_world_values import glob import pickle import os import scipy.io def normalise_x(x): return np.abs(x-320.0)/320.0 def normalise_y(y): return y/480.0 [image_set, depths] = load_dataset('/home/nico/data/nyu_depth_v2_labeled.mat') splits_path = '/home/nico/data/splits.mat' splits = scipy.io.loadmat(splits_path) test_inds = splits['testNdxs'] test_slices = np.array_split(test_inds - 1, 10) pretrained = "/home/nico/DepthPrediction/xy_extension/models/snapshot_cord_redo/_iter_33000.caffemodel" net = "/home/nico/DepthPrediction/xy_extension/models/cord_extension_deploy.prototxt" CNN = caffe.Net(net, pretrained, caffe.TEST) no_superpixels = 400 for s in test_slices: images = tuple(s) for img_ind in images: print "processing image: "+str(img_ind[0])