-
Notifications
You must be signed in to change notification settings - Fork 206
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
add video recognition #256
Conversation
@@ -0,0 +1,173 @@ | |||
_base_ = '../../base.py' |
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.
clipbert.py的配置看起来也是multilabel? 两个配置文件的具体区别是?
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.
clipbert中的multi_class参数没有用到,默认是false,已改成fasle
@@ -0,0 +1,146 @@ | |||
_base_ = '../../base.py' |
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.
这三个video_swin的配置,通用部分可以复用,基于其中一个配置改写,同下面的x3d配置
@@ -147,4 +147,97 @@ def _evaluate_impl(self, predictions, gt_labels): | |||
return eval_res | |||
|
|||
|
|||
@EVALUATORS.register_module | |||
class MultiClsEvaluator(Evaluator): |
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.
MultiCls 怎么理解?multi label?命名改下吧
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.
done
target.shape, 'pred and target should be in the same shape.' | ||
num_classes = pred.shape[1] | ||
ap = np.zeros(num_classes) | ||
f = open('res.txt', 'w') |
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.
这个文件是否有必要保存,应该保存在哪里?
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.
已删除
for line in fin: | ||
line_split = line.strip().split(self.split) | ||
if self.multi_class: | ||
assert self.num_classes is not None |
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.
label支持下string类型,num_classes是否可以从ann_file中获取而不需要用户填写
return repr_str | ||
|
||
|
||
def to_tensor(data): |
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.
接口已存在:easycv/datasets/shared/pipelines/format.py
idx, traceback.format_exc())) | ||
data_dict = None | ||
if data_dict is None: | ||
return self.__getitem__(np.random.randint(self.__len__())) |
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.
return self[np.random.randint(len(self))]
@@ -0,0 +1,582 @@ | |||
# flake8: noqa |
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.
加一下引用的lincense
@@ -0,0 +1,732 @@ | |||
from functools import lru_cache, reduce |
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.
加一下引用的license
@@ -0,0 +1,333 @@ | |||
import math |
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.
添加引用license
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.
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.
Pull-Request Todo List