由于V5的版本问题会出现以上错误,解决办法如下
from utils.general import scale_coords
替换成如下,并且把相应位置的scale_coords换成scale_boxes
from utils.general import scale_boxes
或者你可以重新写一个scale_coords
同样由于版本问题,出错
TypeError: attempt_load() got an unexpected keyword argument 'map_location'
'map_location'换成device