Skip to content

Instantly share code, notes, and snippets.

@amiller
Created May 2, 2011 05:21
Show Gist options
  • Save amiller/951197 to your computer and use it in GitHub Desktop.
Save amiller/951197 to your computer and use it in GitHub Desktop.
from kontort import DepthPredict
import cPickle as pickle
import numpy as np
def main():
with open('data/rfc_model.pkl') as f:
model_ser = pickle.load(f)
classifier = DepthPredict(model_ser)
depth0 = np.random.randint(0,2048,(480,640)).astype('u2')
labels0 = classifier.predict(depth0)
print labels0[0].shape
depth1 = np.random.randint(0,2048,(127,92)).astype('u2')
labels1 = classifier.predict(depth1)
print labels1[0].shape
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment