File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -304,8 +304,9 @@ def apply(self, input_record):
304304 image = input_record ["image" ]
305305 gt_bbox = input_record ["gt_bbox" ]
306306
307+ origin_h , origin_w = input_record ["h" ], input_record ["w" ]
307308 h , w = image .shape [:2 ]
308- shape = (p .long , p .short , 3 ) if h >= w \
309+ shape = (p .long , p .short , 3 ) if origin_h >= origin_w \
309310 else (p .short , p .long , 3 )
310311
311312 padded_image = np .zeros (shape , dtype = np .float32 )
@@ -334,8 +335,9 @@ def apply(self, input_record):
334335
335336 image = input_record ["image" ]
336337
338+ origin_h , origin_w = input_record ["h" ], input_record ["w" ]
337339 h , w = image .shape [:2 ]
338- shape = (p .long , p .short , 3 ) if h >= w \
340+ shape = (p .long , p .short , 3 ) if origin_h >= origin_w \
339341 else (p .short , p .long , 3 )
340342
341343 padded_image = np .zeros (shape , dtype = np .float32 )
You can’t perform that action at this time.
0 commit comments