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

Error IndexError: boolean index did not match indexed array along dimension 0; dimension is 780 but corresponding boolean dimension is 799 #7

Open
amitkayal opened this issue Nov 9, 2020 · 3 comments

Comments

@amitkayal
Copy link

Hi,

Getting the following error. Is this due to size mismatch?

Downloading: "https://download.pytorch.org/models/resnet18-5c106cde.pth" to /root/.cache/torch/hub/checkpoints/resnet18-5c106cde.pth
100% 44.7M/44.7M [00:00<00:00, 307MB/s]
Traceback (most recent call last):
File "makeup.py", line 86, in
image = hair(image, parsing, part, color)
File "makeup.py", line 54, in hair
changed[parsing != part] = image[parsing != part]
IndexError: boolean index did not match indexed array along dimension 0; dimension is 780 but corresponding boolean dimension is 799

@amitkayal
Copy link
Author

Here is the input file
girl-no-makeup

@yaroslavmavliutov
Copy link

Hi @amitkayal

You can add np.repeat(parsing[:, :, np.newaxis], 3, axis=2) to hair function. It works

@qihuijia
Copy link

qihuijia commented Aug 7, 2023

Hi @amitkayal

You can add np.repeat(parsing[:, :, np.newaxis], 3, axis=2) to hair function. It works

hi, where should I add this code?

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