October 2018
Intermediate to advanced
472 pages
10h 57m
English
Once the training is complete, let's perform the prediction by feeding an input image into the model:
model.load_weights("weights_coco.h5")
input_image_path = "my_test_image.jpg"image = cv2.imread(input_image_path)dummy_array = np.zeros((1,1,1,1,TRUE_BOX_BUFFER,4))plt.figure(figsize=(10,10))
input_image = cv2.resize(image, (416, 416))input_image = input_image / 255.input_image = input_image[:,:,::-1]input_image = np.expand_dims(input_image, 0)
netout = model.predict([input_image, dummy_array])boxes = decode_netout(netout[0], obj_threshold=OBJ_THRESHOLD, nms_threshold=NMS_THRESHOLD, ...
Read now
Unlock full access