在
# Load model device = select_device(device) model = DetectMultiBackend(weights, device=device, dnn=dnn, data=data, fp16=half) model.cuda()#使用gpu,用这个将模型数据导入,如用cpu跑把这段注释即可 stride, names, pt = model.stride, model.names, model.pt
说明:加入model.cuda()
或者model = model.cuda()