Skip to content

Commit

Permalink
fix demo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xhzdeng committed Apr 18, 2018
1 parent c646be8 commit a5aef0f
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -60,7 +60,8 @@ This code is based on [Caffe](https://github.com/BVLC/caffe) and [py-faster-rcnn
output/<experiment directory>/<dataset name>/<network snapshot name>/
```

7. Demo

### Demo
```
cd $CRPN_ROOT
./tools/demo.py --net [NET] --model [MODEL]
Expand Down
Binary file added data/demo/img_10.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/demo/img_14.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/demo/img_45.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tools/demo.py
Expand Up @@ -153,6 +153,7 @@ def parse_args():
#
if args.demo_net is None:
prototxt = os.path.join(cfg.MODELS_DIR, NETS[args.demo_net][0], 'faster_rcnn_end2end', 'test.prototxt')
cfg_file = None
else:
prototxt = os.path.join('./models', args.demo_net, 'test.pt')
cfg_file = os.path.join('./models', args.demo_net, 'config.yml')
Expand Down Expand Up @@ -184,8 +185,7 @@ def parse_args():
# for i in xrange(2):
# _, _= im_detect(net, im)

im_names = ['img_1.jpg', 'img_2.jpg', 'img_3.jpg',
'img_4.jpg', 'img_5.jpg']
im_names = ['img_10.jpg', 'img_14.jpg', 'img_45.jpg']
for im_name in im_names:
print '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
print 'Demo for data/demo/{}'.format(im_name)
Expand Down

0 comments on commit a5aef0f

Please sign in to comment.