Skip to content

Commit d4a5354

Browse files
committed
Fix Multi-Scale error, ref: open-mmlab/mmsegmentation#276
1 parent dfd0a92 commit d4a5354

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mmdet/apis/inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def inference_detector(model, img):
110110
data = test_pipeline(data)
111111
data = collate([data], samples_per_gpu=1)
112112
# just get the actual data from DataContainer
113-
data['img_metas'] = data['img_metas'][0].data
114-
data['img'] = data['img'][0].data
113+
data['img_metas'] = [i.data[0] for i in data['img_metas']]
114+
data['img'] = [i.data[0] for i in data['img']]
115115
if next(model.parameters()).is_cuda:
116116
# scatter to specified GPU
117117
data = scatter(data, [device])[0]

0 commit comments

Comments
 (0)