Skip to content
Snippets Groups Projects
Commit e6a5daab authored by hexiangdong2019's avatar hexiangdong2019
Browse files

修改resize_long函数

parent b0c78206
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@ def cal_hist(a, b, n):
return np.bincount(n * a[k].astype(np.int32) + b[k], minlength=n ** 2).reshape(n, n)
def resize_long(img, long_size=513):
print(img)
h, w, _ = img.shape
if h > w:
new_h = long_size
......@@ -117,10 +118,8 @@ def eval_batch(eval_net, img_lst, crop_size=513, flip=True):
def eval_batch_scales(eval_net, img_lst, scales,
base_crop_size=513, flip=True):
print(scales)
sizes_ = [int((base_crop_size - 1) * sc) + 1 for sc in scales]
probs_lst = eval_batch(eval_net, img_lst, crop_size=sizes_[0], flip=flip)
print(sizes_)
for crop_size_ in sizes_[1:]:
probs_lst_tmp = eval_batch(eval_net, img_lst, crop_size=crop_size_, flip=flip)
for pl, _ in enumerate(probs_lst):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment