Skip to content

Instantly share code, notes, and snippets.

@nulledge
Created January 16, 2018 07:14
Show Gist options
  • Save nulledge/679bb7d7d58a270e65128b08c657e52d to your computer and use it in GitHub Desktop.
Save nulledge/679bb7d7d58a270e65128b08c657e52d to your computer and use it in GitHub Desktop.
import numpy as np
class Joint2String:
# FLIC
L_Shoulder = 'l_shoulder'
R_Shoulder = 'r_shoulder'
L_Elbow = 'l_elbow'
R_Elbow = 'r_elbow'
L_Wrist = 'l_wrist'
R_Wrist = 'r_wrist'
L_Hip = 'l_hip'
R_Hip = 'r_hip'
L_Knee = 'l_knee'
R_Knee = 'r_knee'
L_Ankle = 'l_ankle'
R_Ankle = 'r_ankle'
L_Eye = 'l_eye'
R_Eye = 'r_eye'
L_Ear = 'l_ear'
R_Ear = 'r_ear'
M_Nose = 'm_nose'
M_Shoulder = 'm_shoulder'
M_Hip = 'm_hip'
M_Ear = 'm_ear'
M_Torso = 'm_torso'
M_LUpperArm = 'm_l_upper_arm'
M_RUpperArm = 'm_r_upper_arm'
M_LLowerArm = 'm_l_lower_arm'
M_RLowerArm = 'm_r_lower_arm'
M_LUpperLeg = 'm_l_upper_leg'
M_RUpperLeg = 'm_r_upper_leg'
M_LLowerLeg = 'm_l_lower_leg'
M_RLowerLeg = 'm_r_lower_leg'
# MPII
# M_Pelvis = M_Hip
# M_Thorax = M_Torso
M_UpperNeck = 'm_upper_neck'
M_HeadTOP = 'm_head_top'
import scipy.io
import numpy as np
FLIC = scipy.io.loadmat('FLIC/examples.mat')
filepath_idx = 1
print(np.squeeze(np.squeeze(FLIC['examples']['filepath'])[filepath_idx]))
print(np.squeeze(np.squeeze(FLIC['examples']['imgdims'])[filepath_idx]))
print(np.squeeze(np.squeeze(FLIC['examples']['istrain'])[filepath_idx]))
coord = {'x': 0, 'y': 1}
print(np.squeeze(np.squeeze(np.squeeze(FLIC['examples'])[filepath_idx])['coords'])[coord['x']][7])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment