Getting started hosting an F455 on Raspberry Pi 4
Hi All.
We would like to integrate with the RealSense F455 with a Raspberry Pi 4 via USB.
Are there instructions for setting up this environment with some sample code for getting Face Authentication events?
-
Hi Ualtboum,
Check out the Instruction for Linux. After building, you will get a command-line tool to use RealSenseID.
Furthermore, there is also a whitepaper about Code Samples for Intel RealSense ID Solution.
Regards,
Yu-Chern
Intel RealSense Customer Support -
Thank ,
Thanks for the links .
1.Do you have instructions for how to compile it on Raspberry Pi 4(the instructions are for Ubunto 18.4)? Do you officially support it ?was it tested?
2.Is python supported in the Real sense id API? (since in the link below it said that python and java are under dev)
-
Hi Ualtboum,
1. The Instruction for Linux is working fine for Raspberry Pi. I've tested it on my side.
2. Currently, Python API is still under development and will be supported in later release.
Regards,
Yu-Chern
Intel RealSense Customer Support -
Hi Ualtboum,
The full make command is cmake .. This ".." is required. After cloning the RealSenseID repository, did you direct to that folder to create a folder named build?
git clone https://github.com/IntelRealSense/RealSenseID.git
cd RealSenseID
mkdir build
cd build
cmake ..
makeRegards,
Yu-Chern
Intel RealSense Customer Support -
Many thanks I managed to compile it with your great help .
in windows I opened the big project in vs2019 and ran the sample authenticate-cpp-sample and it worked great .
In PI-4 I am a bit confused since I do not see solutions created .
I ran the command cmake -DRSID_SAMPLES=1 ..
it worked and placed some files in my build folder but from there I do not know how to continue .
can you send me some instructions how can I run the authenticate-cpp-sample ?
-
Hello ,
Thanks for you help I fell we are progressing .
I managed to run the auth program but it returns errors allthough I connected the camera via usb:
./authenticate-cpp-sample
[2021-05-30 15:46:44.284] [debug] [LinuxSerial] Opening serial port /dev/ttyACM0 baudrate 115200
[2021-05-30 15:46:44.285] [error] [FaceAuthenticatorImpl] Failed open serial port. errno: 2
Failed connecting with status Error
[2021-05-30 15:46:44.285] [debug] [NonSecureSession] Close session
programI tried to follow up with this command to see what port it is connected but it returned nothing:
pi@raspberrypi:~/Uri/Intel/clone/RealSenseID/build/bin $ sudo dmesg | grep 'Intel F450' -A 5 | grep ttyACM
pi@raspberrypi:~/Uri/Intel/clone/RealSenseID/build/bin $Please tell me what steps I should follow to get the connected usb port name and activate the auth app .
Many thanks
-
Hello ,
Thanks for you help I feel we are progressing .
I managed to run the auth program but it returns errors allthough I connected the camera via usb:
./authenticate-cpp-sample
[2021-05-30 15:46:44.284] [debug] [LinuxSerial] Opening serial port /dev/ttyACM0 baudrate 115200
[2021-05-30 15:46:44.285] [error] [FaceAuthenticatorImpl] Failed open serial port. errno: 2
Failed connecting with status Error
[2021-05-30 15:46:44.285] [debug] [NonSecureSession] Close session
programI tried to follow up with this command to see what port it is connected but it returned nothing:
pi@raspberrypi:~/Uri/Intel/clone/RealSenseID/build/bin $ sudo dmesg | grep 'Intel F450' -A 5 | grep ttyACM
pi@raspberrypi:~/Uri/Intel/clone/RealSenseID/build/bin $Please tell me what steps I should follow to get the connected usb port name and activate the auth app .
Many thanks
-
Hi Ualtboum,
You're using the correct command to get the connected USB port name and the output should have something. Please try to connect the cable with another port of Raspberry Pi. Perhaps you can try to run this 'lsusb' command to make sure your F455 Camera is connected to the Raspberry Pi.
Regards,
Yu-Chern
Intel Customer Support -
Hi ,
I ran the command lsusb and it returned:
root@raspberrypi:/home/pi/Uri/Intel/clone5# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@raspberrypi:/home/pi/Uri/Intel/clone5#the same results was if the camera is connected or not .
I set up a team view on the PI-4 .
1 547 193 735
a123456
please try to login to assist us since we wish to push with the integration - we want to make a demo very shortly in our partners meeting.
thanks
-
I moved it to all other usb ports and the command:
sudo dmesg | grep 'Intel F450' -A 5 | grep ttyACM
did not repond....
I ran the command lsusb and it returned:
root@raspberrypi:/home/pi/Uri/Intel/clone5# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@raspberrypi:/home/pi/Uri/Intel/clone5#the same results was if the camera is connected or not .
I set up a team view on the PI-4 .
1 547 193 735
a123456
please try to login to assist us since we wish to push with the integration - we want to make a demo very shortly in our partners meeting.
thanks
-
Hi Ualtboum,
It seems like your F455 camera is not detected. Before that, try to connect your F455 camera to a Windows 10 host machine and run with the Intel Realsense ID Viewer. You may also check your F455 camera with the Device Manager.
You have to install the Intel RealSense ID Viewer and Firmware.
Regards,
Yu-Chern
Intel Customer Support -
Hi Ualtboum,
Glad to know your F455 camera is working fine. The problem now is your F455 camera didn't detect by your Raspberry Pi. You can try to connect them using a powered USB 3.0 hub. Please note that USB 2.0 port is unable to detect F455 camera.
Regards,
Yu-Chern
Intel Customer Support -
Hi ,
I got it all to work last week .
this week this is what I am getting in PI-4 - I cann't get it to work allthough I restarted many times .
RealSenseID::AuthenticateStatus::SerialError
[2021-06-13 17:47:28.036] [error] [PacketSender] Failed sending face entry command
[2021-06-13 17:47:28.036] [error] [NonSecureSession] Failed to send start session packet
[2021-06-13 17:47:28.036] [error] [FaceAuthenticatorImpl] Session start failed with status 102
[2021-06-13 17:47:28.136] [debug] [NonSecureSession] Start session
[2021-06-13 17:47:28.137] [error] [LinuxSerial] Error while sending 16 bytes. errno=5, sent so far: 0, write rv=4294967295please advise.
thanks
-
Hi Ualtboum,
The error sounds like it could be a power issue. Have a try with another USB powered cable. Someone has shared his finding regarding similar issue.
Regards,
Yu-Chern
Intel Customer Support -
Thank you we got it to work and we recieve the events in callback and handle them in our software!!!
we have 4 issues we would like to address to finish the integration:
1 . can we connect more than one camera to a PI?
2. do you also support PI-3?
3.in windows we have the intel software that we can capture a face and assign it to authentication . is there a similar software that can be executed in the PI? if so some instructions would be great
4.I manage to compile the code using visual code on PI with the CMake extension . the problem is that the resulting file
./authenticate-cpp-sample when copied to a diffrent machine results in "fragmentation error" when exectuted .
Is there a need to copy addidional files to the same folder of
./authenticate-cpp-sample ? or some guide to compilations in release mode?...
Thanks!!!!
-
Hi Ualtboum,
1. Can you describe your use case for using multiple F455 cameras?
2. The Instruction for Linux is also working fine for Raspberry Pi 3. I've tested it on my side with a powered USB 3.0 hub. Please note that USB 2.0 port is unable to detect F455 camera.
3. After building the solution, you will find a rsid-cli in the /build/bin directory. This rsid-cli has the similar functionality as the rsid-viewer in Windows 10, which allows you to enroll and authenticate. The difference is this rsid-cli is a command-line interface, which means don't have the preview frame.
4. The default build type for the CMake is already in Release mode. But if you compile the code with Visual Code on Pi, there is an option in the Visual Code interface for you to change Debug to Release. When copying the authenticate-cpp-sample to another machine (Raspberry Pi to another Raspberry Pi), you have to copy also the shared library which is the librsid.so (located in /build/lib directory) and paste it into /lib directory.
Regards,
Yu-Chern
Intel Customer Support -
Thanks you are very helpful!!
1. Can you describe your use case for using multiple F455 cameras?
we would like to connect several cameras to one PI and run a few of our application each listening for callbacks from an SDK on a diffrent camera on a diffrent usb port
Is the above possible ?
-
Hello ,
I wish to tell us what we wish to achieve and maybe you'll have some ideas .
We wish to use one windows main station to delare the users with the nice windows interface .
than we would like to take the photo and the names from the camera and share it with many more resbery PIs 1...n
we do not want to do every declaration per each PI we would like some kind of way/sdk to update all selected PIs from the main station .
Can you please suggest how to apply the above?
than we would like to upload the selected image
-
Hello ,
I wish to tell us what we wish to achieve and maybe you'll have some ideas .
We wish to use one windows main station to delare the users with the nice windows interface .
than we would like to take the photo and the names from the camera and share it with many more resbery PIs 1...n
we do not want to do every declaration per each PI we would like some kind of way/sdk to update all selected PIs from the main station .
Can you please suggest how to apply the above?
than we would like to upload the selected image
-
Hi Ualtboum,
There are device mode and host mode in the RealSense ID Viewer.
Device Mode is a set of APIs enable the user to enroll and authenticate on the device itself, including database management and matching on the device.
Host Mode is a set of APIs for users who wish to manage a faceprints database
on the host or the server.
Enroll the users in host mode of RealSense ID Viewer. The database will save in a .db file. If you save the .db file in default path, you can find this .db file in this way: Right-click the Intel RealSense ID Viewer and then select "open file location".
After done enroll, change the mode to device mode (which is 'Host mode: No' in the setting). You can save the database to the device by importing this .db file. It is a good practice to click the "store updates to flash" button although the system will auto-update after importing the .db file.
You may refer to the link below for a better picture.
https://www.intelrealsense.com/get-started-intel-realsense-id/
Regards,
Yu-Chern
Intel Customer Support -
Hello ,
thanks for the response .
sorry I did not really understand how to accompilish what we need.
we have a dedicated windows machine there we will declare the user on the realsense camera connected to this pc .
we have 1..n resbery PI connected in the network . and now we want to update them all with the picture delared on our windows machine .
How do we do that ?
Can you send us specific documents protocols to implement?
many thanks
-
Hi ,
what we mostly do not understand is after we have configured it in host mode and have the db file .
now we have 300 cameras - how can we deploy this file to 300 cameras programmingly?
is there an sdk ?
or do we have to manually copy the file to each camera and make manual operations for it to load the db created in the host?
If there are some documents/code sample about updating the cameras with the db it would be great .
thanks
-
Hello ,
I managed to create the db file using host mode .I have several open questions I would thank you if you could answer:
1. I noticed there is an export option and an import option (JSON) . - so why do we need the db file ?(since we can import and export using the json format)
2. I need a c/C++ sample of how to upload the json or the db (created by the host) to a camera . Can you please send me ?
Thanks
-
Hi Ualtboum,
I apologize for the previously proposed solution which is importing the db file from the host to the device. There is a robust way without importing the db file manually.
In Host mode, the faceprints database (db) file is stored outside of the RealSense ID, on a central PC so that all of the Raspberry Pis can access the faceprints db over a network. Use the server mode APIs ExtractFaceprintsForEnroll, ExtractFaceprintsForAuth, and MatchFaceprints. Refer to host_mode.cc for an example of how to use the host mode APIs.
Enrollment Flow
1.Person enrolls on RealSenseID connected to a device of choice.
2. The device extracts the faceprint from the RealSenseID, using ExtractFaceprintsForEnroll, and saves the faceprint to the faceprints database which is stored in a central location, such as a PC.
Authenication Flow
1.Person authenticates on RealSenseID connected to device of choice. The device must have access to the central location where the faceprints db is stored.
2. The device extracts the faceprint from the RealSenseID using ExtractFaceprintsForAuth.
3. The device calls MatchFaceprints to compare user faceprint to faceprints in the centralized faceprints db.
The attached picture shows the flow graphically. -
Hello ,
thanks for the information .
I tried to figure it out but it is too complex . I looked for a place to specify the ip address of the remote pc central station and could not find any sample showing the remote clients connecting to host and checking the face .
can you please try to assist:
1 . is the host_mode.cc suppose to run on the client (PI in our case) or the central pc station?
2. Where is the sample running on the other side?
in other words we need a client code and a server code and some example how to connect between them .
any information would be appreciated to overcome the confusion .
Many thanks for your help .
-
to make my question a bit more clear :
I noticed that this code should run on our PI and connect some how to the main station to get the auth .
In the following code I do not see and connection details such as IP address of the host central pc so I do not understand how to connect to it . Is there a full code example showing both the server and the client side?
// extract faceprints using enrollment flow class MyEnrollServerClbk : public RealSenseID::EnrollmentCallback { const char* _user_id = nullptr; public: explicit MyEnrollServerClbk(const char* user_id) : _user_id {user_id} { } void OnResult(const RealSenseID::EnrollStatus status, const Faceprints* faceprints) override { std::cout << "result: " << status << "for user: " << _user_id << std::endl; s_extraction_status = status; // if status was success pass '_faceprints' to user } void OnProgress(const RealSenseID::FacePose pose) override { std::cout << "pose: " << pose << std::endl; } void OnHint(const RealSenseID::EnrollStatus hint) override { std::cout << "hint: " << hint << std::endl; } }; MyEnrollServerClbk enroll_clbk {user_id.c_str()}; auto status = authenticator->ExtractFaceprintsForEnroll(enroll_clbk);
-
Hello ,
we are interested in the solution of exporting the host db file to all PIs .
we asked a couple days ago the following and we would thank you if you can respond since we need to proceed with this project .
How can we import the db file to the resberry PI?
is there an API sdk funtion that loads imports it?or should it be placed on a specific directory?
please advice.
thanks
Please sign in to leave a comment.
Comments
47 comments