Closed 10dimensions closed 3 years ago
from infer import InferenceHelper infer_helper = InferenceHelper(dataset='nyu') infer_helper.predict_dir("test_imgs/", "test_imgs/")
from infer import InferenceHelper
infer_helper = InferenceHelper(dataset='nyu')
infer_helper.predict_dir("test_imgs/", "test_imgs/")
Basically, I tried to work out the sample inference script to predict images in batch.
But while converting the predicted tensor to PIL Image, this occurs. TypeError: Cannot handle this data type: (1, 1, 480, 640), <u2
TypeError: Cannot handle this data type: (1, 1, 480, 640), <u2
This is due to a typo in infer.py. Please look at #3 for the resolution
from infer import InferenceHelper
infer_helper = InferenceHelper(dataset='nyu')
infer_helper.predict_dir("test_imgs/", "test_imgs/")
Basically, I tried to work out the sample inference script to predict images in batch.
But while converting the predicted tensor to PIL Image, this occurs.
TypeError: Cannot handle this data type: (1, 1, 480, 640), <u2