Safemotion Lib
Loading...
Searching...
No Matches
Functions | Variables
cvt_labelmap_c17 Namespace Reference

Functions

 cvt_labelmap_v21 (annotations, cvt_action_info, cvt_pose_info)
 
 cvt_labelmap_v10_pkl (pkl_data, cvt_action_info)
 

Variables

dict labelmap_v10
 
dict labelmap_v20
 
list cvt_labelmap_v10_action_to_simple_ver
 
list eval_table = [0, 0, 0, 0, 4, 4, 6, 7, 4, 9, 10, 10, 12, 13, 14, 15, 16]
 
dict simple_lablemap
 
list cvt_labelmap_v21_action_to_simple_ver
 
list cvt_labelmap_v21_foot_to_simple_ver
 
list cvt_labelmap_v21_pose_to_simple_ver
 
dict simple_mutual_labelmap
 
dict mutual_action_lablemap
 

Function Documentation

◆ cvt_labelmap_v10_pkl()

cvt_labelmap_c17.cvt_labelmap_v10_pkl ( pkl_data,
cvt_action_info )

Definition at line 273 of file cvt_labelmap_c17.py.

273def cvt_labelmap_v10_pkl(pkl_data, cvt_action_info):
274 ret_pkl = copy.deepcopy(pkl_data)
275 for i, anno in enumerate(pkl_data):
276 action_id = anno['label']
277 new_action_id = cvt_action_info[action_id][2]
278
279 ret_pkl[i]['label'] = new_action_id
280
281 return ret_pkl

◆ cvt_labelmap_v21()

cvt_labelmap_c17.cvt_labelmap_v21 ( annotations,
cvt_action_info,
cvt_pose_info )

Definition at line 253 of file cvt_labelmap_c17.py.

253def cvt_labelmap_v21(annotations, cvt_action_info, cvt_pose_info):
254 ret_annotations = copy.deepcopy(annotations)
255 for i, anno in enumerate(annotations):
256 action_id = anno['action_id']['action']
257 new_action_id = cvt_action_info[action_id][2]
258
259 if action_id == 11 or action_id == 12:
260 move_id = anno['action_id']['foot']
261 new_action_id = cvt_labelmap_v21_foot_to_simple_ver[move_id][2]
262 elif new_action_id is None:
263 pose_id = anno['action_id']['pose']
264 new_action_id = cvt_pose_info[pose_id][2]
265
266 if anno['truncation'] > 2 or anno['occlusion'] > 2:
267 new_action_id = -1
268
269 ret_annotations[i]['action_id']['action'] = new_action_id
270
271 return ret_annotations
272

Variable Documentation

◆ cvt_labelmap_v10_action_to_simple_ver

list cvt_labelmap_c17.cvt_labelmap_v10_action_to_simple_ver
Initial value:
1= [
2 [0 , 'walk', 6],
3 [1 , 'stand', 4],
4 [2 , 'sit-Crouch', 2],
5 [3 , 'sit-sofa', 1],
6 [4 , 'sit-chair', 1],
7 [5 , 'sit-floor', 0],
8 [6 , 'falling-falling', 14],
9 [7 , 'lie', 9],
10 [8 , 'punch', 15],
11 [9 , 'kick', 16],
12 [10 , 'falling-fight', 14],
13]

Definition at line 81 of file cvt_labelmap_c17.py.

◆ cvt_labelmap_v21_action_to_simple_ver

list cvt_labelmap_c17.cvt_labelmap_v21_action_to_simple_ver

Definition at line 122 of file cvt_labelmap_c17.py.

◆ cvt_labelmap_v21_foot_to_simple_ver

list cvt_labelmap_c17.cvt_labelmap_v21_foot_to_simple_ver
Initial value:
1= [
2 [0, "없음", None],
3 [1, "이동-느리게",6],
4 [2, "이동-빠르게",7],
5 [3, "이동-물건 위로",None],
6 [4, "이동-계단 오르기",None],
7 [5, "이동-계산 내려가기",None],
8]

Definition at line 184 of file cvt_labelmap_c17.py.

◆ cvt_labelmap_v21_pose_to_simple_ver

