YOLOR 2023-2-3 torch 2.0.1+cpu CPU 'git' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� Traceback (most recent call last): File "C:\Users\tongji\Desktop\linearbug\yolov7\utils\google_utils.py", line 26, in attempt_download assets = [x['name'] for x in response['assets']] # release assets KeyError: 'assets' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\tongji\Desktop\linearbug\yolov7\detect.py", line 224, in <module> detect() File "C:\Users\tongji\Desktop\linearbug\yolov7\detect.py", line 52, in detect model = attempt_load(weights, map_location=device) # load FP32 model File "C:\Users\tongji\Desktop\linearbug\yolov7\models\experimental.py", line 251, in attempt_load attempt_download(w) File "C:\Users\tongji\Desktop\linearbug\yolov7\utils\google_utils.py", line 31, in attempt_download tag = subprocess.check_output('git tag', shell=True).decode().split()[-1] File "C:\Users\tongji\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 415, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Users\tongji\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'git tag' returned non-zero exit status 1. Process finished with exit code 1
时间: 2023-08-08 11:13:02 浏览: 2119
您好!根据您提供的错误信息,看起来是在运行YOLOR 2023-2-3版本时出现了问题。具体错误是由于在"google_utils.py"文件中的"attempt_download"函数中发生了异常,导致无法获取到资源。而异常发生的原因是在获取资源时没有找到"assets"字段,进而抛出了KeyError异常。
另外,还有一个异常是在"detect.py"文件中的"detect"函数中发生的,可能是由于无法成功加载模型权重文件导致的。
综上所述,可能存在以下几个原因:
1. 您使用的torch版本为2.0.1+cpu,可能与YOLOR 2023-2-3版本不兼容。您可以尝试升级或降级torch版本,以满足YOLOR的要求。
2. 您在运行代码之前可能没有完成相应的依赖项安装或配置。请确保您已经按照项目文档中的要求进行了正确的设置和安装。
希望以上信息对您有所帮助!如果您有更多问题,请随时提问。
阅读全文