0

I am trying to calculate pose similarity, the first approach that I am using is the cosine similarity betweenkeypoints+probability of two positions like this:

(dot(a, b)/(norm(a)*norm(b)))

a is equal to

array([        625,       353.5,     0.96826,         641,      384.75,     0.96582,         640,      347.25,     0.95898,         627,       462.5,     0.32837,         627,         389,     0.65186,         482,       476.5,     0.79199,         544,      397.25,     0.74854,      269.25,         513,     0.61719,
             357.5,         347,     0.47656,         217,      333.25,     0.73047,         257,       292.5,     0.61621,         260,       362.5,     0.33862,       305.5,       309.5,     0.30249,      297.75,       267.5,     0.48828,       262.5,      208.38,     0.41943,      197.75,         240,     0.47705,
            185.12,      140.88,     0.42188])

b is equal to

array([      478.5,       191.5,     0.99854,         511,      161.12,     0.99902,         449,      157.38,     0.99609,         550,      182.25,     0.97266,       410.5,      173.88,     0.83789,         622,       327.5,     0.95654,       348.5,         337,     0.96729,         675,       546.5,     0.64502,
               345,         571,     0.76611,         660,         641,     0.57129,       544.5,         494,     0.73145,         593,       628.5,     0.21606,       426.5,       634.5,     0.23352,         600,         574,    0.019791,       461.5,       584.5,    0.023865,         541,         580,   0.0097122,
               466,         573,    0.011032])

And the result is 0.8573987734897349

another option is to calculate with the prediction probability where

array([        625,       353.5,         641,      384.75,         640,      347.25,         627,       462.5,         627,         389,         482,       476.5,         544,      397.25,      269.25,         513,       357.5,         347,         217,      333.25,         257,       292.5,         260,       362.5,
             305.5,       309.5,      297.75,       267.5,       262.5,      208.38,      197.75,         240,      185.12,      140.88])

b is equal to

array([      478.5,       191.5,         511,      161.12,         449,      157.38,         550,      182.25,       410.5,      173.88,         622,       327.5,       348.5,         337,         675,       546.5,         345,         571,         660,         641,       544.5,         494,         593,       628.5,
             426.5,       634.5,         600,         574,       461.5,       584.5,         541,         580,         466,         573])

The result 0.8573992792871371

The poses are really different I cannot share by license

I found the following formula here https://medium.com/@cavaldovinos/human-pose-estimation-pose-similarity-dc8bf9f78556

enter image description here

But I am not sure if I am coding correctly:

![d²_{i}]

points = np.array([*zip(a[::2], a[1::2])])
euclidean_distances = [np.linalg.norm(a-b) for a,b in points]
euclidean_distances_root = np.power(euclidean_distances, 2)

about the keypoint constant, I take from this:

researchgate.net/figure/Keypoint-constants-kidocumentclass12ptminimal-usepackageamsmath_fig5_353777252

and code like:

keypoints = np.array([0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089])

The problem is that I am not sure what is s and how can I get v_{i}

So how can I calculate this?

Thanks

Tlaloc-ES
  • 4,825
  • 7
  • 38
  • 84

0 Answers0