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

Report errors while continuing training #13313

Open
1 task done
pjh11214 opened this issue Sep 14, 2024 · 1 comment
Open
1 task done

Report errors while continuing training #13313

pjh11214 opened this issue Sep 14, 2024 · 1 comment
Labels
question Further information is requested

Comments

@pjh11214
Copy link

Search before asking

Question

When I run train.py for target detection, my resume is set to True and I want to continue my previous training. However, when I have last.pt in my tarin-seg folder, I will read the tarin-seg file directly, instead of reading the weight under the tarin file that my target detects. I don't quite understand this question, please answer it for me. Is that my problem.
12345

Additional

No response

@pjh11214 pjh11214 added the question Further information is requested label Sep 14, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @pjh11214, and thank you for your interest in YOLOv5 🚀! This is an automated response, and an Ultralytics engineer will also assist soon.

Understanding the Issue

It seems you're encountering an issue with resuming training when using the --resume flag in YOLOv5, which might be reading weights from an unexpected location. Let's break this down:

Explanation

  1. Resume Training: When you resume training using --resume, YOLOv5 expects to find the last.pt checkpoint from the specified folder. If you want to specify a different path for the weights, you need to ensure the last.pt is correctly located in your desired directory.

  2. Configuration Path: Verify that your command explicitly mentions the correct path to the last.pt file. If you're using a different directory structure, you might need to update the path in your command line.

  3. Command Example:

    python train.py --resume path/to/your/desired/folder/last.pt
  4. Directory Check: Ensure there are no conflicts or other last.pt files in unintended directories that might be picked up by YOLOv5. It reads from the specified directory, but if unspecified, defaults may cause confusion.

Recommended Steps

  • Double-check the file paths and ensure clarity in your folder structure.
  • Confirm the last.pt file is indeed in the directory you intend to resume from.
  • Run the command with explicit paths to avoid default behaviors.

Resources

Additional Support

Feel free to post any logs or additional information that could help in diagnosing the issue further. Also, check out the related discussions or issues for more insights.

😃 Happy training, and thank you for using YOLOv5!

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

No branches or pull requests

2 participants