-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Snapshots for Facial Recognition #547
Comments
The streaming is set up to take any ffmpeg arguments that you would like to supply. I'm not an ffmpeg expert, so I can't say the best way to fetch snapshots from the live stream. If you want to get the snapshots using the more traditional approach, you can use Sounds like a fun experiment you are working on and I wish you luck. |
Hi @bachdinhnhan, Funny enough, I just did a similar project to this, albeit a bit simpler than what you want. I wanted to save videos from my ring only while a person is in the frame. For facial recognition, you're going to need OpenCV. The essence of your ffmpeg command is correct. You either use I chose to transcode my stream to PNGs since the format is easy to work with. I wrote a little PNG unpacker that you can use to separate individual PNGs from a stream. Then, OpenCV can read in that raw data. So, I have about 90% of the problem solved for you, with code. However, I only needed an object detection model. But you will need a facial recognition model fine-tuned on the members of your household. As a side note, you'll want a to choose a model than can infer in real-time. Because I noticed that if detection takes too long ffmpeg will fall behind the stream and start dropping packets. Everything will become a distorted mess. Best of luck |
Feature Request / Seeking advices
Description
One use case is create a facial recognition system to learn/recognize every family/relative members. From that the system can do many useful things:Solution
Comment
I'm about to implement such system and stuck at step 1 in solution section. Please give me some advices how to extract snapshots from video streaming.
Code to extract images from stream
const ringRtpOptions = await sipSession.start({ output: [ '-f', 'image2', '-r', '1/3', path.join(outputDirectory,
${now}-%02d.jpeg) ], }),
Thank you
The text was updated successfully, but these errors were encountered: