-
Notifications
You must be signed in to change notification settings - Fork 1
Add YOLO architecture #140
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
base: main
Are you sure you want to change the base?
Conversation
|
GIT Conflict ;) Let me know if you want to do it together ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces support for the YOLO classifier architecture into the project by updating the model factory, classifier module, main initialization, and configuration files.
- Added YOLO model loading and classifier head replacement in the model factory.
- Updated the classifier module and main script to use the new YOLO model structure.
- Adjusted configuration settings to reflect the new model and hyperparameter values.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/models/model_factory.py | Added YOLO model loading, dummy input generation, and classifier head replacement. |
| src/models/classifier_module.py | Updated import and optimizer configuration for YOLO models versus other models. |
| src/main.py | Modified instantiation and logging to support the new classifier module alias. |
| src/dataset_functions.py | Removed an extraneous newline to improve code cleanliness. |
| src/config.yaml | Updated model name and learning rate to match the new YOLO classifier implementation. |
Comments suppressed due to low confidence (2)
src/models/model_factory.py:62
- Assigning arbitrary attributes (f, i, type) to new_head may lead to confusion; consider adding inline comments or refactoring this into a dedicated classifier head subclass to clarify its purpose.
new_head.f = -1
src/models/classifier_module.py:82
- [nitpick] Consider using a more explicit check (e.g. if self.name == "YOLO_cls") to avoid potential false positives when matching model names.
if self.name.startswith("YOLO"):
src/models/model_factory.py
Outdated
|
|
||
| def create_model(model_name, num_classes, freeze=False): | ||
| if model_name == "resnet18": | ||
| '''if model_name == "resnet18": |
Copilot
AI
Apr 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing the deprecated commented-out block if it is no longer needed to improve code readability and maintainability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marszy775 ;)
No description provided.