forked from gilbeckers/MultiPersonMatching
-
Notifications
You must be signed in to change notification settings - Fork 0
/
z_blog_samples.py
29 lines (22 loc) · 885 Bytes
/
z_blog_samples.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import parse_openpose_json
import prepocessing
import affine_transformation
import pose_match
'''
Some plotties for a blog
'''
json_data_path = 'data/json_data/'
images_data_path = 'data/image_data/'
model = "trap7"
input = "trap9"
model_json = json_data_path + model + '.json'
input_json = json_data_path + input + '.json'
model_image = images_data_path + model + '.jpg'
input_image = images_data_path + input + '.jpg'
model_features = parse_openpose_json.parse_JSON_single_person(model_json)
input_features = parse_openpose_json.parse_JSON_single_person(input_json)
input_features = prepocessing.unpad(input_features)
model_features = prepocessing.unpad(model_features)
(input_trans, A ) = affine_transformation.find_transformation(model_features, input_features)
print(input_trans)
pose_match.plot_match(model_features, input_features, input_trans, model_image, input_image)