diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index b5aac9d9564948744ea59e6f2c5d7950c3494c8c..b03280192509649da56f89adf9df010373565fe4 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -68,7 +68,7 @@ config_file = 'configs/faster_rcnn_r50_fpn_1x.py' checkpoint_file = 'checkpoints/faster_rcnn_r50_fpn_1x_20181010-3d1b3351.pth' # build the model from a config file and a checkpoint file -model = init_detector(config_file, checkpoint_file) +model = init_detector(config_file, checkpoint_file, device='cuda:0')) # test a single image and show the results img = 'test.jpg' # or img = mmcv.imread(img), which will only load it once @@ -77,7 +77,7 @@ show_result(img, result, model.CLASSES) # test a list of images and write the results to image files imgs = ['test1.jpg', 'test2.jpg'] -for i, result in enumerate(inference_detector(model, imgs, device='cuda:0')): +for i, result in enumerate(inference_detector(model, imgs): show_result(imgs[i], result, model.CLASSES, out_file='result_{}.jpg'.format(i)) ```