Skip to content

Commit

Permalink
Fix Multi-Scale error, ref: open-mmlab/mmsegmentation#276
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaAndroid committed Jan 6, 2021
1 parent dfd0a92 commit d4a5354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmdet/apis/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def inference_detector(model, img):
data = test_pipeline(data)
data = collate([data], samples_per_gpu=1)
# just get the actual data from DataContainer
data['img_metas'] = data['img_metas'][0].data
data['img'] = data['img'][0].data
data['img_metas'] = [i.data[0] for i in data['img_metas']]
data['img'] = [i.data[0] for i in data['img']]
if next(model.parameters()).is_cuda:
# scatter to specified GPU
data = scatter(data, [device])[0]
Expand Down

0 comments on commit d4a5354

Please sign in to comment.