Commit c5b207c4 authored by nikhil_rayaprolu's avatar nikhil_rayaprolu

fixing issues with test script

parent 3c1a50ca
......@@ -30,7 +30,7 @@ for item in glob.glob(test_images_path+'/*.jpg'):
height,width,__ = img.shape
id = int(os.path.basename(item).split('.')[0])
image_dict['id'] = id
image_dict['file_name'] = os.paht.basename(item)
image_dict['file_name'] = os.path.basename(item)
image_dict['width'] = width
image_dict['height'] = height
annotations['images'].append(image_dict)
......@@ -349,7 +349,7 @@ def main():
checkpoint = load_checkpoint(model, args.checkpoint, map_location='cpu')
# old versions did not save class info in checkpoints, this walkaround is
# for backward compatibility
model.CLASSES = [category['name'] for category in ann['categories']]
model.CLASSES = [category['name'] for category in annotations['categories']]
if not distributed:
model = MMDataParallel(model, device_ids=[0])
outputs = single_gpu_test(model, data_loader, args.show)
......@@ -384,5 +384,4 @@ def main():
if __name__ == '__main__':
try:
main()
main()
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