运行yolov10推理图片样本时报错

显示运行时积极报错

requests.exceptions.comnectionEprar: HITpscoanectionpol(hast="'api.github.com', port=43): Max retries exceeded with url: /repos/utralytics/asets/releases/teags/v8.1.a

解决就是换一个快一点的网络,或者链接手机热点再进行运行v10的推理代码,具体是为啥要用网络我也不知道,有知道的可以在评论区指教一番

这是yolov10推理脚本代码


from ultralytics import YOLOv10

import torch
if  torch.cuda.is_available():
    device = torch.device("cuda")
else:
    raise Exception("CUDA is not")

model_path = r"H:\\DL\\yolov10-main\\runs\\detect\\train\\exp\\weights\\best.pt"
model = YOLOv10(model_path)
results = model(source=r'H:\DL\yolov10-main\dataDakeset\CCD_dataBlue25\test',
                name='predict/exp',
                conf=0.45,
                save=True,
                device='0'
                )

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