-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
freq_mask_path and space_mask_path #2
Comments
You can calculate the average value over the dataset for each pixel in each image to generate the space_mask, and calculate the average amptitude over the dataset of each frequency component in each image after Fourier transform for the freq_mask, as mentioned in Sec 4.3 of our paper. Emprically, we find that about 200 images randomly sampled from the dataset is enough for calculating both masks. |
thanks! |
Sure, I will add a demo about how to calculate the masks soon. |
We have added the file mask_gen_demo.py.py, which is a demo showing how to generate frequency and space mask for an image dataset. We take CIFAR10 as an example. We hope you find it helpful. |
thanks! |
Sorry @AwakerMhy , another confusion that, if different categories of images are different scale, need to [padding] and [mask] to same shape, but without using |
For other datasets in which the raw images has different sizes, you need to resize them to have the same size and before calculating the masks. |
Hi,
I want to know that, If I want to use
freq_mask
andspace_mask
on my own datasets, how can I generate it?Thanks!
The text was updated successfully, but these errors were encountered: