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

why is my generated result image is also gray? #6

Open
honeytidy opened this issue Jun 2, 2020 · 5 comments
Open

why is my generated result image is also gray? #6

honeytidy opened this issue Jun 2, 2020 · 5 comments

Comments

@honeytidy
Copy link

honeytidy commented Jun 2, 2020

I am running with the test code and got all result also grays. It is like that:
image
My pytorch vision is 1.5.

@ericsujw
Copy link
Owner

ericsujw commented Jun 2, 2020

Do you follow the setting in the colab notebook?
You can run sh scripts/test_mask.sh to get colorized results.

@honeytidy
Copy link
Author

Yes, I do. infer box first and then run fusion. But I did this on my windows and cpu model. Do it matter.
And I as you can see that color seems on a small area. How to debug that?
image

@thelastlin
Copy link

Yes, I do. infer box first and then run fusion. But I did this on my windows and cpu model. Do it matter.
And I as you can see that color seems on a small area. How to debug that?
image

Please have a look at PR #12. The pretrained weights may not be loaded.

@delldu
Copy link

delldu commented Nov 25, 2020

On Linux, CPU is also too, it is very strange, but GPU works well.

@sysuzyq
Copy link

sysuzyq commented Apr 1, 2021

https://github.com/ericsujw/InstColorization/blob/master/models/fusion_model.py#L108

        GF_state_dict_temp ={}
        for k,v in GF_state_dict.items():
            if k.startswith('module'):
                GF_state_dict_temp[k[7:]] = v
            else:
                GF_state_dict_temp[k] = v
        GF_state_dict = GF_state_dict_temp

        G_state_dict_temp ={}
        for k,v in G_state_dict.items():
            if k.startswith('module'):
                G_state_dict_temp[k[7:]] = v
            else:
                G_state_dict_temp[k] = v
        G_state_dict = G_state_dict_temp

        GComp_state_dict_temp ={}
        for k,v in GComp_state_dict.items():
            if k.startswith('module'):
                GComp_state_dict_temp[k[7:]] = v
            else:
                GComp_state_dict_temp[k] = v
        GComp_state_dict = GComp_state_dict_temp

        self.netGF.load_state_dict(GF_state_dict, strict=True)
        self.netG.load_state_dict(G_state_dict, strict=True)
        self.netGComp.load_state_dict(GComp_state_dict, strict=True)

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

5 participants