tientrandinh / Revisiting-Reverse-Distillation

(CVPR 2023) Revisiting Reverse Distillation for Anomaly Detection
MIT License
113 stars 24 forks source link

How to train my custom dataset? #6

Open Ace-blue opened 1 year ago

Ace-blue commented 1 year ago

Dear Author. When I train with my own dataset, and print " Traceback (most recent call last): File "/home/zzy/Revisiting-Reverse-Distillation/main.py", line 225, in auroc_sp, auroc_px, aupro_px = train(c, pars) File "/home/zzy/Revisiting-Reverse-Distillation/main.py", line 58, in train train_dataloader = torch.utils.data.DataLoader(train_data, batch_size=pars.batch_size, shuffle=True) File "/home/zzy/.conda/envs/zzyRD/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 344, in init sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] File "/home/zzy/.conda/envs/zzyRD/lib/python3.9/site-packages/torch/utils/data/sampler.py", line 107, in init raise ValueError("num_samples should be a positive integer " ValueError: num_samples should be a positive integer value, but got num_samples=0 " I'd like to know how to solve this, thx

Ace-blue commented 1 year ago

I have fixed this bug. The image format in my dataset is "jpg", I changed them to 'png' and the bug is fixed.

Ace-blue commented 1 year ago

I am wondering if this project will support multi gpus for training? Thx for your reply

Ace-blue commented 1 year ago

Dear Author. Will you provide the Dockerfile for this project