-
Notifications
You must be signed in to change notification settings - Fork 1k
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] Multi task head #675
Conversation
Sounds like a good feature. We will review it recently. |
Codecov Report
@@ Coverage Diff @@
## dev #675 +/- ##
==========================================
+ Coverage 87.02% 87.07% +0.04%
==========================================
Files 130 131 +1
Lines 8538 8571 +33
Branches 1468 1476 +8
==========================================
+ Hits 7430 7463 +33
Misses 888 888
Partials 220 220
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thank you for your contribution, please follow this pre-commit guide to fix the lint. |
0f0a117
to
ad20f36
Compare
@mzr1996 @Ezra-Yu Thanks for your support ! With the switch of the base, i feel this PR was carrying a lot of non-multi_task_head-related changes (maybe some change to merge from master to dev) I have cleaned up everything from the dev branch, cherry-picking my changes, so the PR contains only relevant changes Now the PR should be more clean and easier to review. |
Thanks for the work on this! I need to combine an image classification head with an mmdet object detection model as well as mmocr, so would really appreciate this being possible in a single combined model. |
I think you need to give some examples in |
Hello, I have modified some APIs to support the entire multi-task design. More details can be found in #808 |
this feature has been supported in the new main branch, so close it here. |
Motivation
I've read the #628 issue and implemented a proposal for MultiTaskClsHead in order to mix multiple classification head to create a multi task classification tool.
Modification
Please briefly describe what modification is made in this PR.
NB : Current implementation is made to be generic and the different head can output different shapes (it will give the ability to mix head from mmcls with heads from mmpose or other projects). The drawback of this is that the output of the
simple_test
method cannot be a tensor, i choose to deactivate thepost_process=False
mode for thesimple_test
method. Any suggestion would be welcomeBC-breaking (Optional)
No
Use cases (Optional)
The basic use case here it to classify multiple classes using the same neural network.
In order to make it work, it is needed to implement a compatible dataset.
I have made the following :
load_annotations
,info['gt_label']
is atuple
containing one gt_label per headevaluate
method need to be reworkedChecklist
Before PR:
After PR: