Skip to content
Snippets Groups Projects
Unverified Commit c3acdfd1 authored by Kai Chen's avatar Kai Chen Committed by GitHub
Browse files

fix test api (#1255)

parent c0a4c007
No related branches found
No related tags found
No related merge requests found
...@@ -49,8 +49,13 @@ def init_detector(config, checkpoint=None, device='cuda:0'): ...@@ -49,8 +49,13 @@ def init_detector(config, checkpoint=None, device='cuda:0'):
class LoadImage(object): class LoadImage(object):
def __call__(self, results): def __call__(self, results):
if isinstance(results['img'], str):
results['filename'] = results['img']
else:
results['filename'] = None
img = mmcv.imread(results['img']) img = mmcv.imread(results['img'])
results['img'] = img results['img'] = img
results['img_shape'] = img.shape
results['ori_shape'] = img.shape results['ori_shape'] = img.shape
return results return results
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment