-
Notifications
You must be signed in to change notification settings - Fork 6
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
Detection head re-implementation for PyNetsPresso compatibility #194
Conversation
…rainer into 177-detection-head-re-impl
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.
@illian01
Thx for the update.
It seems that the metric calibration is updated as batch-wise calibration.
In later, it would be better not to use for-loop in mini-bach.
Plz check the other comments.
pred.append(pred_on_image) | ||
self.metric_factory(pred, target=targets, phase='valid') | ||
|
||
def save_checkpoint(self, epoch: int): |
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.
If we override task-specific save_checkpoint
function, it may be better to express as abstractmethod
in base pipeline.
Someone may be hard to find where it is defined..
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.
@deepkyu
I overrided save_checkpoint
method because we have to separate backbone and head for detection task.
Thus, this overrided method don't need if we serve fx model with integrated one.
I think it would be better to remove this method when we can compress and benchmark the integrated detection task model.
I will fix save_checkpoint
to abstractedmethod
if we determined to serve detection model as is (backbone and head separately) through internal discussion.
pred_on_image['post_scores'] = detection[..., -1] | ||
pred_on_image['post_labels'] = class_idx | ||
pred.append(pred_on_image) | ||
self.metric_factory(pred, target=targets, phase='valid') |
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.
I updated to call with calc
, instead of __call__
. Originally, it called with the builtin __call__
as you modified, but in later it is hard to catch whether the metric_factory
is method of the class or attribute of the class.
I added calc
in later, but leave __call__
just for backward support.
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.
@deepkyu
I got it. I will fix to call self.metric_factory.calc
method.
Description
Please include a summary in English, of the changes in this pull request. If it closes an issue, please mention it here.
Closes: ~
You should link at least one existing issue for PR. Before your create a PR, please check to see if there is an issue for this change.
PRs from forked repository not accepted.
Change(s)
Changelog
If you PR to
dev
branch, please add a brief summary of the change to the Upcoming Release section of theCHANGELOG.md
file and include a link to the PR (formatted in markdown) and a link to your github profile.For example,
Code Formatting
If you PR to either
master
ordev
branch, you should follow the code linting process. Please check your code withlint_check.sh
in./scripts
directory.For more information, please read the contribution guide in
CONTRIBUTING.md
.