Closed zjbthomas closed 2 years ago
Okay, I see. You are using padded wavelets. Reflection padding adds extra values on the edges to make the wavelet transform invertible. We did not do that and chose to work with boundary wavelets instead. Since extra padding adds extra pixels the dimensions don't work. However, https://arxiv.org/pdf/2210.14874.pdf (Table 2) evaluated padding and found it to work well. Therefore you should be able to safely adjust the hardcoded 24 in line https://github.com/gan-police/frequency-forensics/blob/463458f3f4016b120325423a8fcd198d225aefb8/src/freqdect/models.py#L47 .
An other option would be to run prepare_dataset.py
with --boundary boundary
.
Thanks, it works!
Hi there, thanks for sharing the code for such a great work!
I am trying to train the network using my own dataset and I want to use a similar setup as
CNN-ln-db4
in your paper.I prepared the dataset using the following commends (all paths are omitted):
My dataset contains images all in size 128 x 128.
And I run the training script as following:
However, I got the following errors at line 147 of models.py.
By checking the code, I think this is because the input packet size is bigger than what is expected, so after the convolutions the output does not go down to 1 x 1.
I am wondering did I make any mistakes in preparing the dataset? What should I do to have packets with the correct size?
Thank you.