Closed tymsoncyferki closed 9 months ago
Hi, @tymsoncyferki. Thanks for using this repository.
First, replace ImageFolder
with PCAM
in your_own_dataset.
# from torchvision.datasets import ImageFolder
from torchvision.datasets import PCAM
Next, change dataset = ImageFolder()
to dataset = PCAM()
.
# dataset = ImageFolder(opt.train_root, transform=transform)
dataset = PCAM(opt.train_root, split="train", transform=transform,
download=opt.force_download)
If the file is your_own_dataset/save_compared_images.py or test_anomaly_detection.py, replace split="train"
with split="test"
and opt.train_root
with opt.test_root
.
Then run the following command:
python train_wgangp.py "." -f
--img_size 96
.python train_wgangp.py "." -f --img_size 96
I hope you will go well.
Thanks a lot.
Just wanted to say that every time I tried running python train_wgangp.py "." -f
my computer crashed after couple of gigabytes downloaded. I guess it was a problem with memory leak. However I have downloaded PCAM manually, pasted it in pcam folder and I guess it's working:)
I'm glad to hear that you managed to get it working!
Hi @A03ki, I want to train f-anogan using pcam dataset. I have two questions:
or maybe I have to generate jpgs myself and put them all in the folder?
Thanks