-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathusers.py
More file actions
28 lines (22 loc) · 797 Bytes
/
users.py
File metadata and controls
28 lines (22 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
License: Apache 2.0. See LICENSE file in root directory.
Copyright(c) 2020-2021 RealSense, Inc. All Rights Reserved.
"""
import rsid_py
if __name__ == '__main__':
devices = rsid_py.discover_devices()
if not devices:
print("Error: No RealSenseID device detected.")
exit(1)
if len(devices) > 1:
print("Error: Multiple devices detected. Please connect only one.")
exit(1)
device = devices[0]
print(f"Using device on port {device.serial_port}")
with rsid_py.FaceAuthenticator(device.serial_port) as f:
#display list of enrolled users
users = f.query_user_ids()
print('Users: ', users)
#delete all users
if input("Delete all users [y/n]?") == 'y':
f.remove_all_users()