We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I guess that mask generation of preprocessing step in generate_pcd must be changed as follows
if w_in/h_in > 1.1 or h_in/w_in > 1.1: # if there is a large gap between height and width, do inpainting in_res = max(w_in, h_in) # image_in, mask_in = np.zeros((in_res, in_res, 3), dtype=np.uint8), 255*np.ones((in_res, in_res, 3), dtype=np.uint8) image_in, mask_in = np.zeros((in_res, in_res, 3), dtype=np.uint8), np.zeros((in_res, in_res, 3), dtype=np.uint8) image_in[int(in_res/2-h_in/2):int(in_res/2+h_in/2), int(in_res/2-w_in/2):int(in_res/2+w_in/2)] = np.array(rgb_cond) # mask_in[int(in_res/2-h_in/2):int(in_res/2+h_in/2), int(in_res/2-w_in/2):int(in_res/2+w_in/2)] = 0 mask_in[int(in_res/2-h_in/2):int(in_res/2+h_in/2), int(in_res/2-w_in/2):int(in_res/2+w_in/2)] = 255 Image.fromarray(image_in).save(f"outputs/temp/image_in.png") Image.fromarray(mask_in).save(f"outputs/temp/mask_in.png") image2 = np.array(Image.fromarray(image_in).resize((self.cam.W, self.cam.H))).astype(float) / 255.0 mask2 = np.array(Image.fromarray(mask_in).resize((self.cam.W, self.cam.H))).astype(float) / 255.0 image_curr = self.rgb( prompt=prompt, image=image2, negative_prompt=negative_prompt, generator=generator, mask_image=mask2, )
It's because there is also mask inversion step in self.rgb function mask_pil = Image.fromarray(np.round((1 - mask_image) * 255.).astype(np.uint8))
mask_pil = Image.fromarray(np.round((1 - mask_image) * 255.).astype(np.uint8))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I guess that mask generation of preprocessing step in generate_pcd must be changed as follows
It's because there is also mask inversion step in self.rgb function
mask_pil = Image.fromarray(np.round((1 - mask_image) * 255.).astype(np.uint8))
The text was updated successfully, but these errors were encountered: