MediaPipe.NET icon indicating copy to clipboard operation
MediaPipe.NET copied to clipboard

[WIP] July 2024 Update

Open GeorgeS2019 opened this issue 1 year ago • 4 comments

[This is WIP status of getting a clearer picture why this project is NOT working]

Read the general instruction from @TheWorldEndsWithUs https://github.com/cosyneco/MediaPipe.NET/issues/65#issuecomment-2065380347

@swety2003 Need to understand why this repos has a new commit that restore the missing c# files https://github.com/swety2003/MediaPipe.NET/tree/master/Mediapipe.Net/Framework

@kaymyst

Need to understand why this repos, claimed to have OpenCVSharp example working but are missing many c# files in the swety2023 repos https://github.com/kaymyst/MediaPipe.NET/tree/master/Mediapipe.Net

GeorgeS2019 avatar Jul 26 '24 09:07 GeorgeS2019

For one of my projects, I need to use the FaceMesh part of MediaPipe. Strangely, I only found the FaceMesh functionality and its examples in version 0.8.9 of this repository, but the latest version has removed thesse files. Therefore, I tried to migrate the relevant files to the latest version, and eventually, it worked well.

Below is an example of using FaceMesh with OpenCVSharp4 on Windows. Please make sure to get the .pbtxt file.

var calculator = new FaceMeshCpuCalculator();
calculator.Run();
calculator.OnResult += Calculator_OnResult;

var Capture = new VideoCapture(0);
Mat frame = new Mat();
Capture.Read(frame);
ImageFrame imgframe = new ImageFrame(ImageFormat.Types.Format.Srgb,
    frame.Width, frame.Height, step, frame.Data, a => { });
calculator.Send(imgframe);



private void Calculator_OnResult(object? sender, List<NormalizedLandmarkList> e)
{
    // get results
}

swety2003 avatar Jul 26 '24 12:07 swety2003

@swety2003 the main challenge are the out of date .pbtxt file.

I have problem finding those used by the 0.8.9 version.

If you have a working version, even for 0.8.9 repos, it would be great if you could share

GeorgeS2019 avatar Aug 07 '24 08:08 GeorgeS2019

These files can be found at https://github.com/google-ai-edge/mediapipe/tree/master/mediapipe/graphs/face_mesh

swety2003 avatar Aug 09 '24 00:08 swety2003

https://github.com/Coloryr/Mediapipe-Sharp

GeorgeS2019 avatar Dec 11 '24 22:12 GeorgeS2019