Revert FP16 test.py and detect.py inference to FP32 default (#3423)
* fixed inference bug ,while use half precision * replace --use-half with --half * replace space and PEP8 in detect.py * PEP8 detect.py * update --half help comment * Update test.py * revert space Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
044daafd9d
commit
b31229ae89
2 files changed
+4
-1
No files matched your search
@@ -306,6 +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')
|
||||
opt = parser.parse_args()
|
||||
opt.save_json |= opt.data.endswith('coco.yaml')
|
||||
opt.data = check_file(opt.data) # check file
|
||||
@@ -326,6 +327,7 @@ if __name__ == '__main__':
|
||||
save_txt=opt.save_txt | opt.save_hybrid,
|
||||
save_hybrid=opt.save_hybrid,
|
||||
save_conf=opt.save_conf,
|
||||
half_precision=opt.half,
|
||||
opt=opt
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user