You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We initially take 8 of 8-framed local clips, which forms a tensor shaped [8, 8, H, W, C].
Then we can consider that tensor as a $8 \times 8$ matrix of $H \times W \times C$ images whose row indicates a local clip, and column indicates a global clip.
FrameSampler samples global and local clips based on sampler_index given in the model config file.
Values we used are sampler_index=dict(l=[4, 5], g=3).
TemporallyPyramidicRecognizer or a 'recognizer' in mmaction is a bundle of the whole structure of model: backbone, necks, head.
All we did are aggregating FrameSampler forward of it and manipulating multiview tensors.
Frames of videos are fed into this class and it outputs the loss.
mmaction/models/necks/domain_classifier.py
@NECKS.register_module()classTemporallyPyramidicDomainClassifier(DomainClassifier):
def__init__(self,
temporal_locality,
*args, **kwargs
):
self.temporal_locality=temporal_localitysuper().__init__(*args, **kwargs)
defforward(self,
f_tallies:list,
labels=None, domains=None,
train=False,
**kwargs
):
...
ifself.temporal_localityin ['local', 'global', 'both']:
fs, domains=temporal_locality_fuse(
f_tallies,
self.temporal_locality,
return_domain_names=True
)
elifself.temporal_locality=='local-global': # not used for this project
...
elifself.temporal_locality=='global-local': # not used for this project
...
elifself.temporal_locality=='cross': # not used for this project
...
_, losses=super().forward(
fs, domains=domains, train=train, **kwargs)
returnf_tallies, losses
The GLADis a set of domain classifiers with individual views.
A term temporal_locality is a legacy version of the term view.
Each domain classifier has its own view 'local', 'global' or 'both'.
And they are aggreagated in TemporallyPyramidicRecognizer.
f_tallies is a list of lists of tensors, each of which indicates