-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Feature] Implement ACRN and Focal Loss #891
Conversation
Codecov Report
@@ Coverage Diff @@
## master #891 +/- ##
=======================================
Coverage 83.71% 83.71%
=======================================
Files 131 132 +1
Lines 9870 9932 +62
Branches 1699 1710 +11
=======================================
+ Hits 8263 8315 +52
- Misses 1197 1203 +6
- Partials 410 414 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
configs/detection/acrn/slowfast_acrn_kinetics_pretrained_r50_8x8x1_cosine_10e_ava22_rgb.py
Outdated
Show resolved
Hide resolved
configs/detection/acrn/slowfast_acrn_kinetics_pretrained_r50_8x8x1_cosine_10e_ava22_rgb.py
Outdated
Show resolved
Hide resolved
Sth in all config files should be removed. |
Why we put acrn_head in misc_head.py |
loss = bce_loss(cls_score, labels, reduction='none') | ||
pt = torch.exp(-loss) | ||
F_loss = self.focal_alpha * (1 - pt)**self.focal_gamma * loss | ||
losses['loss_action_cls'] = torch.mean(F_loss) |
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.
How about moving this part as class FocalLoss
and using it by build_loss(xxx)?
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.
like BaseHead
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 think we can make FocalLoss a separate module when there is evidence that it can lead to performance gain on other tasks. For now, it is only used in the training of AVA.
I will add a series of shared_heads for feature fusion. Currently, I only committed ACRNHead since it's the most successful one. |
I guess what he means is that why not name it as |
I know. Since I will add a series of heads in the future, I plan to put all of them in the misc_head.py to avoid creating a new file for each individual. |
No description provided.