fix the jupyter notebook demo (#2814)

pull/2788/head
Kai Chen 5 years ago committed by GitHub
parent 145a2d5c45
commit c298a0a366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      demo/inference_demo.ipynb
  2. 1
      mmdet/apis/inference.py

@ -16,7 +16,7 @@
"metadata": {},
"outputs": [],
"source": [
"config_file = '../configs/faster_rcnn_r50_fpn_1x_coco.py'\n",
"config_file = '../configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py'\n",
"# download the checkpoint from model zoo and put it in `checkpoints/`\n",
"checkpoint_file = '../checkpoints/faster_rcnn_r50_fpn_1x_20181010-3d1b3351.pth'"
]
@ -45,9 +45,7 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"data": {
@ -84,18 +82,18 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.7"
},
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"source": [],
"metadata": {
"collapsed": false
}
},
"source": []
}
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}

@ -57,6 +57,7 @@ class LoadImage(object):
results['ori_filename'] = None
img = mmcv.imread(results['img'])
results['img'] = img
results['img_fields'] = ['img']
results['img_shape'] = img.shape
results['ori_shape'] = img.shape
return results

Loading…
Cancel
Save