@@ -0,0 +1,976 @@
+import argparse%0Aimport matplotlib.pyplot as plt%0A%0Aimport chainer%0A%0Afrom chainercv.datasets import voc_bbox_label_names%0Afrom chainercv.links import YOLOv3%0Afrom chainercv import utils%0Afrom chainercv.visualizations import vis_bbox%0A%0A%0Adef main():%0A    parser = argparse.ArgumentParser()%0A    parser.add_argument('--gpu', type=int, default=-1)%0A    parser.add_argument('--pretrained_model', default='voc0712')%0A    parser.add_argument('image')%0A    args = parser.parse_args()%0A%0A    model = YOLOv3(%0A        n_fg_class=len(voc_bbox_label_names),%0A        pretrained_model=args.pretrained_model)%0A%0A    if args.gpu %3E= 0:%0A        chainer.cuda.get_device_from_id(args.gpu).use()%0A        model.to_gpu()%0A%0A    img = utils.read_image(args.image, color=True)%0A    bboxes, labels, scores = model.predict(%5Bimg%5D)%0A    bbox, label, score = bboxes%5B0%5D, labels%5B0%5D, scores%5B0%5D%0A%0A    vis_bbox(%0A        img, bbox, label, score, label_names=voc_bbox_label_names)%0A    plt.show()%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

add demo