Created
May 2, 2011 05:21
-
-
Save amiller/951197 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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