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

Unsupported image type error #928

Open
cass3451 opened this issue Jun 20, 2024 · 32 comments
Open

Unsupported image type error #928

cass3451 opened this issue Jun 20, 2024 · 32 comments

Comments

@cass3451
Copy link

Running Howdy 2.6.1, on elementary OS 7.1 (based on Ubuntu 22.04.3), IR camera is built-in on XPS 15 9500 (ID 0bda:5510 Realtek Semiconductor Corp. Integrated_Webcam_HD).

Howdy worked very well on this exact setup less than a week ago, which is part of the reason I'm so stumped here. The error I keep getting is as follows:

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.

The exact same message when testing or adding a new face. Running the snapshot test, the jpg that I get is clearly taken in IR, and is in 8bit greyscale as it should be. Snapshot test is attached if that helps. The device path is configured properly and the IR emitters light up when I test or add a new face, it just is giving a weird file to the program for some reason.

20240620T004540

I've uninstalled and reinstalled howdy probably 10 times now, tried every camera device path I have, changed the /lib/security/howdy/compare.py file as this solution suggested, all of them give me the exact same error every time.

Like I said, this version of howdy ran beautifully out of the box on this exact OS, with this exact camera, I can't think for the life of me what I might be doing different this time around.

Any help or suggestions would be appreciated! I really liked this project when I got it running last time, I wouldn't be trying this hard otherwise :)

@rschrenk
Copy link

rschrenk commented Jun 20, 2024

I experience the same problem with Ubuntu 22.04 on an iMac 2012

@deeonis-ru
Copy link

Same problem

Linux ThinkPad-X1-Yoga-4th 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Output of v4l2-ctl command
Driver Info:
        Driver name      : uvcvideo
        Card type        : Integrated Camera: Integrated I
        Bus info         : usb-0000:00:14.0-8
        Driver version   : 6.5.13
        Capabilities     : 0x84a00001
                Video Capture
                Metadata Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
Media Driver Info:
        Driver name      : uvcvideo
        Model            : Integrated Camera: Integrated I
        Serial           : 6926
        Bus info         : usb-0000:00:14.0-8
        Media version    : 6.5.13
        Hardware revision: 0x00006926 (26918)
        Driver version   : 6.5.13
Interface Info:
        ID               : 0x03000002
        Type             : V4L Video
Entity Info:
        ID               : 0x00000001 (1)
        Name             : Integrated Camera: Integrated I
        Function         : V4L2 I/O
        Flags            : default
        Pad 0x01000007   : 0: Sink
          Link 0x02000019: from remote pad 0x100000a of entity 'Extension 14' (Video Pixel
Formatter): Data, Enabled, Immutable
Priority: 2
Video input : 0 (Camera 8: ok)
Format Video Capture:
        Width/Height      : 640/360
        Pixel Format      : 'GREY' (8-bit Greyscale)
        Field             : None
        Bytes per Line    : 640
        Size Image        : 230400
        Colorspace        : sRGB
        Transfer Function : Rec. 709
        YCbCr/HSV Encoding: ITU-R 601
        Quantization      : Default (maps to Full Range)
        Flags             :
Crop Capability Video Capture:
        Bounds      : Left 0, Top 0, Width 640, Height 360
        Default     : Left 0, Top 0, Width 640, Height 360
        Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 640, Height 360, Flags:
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 640, Height 360, Flags:
Streaming Parameters Video Capture:
        Capabilities     : timeperframe
        Frames per second: 30.000 (30/1)
        Read buffers     : 0

@qiayuanl
Copy link

qiayuanl commented Jun 21, 2024

I got the same issue in Ubuntu 22.04.

@Haxby6338
Copy link

Having the same issue with Ubuntu 22.04 LTS:
_

Adding face model for the user peter
Enter a label for this new model [Initial model] (max 24 characters): me

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

Using the Logi Brio Ultra Webcam, CUDA Tools 12.5, the camera is working fine for 'sudo howdy snapshot' - saves the image and it is a clear image. Both 'add' and 'test' generate the error message.
Hope we get an answer soon!

@Danipiario
Copy link

Same issue for me on Ubuntu 22.04.4

@richdear
Copy link

Same issue!

@RushbhXD
Copy link

I am having the same issue in Ubuntu 22.04

@tenda96
Copy link

tenda96 commented Jun 23, 2024

