mmtracking icon indicating copy to clipboard operation
mmtracking copied to clipboard

When I try to train ILSVRC2015 dataset using FGFA for vid task, after modifying workflow=[('train', 1)] to workflow=[('train', 1), ('val', 1)] in config , will produce this error, I made sure I have modified the pipeline, but it still produces this error, if I remove ('val', 1), it works fine

Open Hikar1i opened this issue 3 years ago • 1 comments

When I try to train ILSVRC2015 dataset using FGFA for vid task, after modifying workflow=[('train', 1)] to workflow=[('train', 1), ('val', 1)] in config , will produce this error, I made sure I have modified the pipeline, but it still produces this error, if I remove ('val', 1), it works fine 我尝试使用FGFA进行vid任务训练ILSVRC2015数据集时,在config中将workflow = [('train', 1)]修改为workflow=[('train', 1), ('val', 1)]后,会产生这个错误,我确保已经修改了pipeline,但是还是会产生此错误,如果删除('val', 1),就可以正常运行

Traceback (most recent call last): File "tools/train.py", line 184, in main() File "tools/train.py", line 180, in main meta=meta) File "/home/whj/anaconda3/envs/chen/lib/python3.6/site-packages/mmtrack/apis/train.py", line 62, in train_model seed=cfg.seed) for ds in dataset File "/home/whj/anaconda3/envs/chen/lib/python3.6/site-packages/mmtrack/apis/train.py", line 62, in seed=cfg.seed) for ds in dataset File "/home/whj/anaconda3/envs/chen/lib/python3.6/site-packages/mmtrack/datasets/builder.py", line 58, in build_dataloader sampler = GroupSampler(dataset, samples_per_gpu) if shuffle else None File "/home/whj/anaconda3/envs/chen/lib/python3.6/site-packages/mmdet/datasets/samplers/group_sampler.py", line 20, in init self.flag = dataset.flag.astype(np.int64) AttributeError: 'ImagenetVIDDataset' object has no attribute 'flag'

Hikar1i avatar Mar 19 '22 14:03 Hikar1i

Thanks for your pointing out. It's a potential bug. The error is rooted in https://github.com/open-mmlab/mmdetection/blob/master/mmdet/datasets/custom.py#L120.

You can add one line of code before this to fix it: val_dataset.test_mode = False

We'll appreciate it if you can create a PR to fix this bug.

BTW, please note that the val in the workflow does not mean the true evaluation on the validate set. It's only used to check some metrics about the model on the validate set. Details can be seen this. We usually use the eval hook to evaluate the method on the val dataset.

JingweiZhang12 avatar Mar 20 '22 02:03 JingweiZhang12