YOLOv7 Error : subprocess.CalledProcessError: Command 'git tag' returned non-zero exit status 128.
1. 학습시 에러가 발생하는 경우 (train.py)
KeyError: 'assets'
During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/content/gdrive/MyDrive/guideDetection/yolov7/train.py", line 616, in <module> train(hyp, opt, device, tb_writer)
File "/content/gdrive/MyDrive/guideDetection/yolov7/train.py", line 86, in train attempt_download(weights) # download if not found locally
File "/content/gdrive/MyDrive/guideDetection/yolov7/utils/google_utils.py", line 31, in attempt_download tag = subprocess.check_output('git tag', shell=True).decode().split()[-1]
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'git tag' returned non-zero exit status 128.
YOLOv7 train.py 파일을 수정해준다
85,86 lines 주석처리if pretrained:
2. 테스트시 에러가 발생하는 경우 (detect.py)
KeyError: 'assets'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/content/gdrive/MyDrive/guideDetection/yolov7/detect.py", line 196, in <module> detect()
File "/content/gdrive/MyDrive/guideDetection/yolov7/detect.py", line 34, in detect model = attempt_load(weights, map_location=device) # load FP32 model
File "/content/gdrive/MyDrive/guideDetection/yolov7/models/experimental.py", line 249, in attempt_load attempt_download(w)
File "/content/gdrive/MyDrive/guideDetection/yolov7/utils/google_utils.py", line 31, in attempt_download tag = subprocess.check_output('git tag', shell=True).decode().split()[-1]
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'git tag' returned non-zero exit status 128.
yolov7/models/experimental.py 파일을 수정한다
251 line 주석처리