IntelRealSense / RealSenseID

Intel® RealSense™ ID SDK
https://intelrealsense.com/facial-authentication/
Apache License 2.0
98 stars 56 forks source link

anyone achieve successfully run enroll.py and other python files please help i am wokring with python in Windows #115

Open ryan185 opened 3 years ago

gabime commented 3 years ago

Please provide more info on the problem

ryan185 commented 3 years ago

When running viewer.py it is showing camera feed but after pressing key "a", "e", "d" it is terminating Version: 0.23.0 [2021-08-02 15:20:13.369] [debug] [Utilities] detected capture device. [2021-08-02 15:20:13.471] [debug] [Preview] Preview started! [2021-08-02 15:28:18.172] [debug] [WindowsSerial] Opening serial port COM9 [2021-08-02 15:28:18.173] [error] [FaceAuthenticatorImpl] Failed to open serial port. GetLastError: 2 [2021-08-02 15:28:18.174] [debug] [NonSecureSession] Close session Traceback (most recent call last): File "viewer.py", line 238, in main() File "viewer.py", line 234, in main input_loop() File "viewer.py", line 127, in input_loop cmd_exec.get(chr(keycode), lambda: None)() File "viewer.py", line 83, in auth_example with rsid_py.FaceAuthenticator(PORT) as f: RuntimeError: Error

Monica2511 commented 3 years ago

I think you should check serial port of camera. In samples code, default PORT='COM9'. If u using Windows, you can identify serial port of connected device in Device Manager.

ryan185 commented 3 years ago

[2021-08-16 10:39:08.992] [debug] [WindowsSerial] Opening serial port COM3 User id to enroll: 12 [2021-08-16 10:39:12.742] [debug] [NonSecureSession] Start session [2021-08-16 10:39:12.743] [debug] [PacketSender] Sending packet 'o' [2021-08-16 10:39:12.747] [debug] [PacketSender] Waiting packet.. [2021-08-16 10:39:12.753] [error] [PacketSender] Got invalid crc. Expected: 561. Actual: 20100 [2021-08-16 10:39:12.754] [error] [NonSecureSession] Failed to recv device start session response [2021-08-16 10:39:12.754] [error] [FaceAuthenticatorImpl] Session start failed with status 108 on_result EnrollStatus.CrcError Traceback (most recent call last): File "enroll.py", line 27, in f.enroll(user_id=user_id, on_hint=on_hint, on_progress=on_progress, on_faces=on_faces, on_result=on_result) RuntimeError: CrcError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "enroll.py", line 31, in print('Users: ', users) TypeError: exit(): incompatible function arguments. The following argument types are supported:

  1. (self: rsid_py.FaceAuthenticator, arg0: capsule, arg1: capsule, arg2: capsule) -> None

Invoked with: <rsid_py.FaceAuthenticator object at 0x000002D0891FB2F0>, <class 'RuntimeError'>, RuntimeError('CrcError'), <traceback object at 0x000002D0892194C0> [2021-08-16 10:39:12.761] [debug] [NonSecureSession] Close session [2021-08-16 10:39:12.765] [debug] [WindowsSerial] Closing serial port

ryan185 commented 3 years ago

any idea for CRC error

RealSenseSupport commented 2 years ago

Have you ran the pre-built sample before? for example rsid-viewer And please make sure you have use correct package and FW. and please double check the serial port name in device manager.