cherry-pick 1.serving bug; 2.feature_extraction.md

pull/1429/head
stephon 2021-11-11 02:36:30 +00:00
parent 1201af5d19
commit 689f57d444
1 changed files with 4 additions and 4 deletions

View File

@ -64,12 +64,12 @@ class DetOp(Op):
im_scale_y, im_scale_x = self.generate_scale(raw_im)
im = self.img_preprocess(raw_im)
im_shape = np.array(im.shape[1:]).reshape(-1)
scale_factor = np.array([im_scale_y, im_scale_x]).reshape(-1)
imgs.append({
"image": im[np.newaxis, :],
"im_shape":
np.array(list(im.shape[1:])).reshape(-1)[np.newaxis, :],
"scale_factor":
np.array([im_scale_y, im_scale_x]).astype('float32'),
"im_shape": im_shape[np.newaxis, :],
"scale_factor": scale_factor[np.newaxis, :],
})
self.raw_img = raw_imgs