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

very bad prediction. #20

Open
shoutOutYangJie opened this issue Mar 31, 2021 · 4 comments
Open

very bad prediction. #20

shoutOutYangJie opened this issue Mar 31, 2021 · 4 comments

Comments

@shoutOutYangJie
Copy link

shoutOutYangJie commented Mar 31, 2021

exam1

Hi, can you predict this image. please. The mask can be obtained by the following code

def get_mask(path):
    m = cv2.imread(path)
    new_mask = np.zeros(shape=m.shape, dtype=np.uint8)
    m = np.mean(m, axis=2)
    y, x = np.where(m == 255)
    new_mask[y, x] = 255
    new_mask = Image.fromarray(new_mask)
    return new_mask

I get a very bad result. I use pre-trained model of "place2" dataset. The result is bad.
output

@KumapowerLIU
Copy link
Owner

very interesting! I think may be the type of mask is wrong, the mask is not cover the white regions in your image. I dilate the mask simplely and make the mask boundary close to the white regions boundary, the results seems more reseaonable. As shown images blow, from left to right: the image you give, the image that the true input of model, the output and the mask
input
input2
Places365_val_00000475mask

I test the other mask which I have:
input
input2
Places365_val_00000475
04003

Your orginial image:
input
input2
Places365_val_00000475
mask

@shoutOutYangJie
Copy link
Author

@KumapowerLIU Yes, your result is better. Thank you for helping me. The reason is that mask doesn't cover the white area. By the way, I am curious about what tool can make this mask exhibited by you.

image

@codinglin
Copy link

Hello author, I found that using a 128128 mask in the center of the celeba dataset does not have a particularly good effect. For example, using a 120120 mask can achieve better results. Why?

@fxcdl
Copy link

fxcdl commented Jul 21, 2021

exam1

Hi, can you predict this image. please. The mask can be obtained by the following code

def get_mask(path):
    m = cv2.imread(path)
    new_mask = np.zeros(shape=m.shape, dtype=np.uint8)
    m = np.mean(m, axis=2)
    y, x = np.where(m == 255)
    new_mask[y, x] = 255
    new_mask = Image.fromarray(new_mask)
    return new_mask

I get a very bad result. I use pre-trained model of "place2" dataset. The result is bad.
output

您好,请问您是如何测试的,为什么我测试的结果跟原始图像一模一样

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