Unverified 提交 c6b51f41 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Update FP16 `--half` argument for test.py and detect.py (#3532)

* Update FP16 `--half` argument for test.py and detect.py * Update detect.py
上级 8d52c1c5
...@@ -172,7 +172,7 @@ if __name__ == '__main__': ...@@ -172,7 +172,7 @@ if __name__ == '__main__':
parser.add_argument('--line-thickness', default=3, type=int, help='bounding box thickness (pixels)') parser.add_argument('--line-thickness', default=3, type=int, help='bounding box thickness (pixels)')
parser.add_argument('--hide-labels', default=False, action='store_true', help='hide labels') parser.add_argument('--hide-labels', default=False, action='store_true', help='hide labels')
parser.add_argument('--hide-conf', default=False, action='store_true', help='hide confidences') parser.add_argument('--hide-conf', default=False, action='store_true', help='hide confidences')
parser.add_argument('--half', type=bool, default=False, help='use FP16 half-precision inference') parser.add_argument('--half', action='store_true', help='use FP16 half-precision inference')
opt = parser.parse_args() opt = parser.parse_args()
print(opt) print(opt)
check_requirements(exclude=('tensorboard', 'pycocotools', 'thop')) check_requirements(exclude=('tensorboard', 'pycocotools', 'thop'))
......
...@@ -306,7 +306,7 @@ if __name__ == '__main__': ...@@ -306,7 +306,7 @@ if __name__ == '__main__':
parser.add_argument('--project', default='runs/test', help='save to project/name') parser.add_argument('--project', default='runs/test', help='save to project/name')
parser.add_argument('--name', default='exp', help='save to project/name') parser.add_argument('--name', default='exp', help='save to project/name')
parser.add_argument('--exist-ok', action='store_true', help='existing project/name ok, do not increment') parser.add_argument('--exist-ok', action='store_true', help='existing project/name ok, do not increment')
parser.add_argument('--half', type=bool, default=False, help='use FP16 half-precision inference') parser.add_argument('--half', action='store_true', help='use FP16 half-precision inference')
opt = parser.parse_args() opt = parser.parse_args()
opt.save_json |= opt.data.endswith('coco.yaml') opt.save_json |= opt.data.endswith('coco.yaml')
opt.data = check_file(opt.data) # check file opt.data = check_file(opt.data) # check file
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论