mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
Update FP16 --half
argument for test.py and detect.py (#3532)
* Update FP16 `--half` argument for test.py and detect.py * Update detect.py
This commit is contained in:
parent
8d52c1c5c5
commit
c6b51f4189
@ -172,7 +172,7 @@ if __name__ == '__main__':
|
||||
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-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()
|
||||
print(opt)
|
||||
check_requirements(exclude=('tensorboard', 'pycocotools', 'thop'))
|
||||
|
2
test.py
2
test.py
@ -306,7 +306,7 @@ if __name__ == '__main__':
|
||||
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('--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.save_json |= opt.data.endswith('coco.yaml')
|
||||
opt.data = check_file(opt.data) # check file
|
||||
|
Loading…
x
Reference in New Issue
Block a user