list cvt_labelmap_c17.cvt_labelmap_v21_pose_to_simple_ver
Initial value:
1= [
2 [0, "앉기-바닥", 0],
3 [1, "앉기-의자", 1],
4 [2, "앉기-무릎꿇기", 0],
5 [3, "앉기-무릎서기", 4],
6 [4, "앉기-쪼그리기", 2],
7 [5, "서있기", 4],
8 [6, "서있기-한발들기", 4],
9 [7, "서있기-무릎구부리기", 4],
10 [8, "서있기-허리구부리기", 5],
11 [9, "누워있기-천장보고", 9],
12 [10, "누워있기-엎드리기", 9],
13 [11, "누워있기-옆으로", 9],
14 [12, "누워있기-엎드려 머리들기", 9],
15 [13, "누워있기-구부리기", 9],
16 [14, "무릎기기 자세", 11]
17]

Definition at line 193 of file cvt_labelmap_c17.py.

◆ eval_table

list cvt_labelmap_c17.eval_table = [0, 0, 0, 0, 4, 4, 6, 7, 4, 9, 10, 10, 12, 13, 14, 15, 16]

Definition at line 97 of file cvt_labelmap_c17.py.

◆ labelmap_v10

dict cvt_labelmap_c17.labelmap_v10
Initial value:
1= {
2 0 : 'walk',
3 1 : 'stand',
4 2 : 'sit-Crouch',
5 3 : 'sit-sofa',
6 4 : 'sit-chair',
7 5 : 'sit-floor',
8 6 : 'falling-falling',
9 7 : 'lie',
10 8 : 'punch',
11 9 : 'kick',
12 10 : 'falling-fight',
13 11 : 'plunging',
14 12 : 'sit',
15 13 : 'falling'
16}

Definition at line 3 of file cvt_labelmap_c17.py.

◆ labelmap_v20

dict cvt_labelmap_c17.labelmap_v20

Definition at line 20 of file cvt_labelmap_c17.py.

◆ mutual_action_lablemap

dict cvt_labelmap_c17.mutual_action_lablemap
Initial value:
1= {
2 0 : "None",
3 1 : "안겨있기", #
4 2 : "안고있기", #
5 3 : "영유아를 들어서 이동", #
6 4 : "옷(기저귀) 갈아입히기", #
7 5 : "쓰다듬기", #
8 6 : "토닥이기", #
9 7 : "머리따주기",
10 8 : "먹여주기", #
11 9 : "물건 건네주기", #
12 10 : "물건 받기", #
13 11 : "장난감 빼앗기",
14 12 : "손으로 때리기",
15 13 : "물건으로 때리기",
16 14 : "발로 때리기",
17 15 : "신체 밀치기", #
18 16 : "신체 당기기", #
19 17 : "친구와 부딪힘",
20 18 : "할퀴기",
21 19 : "물기"
22}

Definition at line 229 of file cvt_labelmap_c17.py.

◆ simple_lablemap

dict cvt_labelmap_c17.simple_lablemap
Initial value:
1= {
2 0 : "sit",#"앉기",
3 1 : "sit_chair",
4 2 : "sit_squat",
5 3 : "sit_move", #앉은상태로 이동
6 4 : "standing",#"서있기",
7 5 : "bend_over",#허리숙이기
8 6 : "walk",#"걷기",
9 7 : "run",#"뛰기",
10 #8 : "run_galloping", #갤로핑
11 8 : "stand",#"일어서기",
12 9 : "lying",#"누워있기",
13 10 : "crawl",#"기어가기",
14 11 : "crawl_pose",#"기어가기 자세",
15 12 : "jump",#"점프",
16 13 : "eating",#"먹기",
17 14 : "fall-down",#"넘어짐", "떨어짐"
18 15 : "punch", #"펀치"
19 16 : "kick", #"발차기",
20 #18 : "scrawl", #"끼적이기"
21}

Definition at line 100 of file cvt_labelmap_c17.py.

◆ simple_mutual_labelmap

dict cvt_labelmap_c17.simple_mutual_labelmap
Initial value:
1= {
2 0 : "None",
3 1 : "안기",
4 2 : "옷 갈아입히기(서서)",
5 3 : "옷 갈아입히기(눕혀서)",
6 4 : "쓰다듬기",
7 5 : "토닥이기",
8 6 : "머리따주기",
9 7 : "먹여주기",
10 8 : "물건 전달",
11 9 : "밀기",
12 10 : "당기기",
13 11 : "부딪힘",
14 12 : "손으로 때리기",
15 13 : "발로 때리기",
16 14 : "물기"
17}

Definition at line 211 of file cvt_labelmap_c17.py.