Giter VIP home page Giter VIP logo

Comments (5)

geaxgx avatar geaxgx commented on August 17, 2024

Hi, instead of doing N requests where each request retrieves data for 1 landmark, you can do only 1 request for the N landmarks.
Currently in my code, you have:

cfg.setROIs([conf_data])

You could have instead something like:
cfg.setROIs([conf_data_1, conf_data_2, ...conf_data_N])
so with one conf_data_i for every landmark you want.
It should be faster as there would be only one round-trip.

from depthai_blazepose.

bruno-darochac avatar bruno-darochac commented on August 17, 2024

I'm currently using the "On Edge" version of your module, and this code is non present do I have to modify int template_manager_script.py those lines :

conf_data.roi = Rect(rect_center, rect_size)
cfg = SpatialLocationCalculatorConfig()
cfg.addROI(conf_data)

to

conf_data_1.roi = Rect(body.landmarks_1, body.landmarks_1)
conf_data_2.roi = Rect(body.landmarks_2, body.landmarks_2)
...
cfg = SpatialLocationCalculatorConfig()
cfg.addROI([conf_data_1, conf_data_2, ...])

from depthai_blazepose.

bruno-darochac avatar bruno-darochac commented on August 17, 2024

I've try something else. I've linked the stereo depth capture to the script as :
stereo.depth.link(manager_script.inputs['depth_data'])

And then try to get it in the script as :

${_TRACE} ("Receiving depth DATA")
depth_link = node.io['depth_data'].get()
tmp = depth_link.getFrame()

But the getFrame attribute doesn't exist for "lpb.ImgFrame", but when i look at the documentation of luxonis, I can see that in the object ImgFrame implement the method getFrame, but when I try any other method of ImgFrame it works but I'm not able to print anything, I got this error :

[18443010C1BD6F0E00] [3.1] [51.040] [Script(2)] [critical] TypeError: warn(): incompatible function arguments. The following argument types are supported:
    1. (self: lpb.Node, arg0: str) -> None

Invoked with: <lpb.Node object at 0x81023620>, 1248

Am doing it wrongly ?

from depthai_blazepose.

geaxgx avatar geaxgx commented on August 17, 2024

You can either use:
cfg.setROIs([conf_data_1, conf_data_2, ...])
or:

cfg.addROI(conf_data_1)
cfg.addROI(conf_data_2)
...

The arguments in your code:
conf_data_1.roi = Rect(body.landmarks_1, body.landmarks_1)
are not correct. It should be somthing like:
conf_data_1.roi = Rect(rect_center_1, rect_size_1)

Why do you want to get the depth frame in the script ?

from depthai_blazepose.

bruno-darochac avatar bruno-darochac commented on August 17, 2024

I want to make it in the script, because, I want the real stereo capture estimation of the landmarks in the scene. And when I've try to implement it on the host size, by just getting the depth frame and match the x y coords of the landmarks in the depth capture. I do it to frequently and so the program slowed and it was not performant. What I wanted to do by making it directly in the script, is too get the positions x, y of the var lms that you created and getting directly their depth position, instead of making tones of request on the camera.
But know that I have tested more your programm, your lms generated are post-traited, and in the script they don't have the x,y frame position.

In my project, I have to generate the landmarks of the body, and by a click event, add a point on the display. The goal is to keep the point always at the same place where he was fixed on the human body. For exemple, if you put it on the arm, I defines vector between shoulder -> point and elbow -> point to keep the generate point always at the same position. Then I need the depth value, because the body can rotate and I have to respect the positon.

It was interessant for the case of my subject goes way of the camera, the size of his body change, and then my position define for a added point, depend on the first capture. Then if the size of the body change, the point will not be at the same place. And I suppose that the depth value could maybe help this kind of problem

But I think that i'll try to make it only with 2D landmarks position that seems quite good for my goal to keep it on the same place.

from depthai_blazepose.

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.