Hi,
We are trying to implement the Notebook, and we have the error following : "NameError: name 'format_img' is not defined", at the line "X, ratio = format_img(img,c)", of the following code,
`img = cv2.imread('data/cat_dog.jpg')
X, ratio = format_img(img, c)
if K.image_dim_ordering() == 'tf':
X = np.transpose(X, (0, 2, 3, 1))
y1, y2, f = model_rpn.predict(X)
r = keras_frcnn.roi_helpers.rpn_to_roi(y1, y2, c, K.image_dim_ordering(), overlap_thresh=0.7)
roi_count = R.shape[0] // c.num_rois
r2 = np.zeros((roi_count * c.num_rois, r.shape[1]))
r2 = r[:r2.shape[0],:r2.shape[1]]
r2 = np.reshape(r2, (roi_count, c.num_rois, r.shape[1]))
`
Is the function defined somewhere in the project ? We can't retrieve it, and can't solve this issue.
Hi,
We are trying to implement the Notebook, and we have the error following : "NameError: name 'format_img' is not defined", at the line "X, ratio = format_img(img,c)", of the following code,
`img = cv2.imread('data/cat_dog.jpg')
X, ratio = format_img(img, c)
if K.image_dim_ordering() == 'tf':
X = np.transpose(X, (0, 2, 3, 1))
y1, y2, f = model_rpn.predict(X)
r = keras_frcnn.roi_helpers.rpn_to_roi(y1, y2, c, K.image_dim_ordering(), overlap_thresh=0.7)
roi_count = R.shape[0] // c.num_rois
r2 = np.zeros((roi_count * c.num_rois, r.shape[1]))
r2 = r[:r2.shape[0],:r2.shape[1]]
r2 = np.reshape(r2, (roi_count, c.num_rois, r.shape[1]))
`
Is the function defined somewhere in the project ? We can't retrieve it, and can't solve this issue.