yelusaleng / RRU-Net

Official repository for "RRU-Net: The Ringed Residual U-Net for Image Splicing Forgery Detection" (CVPRW 2019)
106 stars 17 forks source link

About the Training and test datasets #13

Closed yanmengdi123 closed 2 years ago

yanmengdi123 commented 2 years ago

Hello, I use the "CASIA2.0" training mentioned in the paper, and the problems in the picture below always appear. But I trained with my own data set and I could train normally but poorly. In addition, I also tried to use the "COVARAGE" dataset training, also appeared in the following error. Do you know why, or do you require anything in your code about the input data set? Thank you very much! 你好,我用论文中说的“CASIA2.0”训练,总是出现下图中的问题。但我用自己的数据集训练却可以正常训练但效果很差。此外,我还尝试用“COVARAGE”数据集训练,也是出现下图的错误。请问您知道是什么原因吗,或者您在代码中对输入数据集做了什么要求吗?非常感谢! image

yelusaleng commented 2 years ago

hi, you should check the shape of the mask. the channel of the mask should be 1.

yelusaleng commented 2 years ago

besides, you should have a large of data to train your model if you wanna get the model with better performance.

yanmengdi123 commented 2 years ago

hi, you should check the shape of the mask. the channel of the mask should be 1.

I'm sorry, I don't quite understand this sentence. Generally speaking, the mask is black and white, so that the number of channels is 1. So it's not quite clear how to understand what you mean. Thank you very much!

yelusaleng commented 2 years ago

please give me some detailed information about the training image and corresponding mask.

yanmengdi123 commented 2 years ago

please give me some detailed information about the training image and corresponding mask.

Thank you very much! 1.COVERAGE:This is a copy-move dataset.The link is here:https://drive.google.com/file/d/1z53DZ7PfPlYpNV_HoFlSBODEzJp4SWMB/view?usp=sharing When I use this dataset to train the model, I get the same "shape" problem as above 2.CASIA2.0:This is the training data set that the authors of the paper used. The CASIA2.0 dataset contains 2064 JPEG images and 3059 TIF images. I used format conversion software to convert TIF images into JPEG images for uniformity. "Jpg-tp" in the CASIA2.0 folder is the 5123 doctored JPG images that I converted. JPEG images have the same length and width as TIF images (384x256). The CASIA2.0 mask I downloaded from GitHub is:https://github.com/namtpham/casia2groundtruth Link to "jpg-tp" folder in CASIA2.0 dataset: https://drive.google.com/drive/folders/1chVv49jYtPMMXbAnElerlq7jIwb_kxxE

I'm sorry, I can only post links, and I don't know how to describe CASIA and COVERAGE datasets. But I downloaded both of these generic datasets from the Internet. Thank you very much for your answer, which is very helpful to me!

yanmengdi123 commented 2 years ago

please give me some detailed information about the training image and corresponding mask. This is the mask for the CASIA2.0 dataset. image

yelusaleng commented 2 years ago

问题就在于这个mask的位深度,正确来说应该是8而不是32

yanmengdi123 commented 2 years ago

问题就在于这个mask的位深度,正确来说应该是8而不是32

您这边方便把您训练时候的数据集放一下吗?非常感谢。因为我这边的mask全是网上下载的,所以该怎么处理位深度这个问题我也不是很了解。谢谢!

yanmengdi123 commented 2 years ago

问题就在于这个mask的位深度,正确来说应该是8而不是32

您好,老师我这边自己能运行的数据集我查了一下mask位深度确实是8.但我也看了我用COVERAGE数据集运行的mask,位深度也为8,但是运行出现上述错误。另外用我同学的位深度为8的数据集跑了一下,也是一样的错误。是不是出现这个问题跟其他有关系呀?感谢老师的回复! image 35a0c7a2b39fd6e48e1ee4fcd21eed4

yanmengdi123 commented 2 years ago

问题就在于这个mask的位深度,正确来说应该是8而不是32 老师您好,很抱歉再次打扰您,我想问一下您的CASIA2.0数据集在使用前是不是经过统一裁剪,将其裁剪成正方形,然后再训练的。因为在代码里面关于训练集有注释部分说明训练图片为正方形。谢谢老师!

yanmengdi123 commented 2 years ago

问题就在于这个mask的位深度,正确来说应该是8而不是32

很抱歉再次打扰老师。我按照刚才老师说的位深度为8将所有CASIA2.0数据集的mask设置从24降到了8.重新训练的过程中出现了上图一样的问题,所以应该不是位深度的问题了。谢谢老师!谢谢老师的回复! image

yelusaleng commented 2 years ago

原始的casia数据集不能直接用于训练,你需要对其进行一定的处理。 你的问题不单单是mask,image的格式也有问题,首先你需要先检查image的通道数是否为3,然后将所有image处理为统一大小,我使用的 h*w*c 为 256*384*3,当然,mask为256*384