Hi, when I tested uniformer_s8x8_k400 on the k400 using the provided test script, I encountered the following Error:
File "UniFormer/video_classification/slowfast/datasets/utils.py", line 179, in spatial_sampling
assert len({min_scale, max_scale, crop_size}) == 1
AssertionError
Upon printing the variables, I observed: {min_scale, max_scale, crop_size} == {256, 256, 224}, indicating that len({min_scale, max_scale, crop_size}) == 2>1.
The function spatial_sampling() is utilized in slowfast/datasets/kinetics.py. When the model is set to test, the following code activates:
However, in your test script exp/uniformer_s8x8_k400/test.sh, TEST.NUM_SPATIAL_CROPS is 1. Consequently, min_scale, max_scale, crop_size == [self.cfg.DATA.TRAIN_JITTER_SCALES[0]] * 2 + [self.cfg.DATA.TEST_CROP_SIZE], resulting in len({min_scale, max_scale, crop_size}) == 2, since TRAIN_JITTER_SCALES[0] is 256 according to exp/uniformer_s8x8_k400/test.yaml . This leads to the aforementioned error.
To resolve this issue, it seems that increasing the TEST_CROP_SIZE to 256 or setting NUM_SPATIAL_CROPS to a value greater than 1 might provide a solution. Could you please let me know what should I do?
Hi, when I tested
uniformer_s8x8_k400
on the k400 using the provided test script, I encountered the following Error:Upon printing the variables, I observed:
{min_scale, max_scale, crop_size} == {256, 256, 224}
, indicating thatlen({min_scale, max_scale, crop_size}) == 2
>1.The function
spatial_sampling()
is utilized inslowfast/datasets/kinetics.py
. When the model is set to test, the following code activates:However, in your test script
exp/uniformer_s8x8_k400/test.sh
,TEST.NUM_SPATIAL_CROPS
is 1. Consequently,min_scale, max_scale, crop_size == [self.cfg.DATA.TRAIN_JITTER_SCALES[0]] * 2 + [self.cfg.DATA.TEST_CROP_SIZE]
, resulting inlen({min_scale, max_scale, crop_size}) == 2
, sinceTRAIN_JITTER_SCALES[0]
is 256 according toexp/uniformer_s8x8_k400/test.yaml
. This leads to the aforementioned error.To resolve this issue, it seems that increasing the
TEST_CROP_SIZE to 256
or settingNUM_SPATIAL_CROPS
to a value greater than 1 might provide a solution. Could you please let me know what should I do?