How to use k-crop and multi-scale strategies during the test phase? #1227
Unanswered
IncludeMathH
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I think I found some clues in def forward_test(self, imgs, **kwargs):
"""
Args:
imgs (List[Tensor]): the outer list indicates test-time
augmentations and inner Tensor should have a shape NxCxHxW,
which contains all images in the batch.
"""
if isinstance(imgs, torch.Tensor):
imgs = [imgs]
for var, name in [(imgs, 'imgs')]:
if not isinstance(var, list):
raise TypeError(f'{name} must be a list, but got {type(var)}')
if len(imgs) == 1:
return self.simple_test(imgs[0], **kwargs)
else:
raise NotImplementedError('aug_test has not been implemented') |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In ResNet's paper, the author uses 10-crop and multi-scale testing strategies. Multi-scale testing is also supported in
MMDetection
projects, but is there any inMMClassification
? If it is not available at present and I need to write my own program, is there a roadmap to provide it?Beta Was this translation helpful? Give feedback.
All reactions