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

I have trained this code multiple times.but the highest value of the dice coefficient i have got on the test dataset is 0.54.Could you please give me some advices? #5

Closed haibo-yu-yy closed 3 years ago

haibo-yu-yy commented 3 years ago

I have trained this code multiple times.But the highest value of the dice coefficient i have got on the test dataset is 0.54.Could you please give me some advices?

yelusaleng commented 3 years ago

@haibo-yu-yy u should say some detailed information about your training

haibo-yu-yy commented 3 years ago

Thank you for your reply.Here are the details of my training: Dataset: CASIA 2.0, total 1825 splicing images.
train dataset : test dataset = 8:2, no validation dataset, i test once per epoch on test dataset. use data augmentation on the train dataset ,then there are 8760 images for training. batch_size=14 lr = 0.01 in epoch 0~49, lr = 0.001 in epoch 50~99, lr = 0.0001 in epoch 100~149. Besides, i also trained my model with no data augmentation train dataset, but i got a worse value. Look forward to your reply!

yelusaleng commented 3 years ago

I used the size 256384 (HW) of the image, what is yours?

haibo-yu-yy commented 3 years ago

256 * 256 I rewrote a file named dataset.py to deal with images.

yelusaleng commented 3 years ago

u can try the size I used.

haibo-yu-yy commented 3 years ago

ok, i will have a try

SwallowIsXYZ commented 3 years ago

I have trained this code multiple times.But the highest value of the dice coefficient i have got on the test dataset is 0.54.Could you please give me some advices?

could you give me your trained code , I can not run the code the author give above ,there is always a wrong , I have done all the thing I could done , it include resize the image size to the 384 X 256 . but I can not solve it , It made me so upset . I saw that you have trained the code ,can you give me your changed code or can you help me solve the problem? my email 1483367209@qq.com I am very appreciate it if you can help me

true_masks = np.array([i[1] for i in b]).astype(np.float32) / 255. ValueError: could not broadcast input array from shape (256,256,3) into shape (256,256)

haibo-yu-yy commented 3 years ago

u can check the shape of the images and masks. input images should have 3 channels true_masks have only 1 channel

SwallowIsXYZ commented 3 years ago

------------------ 原始邮件 ------------------ 发件人: "yelusaleng/RRU-Net" <notifications@github.com>; 发送时间: 2020年12月14日(星期一) 下午5:25 收件人: "yelusaleng/RRU-Net"<RRU-Net@noreply.github.com>; 抄送: "燕子"<1483367209@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [yelusaleng/RRU-Net] I have trained this code multiple times.but the highest value of the dice coefficient i have got on the test dataset is 0.54.Could you please give me some advices? (#5)

u can check the shape of the images and masks. input images should have 3 channels true_masks have only 1 channel

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Thank you for your quick reply ,I will try again follow your advice

haibo-yu-yy commented 3 years ago

@yelusaleng
Could you provide a pre-trained model?

yelusaleng commented 3 years ago

@haibo-yu-yy i have uploaded the model

haibo-yu-yy commented 3 years ago

thank you!