You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am interested in your paper. I am also trying to modify the QuickStart notebook to generate and evaluate the unlearnable dataset on the CelebA-50 dataset. I want to ask about the spatial dimension size for the input images and perturbation setting for the min-min noise algorithm. I currently use (the train dataset's size, 32, 32, 3) and ResNet-18 as the source and target model. The clean test accuracy when trained on the unlearnable dataset is ~90% so I suspect that I used the wrong values for these two parameters. I originally set the dimension to (128, 128, 3) and I got an error with the forward pass. Many thanks.
base_model = ResNet18(num_of_classes)
`
Also, based on the notebook, can you suggest on how to save the pertubed images? CelebAMini class only keeps a list of filenames. Many thanks.
I want to ask about the spatial dimension size for the input images and perturbation setting for the min-min noise algorithm.
I'm not quite sure what is the original resolution of CelebAMini, the noise shape should be the same as the original image.
can you suggest on how to save the pertubed images?
Here is an suggetion that should works. In the CelebAMini class, for the __getitem__(self, index) function, return the name of the file. In the for loop over the data loader, you can get filenames, images, labels, then the filenames are coorsponding to the images sampled from the dataloader. transforms.ToPILImage() can help to convert the tensor to image format and then save them.
Activity
HanxunH commentedon Jan 19, 2024
Hi,
I believe you can change the CIFAR10 dataset in the notebook to the CelebA on your local machine. Don't forget to change noise spatial dimension size.
saigontrade88 commentedon Dec 7, 2024
Hello,
I am interested in your paper. I am also trying to modify the QuickStart notebook to generate and evaluate the unlearnable dataset on the CelebA-50 dataset. I want to ask about the spatial dimension size for the input images and perturbation setting for the min-min noise algorithm. I currently use (the train dataset's size, 32, 32, 3) and ResNet-18 as the source and target model. The clean test accuracy when trained on the unlearnable dataset is ~90% so I suspect that I used the wrong values for these two parameters. I originally set the dimension to (128, 128, 3) and I got an error with the forward pass. Many thanks.
`
num_of_classes = 50
train_transform = [
transforms.CenterCrop((32, 32)),
transforms.RandomHorizontalFlip(),
transforms.ToTensor()
]
clean_train_dataset = CelebAMini(root='datasets',
split="train",
target_type="identity",
download=False,
num_of_classes=num_of_classes,
transform=train_transform)
clean_test_dataset = CelebAMini(root='datasets',
split="all",
target_type="identity",
download=False,
num_of_classes=num_of_classes,
transform=test_transform)
noise_generator = toolbox.PerturbationTool(epsilon=0.03137254901960784,
num_steps=20,
step_size=0.0031372549019607846)
base_model = ResNet18(num_of_classes)
`
Also, based on the notebook, can you suggest on how to save the pertubed images? CelebAMini class only keeps a list of filenames. Many thanks.
HanxunH commentedon Dec 8, 2024
Hi, thanks for your interest.
I'm not quite sure what is the original resolution of CelebAMini, the noise shape should be the same as the original image.
Here is an suggetion that should works. In the
CelebAMiniclass, for the__getitem__(self, index)function, return the name of the file. In the for loop over the data loader, you can get filenames, images, labels, then the filenames are coorsponding to the images sampled from the dataloader.transforms.ToPILImage()can help to convert the tensor to image format and then save them.saigontrade88 commentedon Dec 9, 2024
Thanks, you for your correct suggestions. The QuickStart Jupyter Notebook also works for ResNet-18 and CelebA.