fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "/home/ubuntu/code/yolov7-main/utils/google_utils.py", line 26, in attempt_download
assets = [x['name'] for x in response['assets']] # release assets
KeyError: 'assets'
报上面错误,表示你本地的 “预训练权重” 没有被找到,程序自动去网上库里找,恰巧是网上库的链接失效了(https://api.github.com/repos/WongKinYiu/yolov7/releases/latest ,是404的),attempt_download方法没对404的请求做处理,就报上面assets字段不存在的错误;
我们不可能去修复404问题,但我们可以下载 “预训练权重”到本地;进入 https://github.com/WongKinYiu/yolov7 ,选择对应版本。下载后放入文件夹根目录中;
遇到报错:_pickle.UnpicklingError: STACK_GLOBAL requires str
解决办法是,将数据集中的labels.cache文件删掉