Unverified Commit c3acdfd1 authored by Kai Chen's avatar Kai Chen Committed by GitHub
Browse files

fix test api (#1255)

parent c0a4c007
......@@ -49,8 +49,13 @@ def init_detector(config, checkpoint=None, device='cuda:0'):
class LoadImage(object):
def __call__(self, results):
if isinstance(results['img'], str):
results['filename'] = results['img']
else:
results['filename'] = None
img = mmcv.imread(results['img'])
results['img'] = img
results['img_shape'] = img.shape
results['ori_shape'] = img.shape
return results
......
Markdown is supported
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