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

Segmentation fault when align custom images #18

Closed
shiyingZhang90 opened this issue May 1, 2020 · 8 comments
Closed

Segmentation fault when align custom images #18

shiyingZhang90 opened this issue May 1, 2020 · 8 comments

Comments

@shiyingZhang90
Copy link

shiyingZhang90 commented May 1, 2020

Hi @yunjey , thanks for great work!
I followed your instruction to manually crop my own image and run the wing alignment, yet I get segmentation fault without any more error message. Please help

Error below:
UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
Segmentation fault

@shiyingZhang90
Copy link
Author

also, a follow up question -- is it possible to only change hair color using starganv2? I found it will change both skin color and hair color in demo video. Thanks

@skyflynil
Copy link

For some reason I got segmentation fault during align as well. It was crashing at

aligned = cv2.warpPerspective(img_np, transform, (cols, rows), flags=cv2.INTER_LANCZOS4)

My issue was resolved by reinstall opencv using conda (to an old 3.x version) and of course at risk of breaking other stuff.

@rishsriv
Copy link

rishsriv commented May 2, 2020

Thanks @skyflynil for the suggestion. I was facing the same issue. Upgrading to opencv 4.2 solved it for me. Apparently, this was an issue with opencv 4.1.2

pip install opencv-python==4.2.0.34

@shiyingZhang90
Copy link
Author

Thanks @rishsriv @skyflynil my issue resolved after I upgrade to opencv 4.3

@youngjung
Copy link
Collaborator

It seems this issue is resolved.
Closing the issue.
Thanks @rishsriv @skyflynil .

@rublaman
Copy link

After 4 hours rendering, I had a "Segmentation fault". I've tried opencv 4.1.2, opencv 4.2.0.34 and opencv 3.4. Same results, "Segmentation fault"
unknown

@Mofafa
Copy link

Mofafa commented Jul 20, 2021

For some reason I got segmentation fault during align as well. It was crashing at

aligned = cv2.warpPerspective(img_np, transform, (cols, rows), flags=cv2.INTER_LANCZOS4)

My issue was resolved by reinstall opencv using conda (to an old 3.x version) and of course at risk of breaking other stuff.

I met the same error, and I solved it using the method mentioned in this link: https://github.com/opencv/opencv/issues/16030

Add cv2.setNumThreads(1)

@phanthaiduong22
Copy link

After 4 hours rendering, I had a "Segmentation fault". I've tried opencv 4.1.2, opencv 4.2.0.34 and opencv 3.4. Same results, "Segmentation fault" unknown

I have the same problem

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

7 participants