Git Product home page Git Product logo

Comments (11)

takuya-takeuchi avatar takuya-takeuchi commented on May 23, 2024

simple_object_detetor is missing in C++ api.
It is typedef and defined in the below.
https://github.com/davisking/dlib/blob/master/tools/python/src/simple_object_detector.h

However, maybe there is not some C# api corresponds to above.

from dlibdotnet.

vinicius121 avatar vinicius121 commented on May 23, 2024

Hi,

Thanks for answering. Is there a way to import this to the DlibDotNet?

Thanks,

Vinícius

from dlibdotnet.

takuya-takeuchi avatar takuya-takeuchi commented on May 23, 2024

You have to implement these C++ APIs in DlibDotNet.Native project and wrap them in DlibDotNet.
In any case, it may not be easy.

In the near future, I might as well implement. However, I am writing the dnn face recognition wrapper. So I have no time and I can not work on now. I'm verry sorry.

from dlibdotnet.

postacik avatar postacik commented on May 23, 2024

Great to hear that you are working on the face recognition wrapper. I think it will be used by many projects.

from dlibdotnet.

takuya-takeuchi avatar takuya-takeuchi commented on May 23, 2024

Hi, I'm sorry for delay report.
I ported examples\fhog_object_detector_ex.cpp to C#.
https://github.com/takuya-takeuchi/DlibDotNet/tree/develop/examples/FHogObjectDetector

This sample is similar with simple_object_detector.h.

Have a try!

from dlibdotnet.

vinicius121 avatar vinicius121 commented on May 23, 2024

Hi,

No worries. Thanks for implementing it.
I already have a detector trained in python to detect an object.
Now, I'm trying to run the detector to detect the object in real time using a webcam.
From what I understood when analyzing the code you use this detector.Deserialize("detector.svm"); to recall the detector, right?
Then you use detector.Operator(); to detect the object in an image?
Finally, I'm using OpenCVSharp 3 to capture the frames by using VideoCapture. Then, I convert it to Mat. My problem now is how do I convert Mat to Matrix<byte>?

Thanks,

Vinícius Silva

from dlibdotnet.

takuya-takeuchi avatar takuya-takeuchi commented on May 23, 2024

detector.Deserialize("detector.svm"); to recall the detector, right?

it’s not meaningful. in original sample code, this statement only demonstrate how to reuse trained model.

detector.Operator(); to detect the object in an image?

Correct.
Operator returns bounding boxes.

My problem now is how do I convert Mat to Matrix?

I often use OpenCvSharp3.
First, You copy Mat.data to managed array.
Then you can use LoadImageData and Matrix constructor.

I guess some developer use dlib and opencv.
Therefore, I will create sample to demonstrate how to convert data dlib to opencv, vice versa.

from dlibdotnet.

takuya-takeuchi avatar takuya-takeuchi commented on May 23, 2024

Hi vinicius121
I ported examples\webcam_face_pose_ex.cpp to C#.
https://github.com/takuya-takeuchi/DlibDotNet/tree/develop/examples/WebcamFacePose

The above sample use OpenCVSharp3 to use WebCam and covert Mat to Array2D.

Have a try!

from dlibdotnet.

omdxp avatar omdxp commented on May 23, 2024

Hi takuya-takeuchi
I saw your WebcamFacePose example but I got an error
When I use Marshal.Copy method it gives me this error : "Argumen 1 : cannot convert from 'System.array' to 'int[]'"

from dlibdotnet.

takuya-takeuchi avatar takuya-takeuchi commented on May 23, 2024

When I use Marshal.Copy method it gives me this error : "Argumen 1 : cannot convert from 'System.array' to 'int[]'"

Go to #112

from dlibdotnet.

omdxp avatar omdxp commented on May 23, 2024

Okay

from dlibdotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.