Skip to content
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

Interesting but unusable. Too much false positive. #5

Closed
Vadim2S opened this issue Mar 22, 2022 · 7 comments
Closed

Interesting but unusable. Too much false positive. #5

Vadim2S opened this issue Mar 22, 2022 · 7 comments

Comments

@Vadim2S
Copy link

Vadim2S commented Mar 22, 2022

I am try DIRL with my own little test dataset. In 48 total here is only 2 success and around 45 false positive alarms.

For example: (fake, mask, DIRL result)
military118_1_1

@jimleungjing
Copy link
Collaborator

I am try DIRL with my own little test dataset. In 48 total here is only 2 success and around 45 false positive alarms.

For example: (fake, mask, DIRL result) military118_1_1

Our model is trained on iHarmony4 dataset. It is better to finetune our model on your own dataset.

@alishan2040
Copy link

@Vadim2S yes fine-tuning is a good idea.
@jimleungjing Did you train your network with different backbone (resnet50 instead of resnet34)? There is an option in code to change backbone but the code did not work when we do so. Is it possible if you can review the problem with changing backbone from resnet34 to resnet50?
ERROR:
weight of size [256, 256, 3, 3], expected input[8, 512, 226, 226] to have 256 channels, but got 512 channels instead.

I understand this is an issue with input dimensions but with the given code, it should work because dimensions of resnet50 are same in both encoder and decoder part.

image
image

Thanks!!!

@jimleungjing
Copy link
Collaborator

jimleungjing commented Apr 20, 2022

@Vadim2S yes fine-tuning is a good idea. @jimleungjing Did you train your network with different backbone (resnet50 instead of resnet34)? There is an option in code to change backbone but the code did not work when we do so. Is it possible if you can review the problem with changing backbone from resnet34 to resnet50? ERROR: weight of size [256, 256, 3, 3], expected input[8, 512, 226, 226] to have 256 channels, but got 512 channels instead.

I understand this is an issue with input dimensions but with the given code, it should work because dimensions of resnet50 are same in both encoder and decoder part.

image image

Thanks!!!

I just fixed this bug. However, I suggest that you should reduce the dimension of encoder outputs since the output dimension of resnet50 will lead to super heavy model and take more GPU memory to train. For example, you can apply an extra conv1x1 to reduce the encoder tensor dimension.

@alishan2040
Copy link

@Vadim2S yes fine-tuning is a good idea. @jimleungjing Did you train your network with different backbone (resnet50 instead of resnet34)? There is an option in code to change backbone but the code did not work when we do so. Is it possible if you can review the problem with changing backbone from resnet34 to resnet50? ERROR: weight of size [256, 256, 3, 3], expected input[8, 512, 226, 226] to have 256 channels, but got 512 channels instead.
I understand this is an issue with input dimensions but with the given code, it should work because dimensions of resnet50 are same in both encoder and decoder part.
image image
Thanks!!!

I just fixed this bug. However, I suggest that you should reduce the dimension of encoder outputs since the output dimension of resnet50 will lead to super heavy model and take more GPU memory to train. For example, you can apply an extra conv1x1 to reduce the encoder tensor dimension.

@jimleungjing Thanks for fixing it. Yes you are right, changing the backbone to ResNet50 results in more memory cost. Could you please guide if I need to add conv1x1 after each encoder layer (output). Wouldn't that change the dimensions in the decoder too? What changes do I have to make for code to work? Also if you've pretrained weights with backbone 50 on iHormany4 datasets, please share?

Thanks again!

@jimleungjing
Copy link
Collaborator

Well, you can add conv1x1 in the decoder to reduce tensor dimension, and rewrite self.dims according to the output dimension of conv1x1, other code should remain the same. You can check out the tensor dimension in debug mode.

@alishan2040
Copy link

Okay. As I noticed fine-tuning works better than training from scratch. Did you train your model on iHarmony4 dataset with backbone Resnet50?

@jimleungjing
Copy link
Collaborator

Okay. As I noticed fine-tuning works better than training from scratch. Did you train your model on iHarmony4 dataset with backbone Resnet50?

No, you can try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants