PaddleSeg icon indicating copy to clipboard operation
PaddleSeg copied to clipboard

How to use QualityInspector STFPM to train multiple types of data in MvTec AD dataset at the same time?

Open zzh805780186 opened this issue 1 year ago • 0 comments

问题确认 Search before asking

  • [X] 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

I use QualityInspector STFPM with MvTec AD dataset ,How to train both 'bottle' and 'cable' datasets?

'python tools/uad/stfpm/train.py --config ./configs/uad/stfpm/stfpm_resnet18_mvtec.yml --category bottle' This command can only train one dataset, not multiple datasets at the same time.

' python tools/uad/stfpm/train.py --config ./configs/uad/stfpm/stfpm_resnet18_mvtec.yml --category all' I get an error when using this command :

Traceback (most recent call last): File "tools/uad/stfpm/train.py", line 225, in main() File "tools/uad/stfpm/train.py", line 94, in main train_image_list, val_image_list = train_test_split( File "/home/zhaozihao/anaconda3/envs/PaddlePaddle_other/lib/python3.8/site-packages/sklearn/utils/_param_validation.py", line 211, in wrapper return func(*args, **kwargs) File "/home/zhaozihao/anaconda3/envs/PaddlePaddle_other/lib/python3.8/site-packages/sklearn/model_selection/_split.py", line 2617, in train_test_split n_train, n_test = _validate_shuffle_split( File "/home/zhaozihao/anaconda3/envs/PaddlePaddle_other/lib/python3.8/site-packages/sklearn/model_selection/_split.py", line 2273, in _validate_shuffle_split raise ValueError( ValueError: With n_samples=0, test_size=0.2 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.

image I see category variable can be set [textures, objects, all],but i don't konw how to use.
Who can tell me how to use ? Thanks!

zzh805780186 avatar Aug 30 '23 07:08 zzh805780186