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

Wear mask to face but it changes my image quality #43

Closed
cannguyen275 opened this issue Feb 18, 2021 · 6 comments
Closed

Wear mask to face but it changes my image quality #43

cannguyen275 opened this issue Feb 18, 2021 · 6 comments

Comments

@cannguyen275
Copy link

Hello,

Let's explain the issue with below samples:
42
42_masked

I use add_mask_one script, is_aug is False but sometimes, it somehow changes the whole image content. I just want to wear a mask without effect to my image quality.

@wang21jun
Copy link
Collaborator

Could you please upload your original image (without landmarks and mask) ?

@cannguyen275
Copy link
Author

Sure! Pls check it out.
42

@wang21jun
Copy link
Collaborator

mask_false
test1_landmark_res0
test1_mask1
This is my result by the original add_mask_one.py with is_aug=False.

@cannguyen275
Copy link
Author

Yes, it's the reason why I've used "sometimes, somehow" in my question. I've customized the add_mask_one.py to be able to run many images in a folder, keep all other codes as the original. But the error randomly occurred each time I ran.

Below images are from 2 times I ran in the same folder. Pls focus on image 90_masked.jpg/ 120_masked.jpg:

Screenshot from 2021-02-22 13-42-36

Screenshot from 2021-02-22 13-42-58

@annopackage
Copy link

Hi, have you solved this problem? I encountered similar question.

@cannguyen275
Copy link
Author

Hi, have you solved this problem? I encountered similar question.

I solved it by change:

imsave(masked_face_path, new_image)

to

imsave(masked_face_path, skimage.img_as_ubyte(new_image))

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

3 participants