Yes, me too.
I've tried alot of linux distro but all seems to have this bug...
But in the past i've had successfully installed howdy on this machine (dell latitude 5290 2in1) with ubuntu and it was working perfectly. Hope the developer fix this problem!

@williamogle0
Copy link

williamogle0 commented Jun 24, 2024

Same here, with Logitech BRIO 4k (Linux Mint 21.3)

@cosmin1805
Copy link

Same issue on Linux Mint 21.3

@emersoncastilho
Copy link

Same error here, Ubuntu 22.04 LTS.
I've tried also cloning the git repo and building from source, but I've got the exact same error (maybe related to dlib?)

@noothangpersonel
Copy link

Same here, Ubuntu 22.04 LTS on 3th Gen Lenovo T14 notebook

@PancakeSparkle
Copy link

PancakeSparkle commented Jun 25, 2024

Same issue on Arch, and it only happened after a recent system update.

@simonporter007
Copy link

Looks like an issue with numpy being upgraded to v2: https://stackoverflow.com/a/78638053

Workaround which worked for me to add a model was to downgrade it to 1.26.4 again: sudo pip install --upgrade numpy==1.26.4. However, model still not recognized after that (timeout) so not sure if that's a complete workaround.

@PancakeSparkle
Copy link

PancakeSparkle commented Jun 25, 2024

thank you @simonporter007
That fixed it for me

@emersoncastilho
Copy link

Looks like an issue with numpy being upgraded to v2: https://stackoverflow.com/a/78638053

Workaround which worked for me to add a model was to downgrade it to 1.26.4 again: sudo pip install --upgrade numpy==1.26.4. However, model still not recognized after that (timeout) so not sure if that's a complete workaround.

That workaround fixed it for me! At least for now.
Tks, @simonporter007

@Danipiario
Copy link

also for me, downgrading fixed

@williamogle0
Copy link

Thanks a lot, that worked! Hopefully the devs fix this to work with numpy 2.0 soon!

@cass3451
Copy link
Author

Worked for me as well, thank you so much for figuring that out!

@envolution
Copy link

envolution commented Jun 26, 2024

@cass3451 I don't think this should be closed since there is no current solution for numpy 2

@ericzolner
Copy link

Downgrading numpy to 1.26.4 also worked for me. Thank you for posting!

@richdear
Copy link

Even downgrading doesnt work for me!

@joehillen
Copy link

@cass3451 A workaround is not the same as fixing an issue. Please reopen this.

@cass3451 cass3451 reopened this Jun 27, 2024
@joehillen
Copy link

dlib added support to numpy 2, so we're waiting on a new release of dlib davisking/dlib#2970

@envolution
Copy link

understood, thank you!

@TheHighGroundWins
Copy link

For anyone who can't wait, compile from the git repo itself to get latest changes.

Currently using latest python-dlib-git on aur to use the latest commit version.

@mohdforever
Copy link

Looks like an issue with numpy being upgraded to v2: https://stackoverflow.com/a/78638053

Workaround which worked for me to add a model was to downgrade it to 1.26.4 again: sudo pip install --upgrade numpy==1.26.4. However, model still not recognized after that (timeout) so not sure if that's a complete workaround.

its worked for me in ubuntu 24.04 and linuxmint 21.3 very well.
slimbook face recognition also worked after this workaround

@xvs03
Copy link

xvs03 commented Jul 2, 2024

Thanks, the workaround works.
But there are other problems.

  1. Login after restart. Recognition works, but then you don't get to the start screen and jump back to the login screen.
  2. Login after standby mode does not work at all.

Linux Mint 21.3 on HP ProBook
Still a great project.
I'm out for now, sorry

@nightdevil00
Copy link

Downgrading numpy to 1.26.4 also worked for me on Linux Mint 21.3

@GuilingQiyu
Copy link

Looks like an issue with numpy being upgraded to v2: https://stackoverflow.com/a/78638053

Workaround which worked for me to add a model was to downgrade it to 1.26.4 again: sudo pip install --upgrade numpy==1.26.4. However, model still not recognized after that (timeout) so not sure if that's a complete workaround.

It works for me in Zorin 17.1 Thank you.

@brooke-heaton
Copy link

Downgrading numpy to 1.26.4 worked for me on Pop!_OS 22.04 LTS.

@martkyle
Copy link

Downgrading numpy to 1.26.4 worked for me on Pop!_OS 22.04 LTS.

Same here on the same OS! Thank you for the fix

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