Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

Commit

Permalink
Add img_file arg
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Oct 26, 2018
1 parent a43b68b commit fa49166
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions examples/coco/speedtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ def main():
parser.add_argument(
'--times', type=int, default=100, help='number of times of inference'
)
default_img_file = 'https://raw.githubusercontent.com/facebookresearch/Detectron/master/demo/33823288584_1d21cf0a26_k.jpg' # NOQA
parser.add_argument(
'--img-file', default=default_img_file, help='image file'
)
args = parser.parse_args()

img_file = 'https://raw.githubusercontent.com/facebookresearch/Detectron/master/demo/33823288584_1d21cf0a26_k.jpg' # NOQA

print('==> Benchmark: gpu=%d, times=%d' % (args.gpu, args.times))
print('==> Image file: %s' % img_file)
bench_chainer(img_file, args.gpu, args.times)
print('==> Image file: %s' % args.img_file)
bench_chainer(args.img_file, args.gpu, args.times)


if __name__ == '__main__':
Expand Down

0 comments on commit fa49166

Please sign in to comment.