Model with rotation and world coords
This commit is contained in:
@@ -12,12 +12,7 @@ FORMAT = '%(asctime)-15s %(message)s'
|
||||
logging.basicConfig(filename="hpe_mp_class.log", level=logging.INFO, format=FORMAT)
|
||||
logger = logging.getLogger("hpe_mp_class_logger")
|
||||
|
||||
from ModelUE4 import bodyconvert
|
||||
from ModelUE4 import rhandconvert
|
||||
from ModelUE4 import lhandconvert
|
||||
from ModelUE4 import bodyaposeworld
|
||||
from ModelUE4 import bodyaposelocal
|
||||
from ModelUE4 import bodyconvertlocal
|
||||
from ModelUE4 import *
|
||||
|
||||
class hpe_mp_class():
|
||||
|
||||
@@ -175,6 +170,7 @@ class hpe_mp_class():
|
||||
bodyaposelocal(data)
|
||||
else:
|
||||
if world:
|
||||
bodyaposeworld(data)
|
||||
if self.holistic_use:
|
||||
poseslms = {}
|
||||
maxy = 0
|
||||
@@ -184,14 +180,18 @@ class hpe_mp_class():
|
||||
if lm.y > maxy:
|
||||
maxy = lm.y
|
||||
|
||||
bodyconvert(poseslms, data, self.coef, maxy)
|
||||
# bodyconvert(poseslms, data, self.coef, maxy)
|
||||
bodyconvertwithrot(poseslms, data, self.coef, maxy)
|
||||
|
||||
rhandlms = {}
|
||||
if self.results_hol.right_hand_landmarks:
|
||||
for id, lm in enumerate(self.results_hol.right_hand_landmarks.landmark):
|
||||
rhandlms[id] = lm
|
||||
|
||||
rhandconvert(rhandlms, data, self.coef)
|
||||
# rhandconvert(rhandlms, data, self.coef)
|
||||
rhandconvertwithrot(rhandlms, data, self.coef)
|
||||
else:
|
||||
rhandconverttranslation(data)
|
||||
|
||||
lhandlms = {}
|
||||
if self.results_hol.left_hand_landmarks:
|
||||
@@ -199,6 +199,9 @@ class hpe_mp_class():
|
||||
lhandlms[id] = lm
|
||||
|
||||
lhandconvert(lhandlms, data, self.coef)
|
||||
lhandconvertwithrot(lhandlms, data, self.coef)
|
||||
else:
|
||||
lhandconverttranslation(data)
|
||||
else:
|
||||
bodyaposelocal(data)
|
||||
if self.holistic_use:
|
||||
|
||||
Reference in New Issue
Block a user