October 2018
Intermediate to advanced
472 pages
10h 57m
English
This is what we have been waiting for...
Making test predictions!
We will define a function that takes the model as input and tests the model on the test data we have preprocessed and saved in the test folder. Along with predictions, it will also save test images with the true and predicted joints plotted on it by using the plot_limb() and the plot_joints() functions we defined in the preceding section:
def test(model, nrows=200, batch_size=128): # load the train data test = pd.read_csv('FLIC-full/test/test_joints.csv', header = None, nrows=nrows) test_img_ids = test.iloc[:,0].values # load validation images test_images = np.array([cv.imread('FLIC-full/test/{}'.format(x)) for x in test_img_ids]) # convert validation images to ...Read now
Unlock full access