Git Product home page Git Product logo

Comments (6)

EnoxSoftware avatar EnoxSoftware commented on May 29, 2024

Thank you very much for reporting.

The MagicLeapFaceDetectionExample is based on the VideoCaptureExample.
Does VideoCaptureExample with the following line commented out work in rawVideoCaptureMode for more than 2 minutes?
https://github.com/magicleap/MagicLeapUnitySDK/blob/master/Assets/MagicLeap/Examples/Scripts/VideoCaptureExample.cs#L136-L143

from magicleapwithopencvforunityexample.

artiransaygin avatar artiransaygin commented on May 29, 2024

It is already commented out and unfortunately, it pauses after 2 minutes. I tried including those commented out parts and increased the max recording time to 100 minutes but it did not change anything. I think memory overloads after around 2 minuted but disposing variable like "yuvMat" or "rgbMat" crashes the app without even starting.

I checked methods like "OnDestroy", "EndCapture", "DisableMLCamera", "OnDisable", etc. and none of them are being entered before the pause. In addition, I checked the bool variable "_isCapturing", "_isCameraConnected", "_hasStarted" and "_appPaused" to see if they are chenged to trigger a pause but they are not. "_appPaused" is false even though the capture stops. In addition, capture resumes when I press the bumper again.

from magicleapwithopencvforunityexample.

EnoxSoftware avatar EnoxSoftware commented on May 29, 2024

Does VideoCaptureExample's rawVideoCaptureMode work for more than 2 minutes?

from magicleapwithopencvforunityexample.

artiransaygin avatar artiransaygin commented on May 29, 2024

Yes, it definitely runs for more than 2 minutes and actually looks like it can go on forever.

Update: I increased the value of "scaleFactor" parameter in "detectMultiScale" to decrease the workload caused by detection and now the application runs for at least 10 minutes which is a big upgrade. However, now that the quality of detection decreased due to the increase in "scaleFactor", sometimes I get multiple bounding boxes for a single face and I want to select the one with the higher confidence. I checked the code but couldn't find a way to obtain bounding box confidence values. Is there way to get them?

from magicleapwithopencvforunityexample.

EnoxSoftware avatar EnoxSoftware commented on May 29, 2024

It is recommended to adjust the minNeighbors parameter.
https://stackoverflow.com/questions/22249579/opencv-detectmultiscale-minneighbors-parameter

For confidence levels, it seems you can get rejectLevels and levelWeights.
https://enoxsoftware.github.io/OpenCVForUnity/3.0.0/doc/html/class_open_c_v_for_unity_1_1_objdetect_module_1_1_cascade_classifier.html#ab492876a1b8dfcb4986acac71c24ba97

from magicleapwithopencvforunityexample.

artiransaygin avatar artiransaygin commented on May 29, 2024

I fixed the issue by slightly decreasing the scale factor so that it applies a more thorough detection.

from magicleapwithopencvforunityexample.

Related Issues (15)

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.