Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Please describe the motivation of this PR and the goal you want to achieve through this PR.
在导出模型并推理得到特征时,MoBY算法只能导出backbone特征,或者neck (ie, projector_q) 特征,无法导出head (ie, predictor) 特征。
head特征可直接用于以图搜图等项目,这个PR实现导出模型及推理得到head特征的功能。
之前已提issue 260,请见下面链接
#260
Modification
Please briefly describe what modification is made in this PR.
Backward-Compatibility-Breaking (Optional)
Does the modification introduce changes that break the backward-compatibility? If so, please describe how it breaks the compatibility in this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
如链接最下面提取特征例子所示https://github.com/alibaba/EasyCV/blob/master/docs/source/tutorials/ssl.md
如果在config文件.\configs\selfsup\moby*,设置export = dict(export_neck=True, export_head=True),当设置export_head=True时,无论export_neck设置为True或False,都会得到head (ie, predictor)特征
Pull-Request Todo List