TypeError: attempt_load() got an unexpected keyword argument ‘map_location‘
新舊版本問題
舊版本的程式碼是
model = attempt_load(weights, map_location=device)
換成新版本的
model = DetectMultiBackend(weights, device=device, dnn=dnn, data=data, fp16=half)
或者
model = attempt_load(weights, device=device)