deepstream-services-library icon indicating copy to clipboard operation
deepstream-services-library copied to clipboard

support face alignment before recog?

Open HappyKerry opened this issue 1 year ago • 4 comments

After get keypoints , do face alignment before recog ,how to? thanks

HappyKerry avatar Jul 12 '23 03:07 HappyKerry

@HappyKerry my apologies for the slow response. Can you please expand on your question? I have not done anything with face recognition. My work and experience are more on the gstreamer / deepstream deployment side.

And sorry, I am not familiar with "After get keypoints" ... are you looking for a model to do face alignment?

Again, more information would be useful and appreciated.

rjhowell44 avatar Jul 15 '23 20:07 rjhowell44

@HappyKerry my apologies for the slow response. Can you please expand on your question? I have not done anything with face recognition. My work and experience are more on the gstreamer / deepstream deployment side.

And sorry, I am not familiar with "After get keypoints" ... are you looking for a model to do face alignment?

Again, more information would be useful and appreciated.

Many thans for your respose, face alignment is some image translation operations, like rotate the face to a target angle. I can implement them using OpenCV packages (like cv2.warpAffine) or other packages. My question here is that, how can I put such operations into deepstream pipeline, and make the pipeline to be: face detect → landmark detect → get face images landmarks to alignment by using opencv → put the processed images into pipeline again → face recognition

HappyKerry avatar Jul 17 '23 03:07 HappyKerry

@HappyKerry I would first check to see if there is something available on the NVIDIA container site . If not, you may need to create your own custom gstreamer plugin, see the Plugin Writer's Guide.

The other thing you could consider would be to use two Pipelines, one with an app-sink, the second with an app-source. With the app-sink, clients can receive buffers from a pipeline... and with the app-source, clients can push buffers to a pipeline.

So, in your client callback code, you would receive buffers from the first Pipeline, do the face alignment on the raw buffers, then push the updated buffers to the second Pipeline to complete the process. This might not be the most efficient, but would be the easiest way to get started. Once developed, you could then consider moving the code into a plugin.

Let me know if this sound interesting and I can get you some more info to get started.

rjhowell44 avatar Jul 19 '23 18:07 rjhowell44

It's related issue by mentioned me (#1029

YoungjaeDev avatar Jul 31 '23 08:07 YoungjaeDev