Revert "design design batch"

This reverts commit e6f0ee7f
This commit is contained in:
zhouchengrong
2024-12-11 13:51:22 +08:00
parent 731f07d252
commit 84fe2663f4
16 changed files with 24 additions and 279 deletions

View File

@@ -85,7 +85,7 @@ def seg_preprocess(img_path):
if ori_shape != (img_scale_w, img_scale_h):
# mmcv.imresize(img, img_scale_h, img_scale_w) # 老代码 引以为戒!哈哈哈~ h和w写反了
img = cv2.resize(img, (img_scale_h, img_scale_w))
# img = mmcv.imnormalize(img, mean=np.array([123.675, 116.28, 103.53]), std=np.array([58.395, 57.12, 57.375]), to_rgb=True)
img = mmcv.imnormalize(img, mean=np.array([123.675, 116.28, 103.53]), std=np.array([58.395, 57.12, 57.375]), to_rgb=True)
preprocessed_img = np.expand_dims(img.transpose(2, 0, 1), axis=0)
return preprocessed_img, ori_shape