Comments (8)
Hello. @ramkeshshadowcast .
For multiple person skeltons move one person to another . Can we do to stay on single person ?
BlazePoseBarracuda (and Mediapipe Pose, which base of BlazePoseBarracuda) is supported only one person pose estimation.
So, BlazePoseBarracuda detect random one person when multiple person are visibled.
After detection when user move away from infront of camera ,skelton is still there . I mean creat and destroy . What can be done to not generate if user is not there .
BlazePoseBarracuda output human pose visibilty and landmarks visibilities in every frames. (Please read comment outs in README.md)
So, you can set threshold, and you can operate that do not draw the skelton when human pose or landmarks visibilities are lower than threshold.
The skelton line color is blue if human pose visibilty is lower than threshold in visualize demo in this repository.
Also, The skelton line alpha color is determinated by landmarks visibilities in visualize demo in this repository.
from blazeposebarracuda.
Thanks @creativeIKEP . I got it but it is in Shader scripts . How i can determine isHumanExist >= _humanExistThreshold) ? float4(0, 1, 0, score) : float4(0, 0, 1, score) in PoseVisuallizer Scripts ?.The value _keypointCount which Mediapipe value taking ? .
from blazeposebarracuda.
@ramkeshshadowcast
PoseVisuallize.cs script operates procedural drawing with GPU.
So, values in demo shader scripts are determined by PoseVisuallize.cs script.
The threshold value (that is _humanExistThreshold
in shader script) is determined by humanExistThreshold
variable in PoseVisuallize.cs script, and humanExistThreshold
variable is controlabled in Unity Editor Inspector window.
The value _keypointCount
is set the value of vertexCount
variable in BlazePoseBarracuda Package (= vertexCount
variable in PoseLandmarkBarracuda sub Package), and it is 33 that is Mediapipe pose landmarks count.
from blazeposebarracuda.
Thanks @creativeIKEP . I tried to explore given terms and write code but having issue.
In PoseVisuallize.cs i want to achieve what we are doing in Shader script [Human Exist then green skelton not exist then blue ]. Sharing screenshot of both . In my tried code getting execption[ Red Arrow at line ]. Can you please guide me what i am doing wrong and how i can achieve it ?
from blazeposebarracuda.
@ramkeshshadowcast
I think that var data1 = new Vector4[count];
row is problem.
How many values are in the count
variable?
Length of detector.outputBuffer
is 34 (33 landmark datas + 1 score data).
IndexOutOfRangeException
is happened if the count
variable is 33 or lower.
So, you should convert to 34 for length of the data1
variable.
Or, you should get only score with below code.
var data1 = new Vector4[1];
result.GetData(data, 0, 33, 1);
float v = data1[0].x;
refarence: https://docs.unity3d.com/ScriptReference/ComputeBuffer.GetData.html
Thanks.
from blazeposebarracuda.
@creativeIKEP Thanks a lot . It is really very helpfull .Now it's working fine.
I have one question regaring coordinate system . Accoding to mediapipe documentation it's take hip as orgin . How these coordinates can communicate with Ui screen coordinates ? . I mean is there any way to converts these points in screen coordinates or world coordinates system of unity ? I was trying to get skelton world coordninates [skeloton which show us in scene] but Graphics.DrawProceduralNow generate it in GPU . Not getting a gameobject with transforms .
from blazeposebarracuda.
@ramkeshshadowcast
BlazePoseDetecter.outputBuffer
is data for 2D estimation and (x, y) cordinate value are normilized to [0, 1] by the image width and height.
BlazePoseDetecter.worldLandmarkBuffer
is data for real-world 3D cordinate estimation and (x, y) are landmarks with the origin at the center between hips.
2 different outputs exist.
So,
I show landmark point with converting from [0, 1] to clip position in the 2D visualize demo(2DSampleScene.unity
).
I show landmark point with converting from 3D cordinate to clip position in the 3D visualize demo(3DSampleScene.unity
).
Graphics.DrawProceduralNow
method and the custom shader are used to reduce the overhead time due to data transfer to CPU memory (= ComputeBuffer.GetData
method) in the demo script because BlazePoseBarracuda outputs landmarks on the GPU memory (= ComputeBuffer).
Of course, it would be possible to visualize it by generating gameobjects for each landmark after transferring the data to CPU memory.
from blazeposebarracuda.
I believe this issue is resolved.
I close this issue.
from blazeposebarracuda.
Related Issues (17)
- shader error,my editor is 2022.2.2f1 HOT 3
- Is multiple bodies tracking possible? HOT 1
- 3D Avatar Animation HOT 2
- How do I make main camera stop rotating? HOT 3
- Detecter returns NaN for x,y,z in each (x, y, z, w) Pose World Landmark HOT 4
- How can I speed up at a smartphone? HOT 2
- Use custom onnx converted by mediapipe HOT 1
- 3D Avatar HOT 3
- demo with unity chan avatar HOT 3
- update to support latest MadiaPipe 0.8.11 ? HOT 1
- How can I run this on mobile?
- Get landmark screen position HOT 1
- World Landmark Raw Buffer Output HOT 2
- CPU vs GPU Inference HOT 4
- Linux standalone build HOT 1
- WebGL Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blazeposebarracuda.