-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Argparse #45
Argparse #45
Conversation
9efc5da
to
3235260
Compare
Keep parsing inside __main__ block and call methods with arguments Add double -- for long argument names (- reserved for shortcuts)
Default is false. If want to resume, call train.py --resume
Default is false: python train.py If want the report: python train.py --report
Shorten name of --data-config-path argument to --data-config
If I want to store my weights in 'weights2' path: python train.py --weights-path weights2 Default is the same: weights
Traing with freeze: python train.py --freeze Train without freeze: python train.py Note: in the actual version freeze is only for first epoche
@guigarfr thanks for the PR! I actually only started using python this year so thank you for the coding recommendations. I'll try and review it soon and get it implemented. |
Sure, feel free to review it and comment the PR. As I said before, the commit messages are very descriptive. |
@guigarfr sounds great! I will make sure to review the commit messages and provide feedback on the PR. Thanks again for your contribution! |
I'm experimenting with your code with a single class dataset.
I made some changes which make the code clearer, i will send you PRs in case you find it interesting.
Here the main changes are:
You can check the changes commit by commit. I tried to make the commits compact, with a correct message and understandable
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Updated training and testing commands, improved detect function, and code refactoring in YOLOv3.
📊 Key Changes
-
with double dashes--
.detect.py
script with adetect()
function.test.py
andtrain.py
, organizing them to be more modular and have simplified arguments.torch_utils.py
for handling device selection and seed initialization.🎯 Purpose & Impact
detect()
method modularizes the code, making it cleaner, easier to understand, and reusable.test.py
andtrain.py
have been refactored to functions accepting arguments, improving readability and making automated testing/training easier to implement.torch_utils.py
centralizes common functions, thereby reducing code duplication and potential inconsistencies across scripts.