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

"RuntimeError: Unsupported image type, must be 8bit gray or RGB image" on Surface Laptop 3 IR Camera #944

Closed
JoshAtticus opened this issue Jul 29, 2024 · 9 comments

Comments

@JoshAtticus
Copy link

Please describe the issue in as much detail as possible, including any errors and traces.
If your issue is a camera issue, be sure to also post the image generated by running sudo howdy snapshot.

When adding a face model with /dev/video2 (IR Camera on Surface Laptop 3) I get the following error

josh@BigSurface:~$ sudo howdy add
Adding face model for the user josh
Enter a label for this new model [Initial model] (max 24 characters): josh

Please look straight into the camera
Traceback (most recent call last):
  File "/usr/local/bin/howdy", line 95, in <module>
    import cli.add
  File "/usr/lib/security/howdy/cli/add.py", line 157, in <module>
    face_locations = face_detector(gsframe, 1)
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.

Here is sudo howdy snapshot output

image

And here is the output of v4l2's list formats thing

josh@BigSurface:~$ v4l2-ctl --list-formats -d /dev/video2
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'GREY' (8-bit Greyscale)

I've searched for similar issues already, and my issue has not been reported yet.

Linux distribution (if applicable): Zorin OS 17.1 Core

Howdy version (sudo howdy version): Howdy 2.6.1

@skjongithub
Copy link

System's numpy >= 2.0.0 may cause this error. If your systems' numpy is >= 2.0.0, would you like to downgrade it to 1.26.4 (latest version of 1.x). At least this fixed this error in my 2 laptops running Garuda linux.

@JoshAtticus
Copy link
Author

System's numpy >= 2.0.0 may cause this error. If your systems' numpy is >= 2.0.0, would you like to downgrade it to 1.26.4 (latest version of 1.x). At least this fixed this error in my 2 laptops running Garuda linux.

Thank you! I will test this later

@JoshAtticus
Copy link
Author

System's numpy >= 2.0.0 may cause this error. If your systems' numpy is >= 2.0.0, would you like to downgrade it to 1.26.4 (latest version of 1.x). At least this fixed this error in my 2 laptops running Garuda linux.

It worked! Thank you so much!

@MarksenDE
Copy link

This Workaround doesn't fixed it for me.

Howdy Version = Howdy 2.6.1
Numpy = 1.26.4 (downgraded)
PRETTY_NAME="Zorin OS 17.1"
NAME="Zorin OS"
VERSION_ID="17"
VERSION="17.1"
VERSION_CODENAME=jammy
ID=zorin
ID_LIKE="ubuntu debian"

@JoshAtticus
Copy link
Author

This Workaround doesn't fixed it for me.

Howdy Version = Howdy 2.6.1 Numpy = 1.26.4 (downgraded) PRETTY_NAME="Zorin OS 17.1" NAME="Zorin OS" VERSION_ID="17" VERSION="17.1" VERSION_CODENAME=jammy ID=zorin ID_LIKE="ubuntu debian"

Did you downgrade with pip as sudo? Are you also using a Surface Laptop 3?

@MarksenDE
Copy link

This Workaround doesn't fixed it for me.
Howdy Version = Howdy 2.6.1 Numpy = 1.26.4 (downgraded) PRETTY_NAME="Zorin OS 17.1" NAME="Zorin OS" VERSION_ID="17" VERSION="17.1" VERSION_CODENAME=jammy ID=zorin ID_LIKE="ubuntu debian"

Did you downgrade with pip as sudo? Are you also using a Surface Laptop 3?

I'm using a Surface Pro 7 with external Logitech Cam. But your question "...Did you downgrade with pip as sudo?..." was the right hint - now it works!
Thanks

@JoshAtticus
Copy link
Author

This Workaround doesn't fixed it for me.
Howdy Version = Howdy 2.6.1 Numpy = 1.26.4 (downgraded) PRETTY_NAME="Zorin OS 17.1" NAME="Zorin OS" VERSION_ID="17" VERSION="17.1" VERSION_CODENAME=jammy ID=zorin ID_LIKE="ubuntu debian"

Did you downgrade with pip as sudo? Are you also using a Surface Laptop 3?

I'm using a Surface Pro 7 with external Logitech Cam. But your question "...Did you downgrade with pip as sudo?..." was the right hint - now it works! Thanks

No problem, yeah you can keep the user installation of numpy up to date just the system one needs to be downgraded

@jim-davenport
Copy link

Would you please post the steps to downgrade numpy? Thanks!

@afalout
Copy link

afalout commented Sep 29, 2024

Would you please post the steps to downgrade numpy? Thanks!

That would be helpful indeed....

sudo pip install --upgrade numpy==1.26.4

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

5 participants