Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Three issues when training my image data(not coco) #30

Open
JiangMei0201 opened this issue Aug 5, 2020 · 1 comment
Open

Three issues when training my image data(not coco) #30

JiangMei0201 opened this issue Aug 5, 2020 · 1 comment

Comments

@JiangMei0201
Copy link

It is really great work!Thanks for your project. I try to train my dataset in Pytorch-YOLOv4 and meet three issues.
I imitated YOLOv3 to make data sets and related files, but I reported an error during training:
1.
Traceback (most recent call last):
File "C:/Users/admin/Desktop/PyTorch_YOLOv4-master/train.py", line 398, in
check_git_status()
File "C:\Users\admin\Desktop\PyTorch_YOLOv4-master\utils\utils.py", line 37, in check_git_status
s = subprocess.check_output('if [ -d .git ]; then git fetch && git status -uno; fi', shell=True).decode('utf-8')
File "C:\Users\admin\Anaconda3\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\Users\admin\Anaconda3\lib\subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'if [ -d .git ]; then git fetch && git status -uno; fi' returned non-zero exit status

I add "#" in this error line, but meet the second error

Traceback (most recent call last):
File "C:/Users/admin/Desktop/PyTorch_YOLOv4-master/train.py", line 412, in
train() # train normally
File "C:/Users/admin/Desktop/PyTorch_YOLOv4-master/train.py", line 370, in train
print('%g epochs completed in %.3f hours.\n' % (epoch - start_epoch + 1, (time.time() - t0) / 3600))
UnboundLocalError: local variable 'epoch' referenced before assignment

I add "epoch = 0" before line"for epoch in range(start_epoch, epochs)",but meet another error.

The dataset did not enter the training and training finished

@OYLH
Copy link

OYLH commented Aug 7, 2020

the second issue may be you download the trained pth, it saved the epoch nums, you can make epochs bigger to try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants