Safemotion Lib
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
action_demo_with_anno.py File Reference

Go to the source code of this file.

Namespaces

namespace  action_demo_with_anno
 

Functions

 action_demo_with_anno.make_pose_result (anno_data)
 

Variables

list action_demo_with_anno.sys_path = ['/workspace/smlab', '/workspace']
 
 action_demo_with_anno.action_vis_param
 
 action_demo_with_anno.vis_param
 
str action_demo_with_anno.action_cfg_path = '/workspace/InnoTest/models/posec3d_action.py'
 
str action_demo_with_anno.posture_cfg_path = '/workspace/InnoTest/models/posec3d_pose.py'
 
str action_demo_with_anno.image_base = '/media/safemotion/HDD2/SM_Dataset/action_2022/action_cctv_img/images'
 
str action_demo_with_anno.save_root = '/media/safemotion/HDD5/pjm_test/inno2023_result_select_half'
 
list action_demo_with_anno.anno_folder_list
 
list action_demo_with_anno.cvt_lower_map = [0, 1, 2, 0, 4, 5, 6, 7, 8, 9, 0, 11]
 
list action_demo_with_anno.cvt_upper_map = [0, 0, 0, 3, 4, 0]
 
list action_demo_with_anno.cvt_pose_map = [0, 0, 0, 0, 4, 4, 6, 7]
 
list action_demo_with_anno.cvt_hand_map = [0, 0, 0, 3]
 
str action_demo_with_anno.device = 'cuda:0'
 
 action_demo_with_anno.action_model = smrunner.build_model(action_cfg_path).to(device)
 
 action_demo_with_anno.posture_model = smrunner.build_model(posture_cfg_path).to(device)
 
 action_demo_with_anno.labelmap = dict()
 
list action_demo_with_anno.json_path_list = []
 
 action_demo_with_anno.name_list
 
 action_demo_with_anno.path_list
 
 action_demo_with_anno.NUM = len(json_path_list)
 
int action_demo_with_anno.video_fps = 30
 
int action_demo_with_anno.action_k = video_fps*2
 
int action_demo_with_anno.action_sample = 20
 
int action_demo_with_anno.pose_k = video_fps//2
 
int action_demo_with_anno.pose_sample = 6
 
 action_demo_with_anno.data_manager = AnnotationDataManager()
 
 action_demo_with_anno.json_name = json_path.split('/')[-1]
 
 action_demo_with_anno.save_folder = os.path.join(save_root, json_name.split('.')[0])
 
 action_demo_with_anno.save_video_path = os.path.join(save_root, json_name.replace('.json', '.mp4'))
 
 action_demo_with_anno.json_path
 
dict action_demo_with_anno.track_data = {}
 
int action_demo_with_anno.frame_id = 0
 
 action_demo_with_anno.end
 
 action_demo_with_anno.anno_data = data_manager.get_anno_data_in_image(filter=True)
 
 action_demo_with_anno.image = data_manager.read_image()
 
 action_demo_with_anno.vis_img = image.copy()
 
 action_demo_with_anno.pose_result = make_pose_result(anno_data)
 
 action_demo_with_anno.track_id = int(pose['track_id'])
 
list action_demo_with_anno.delete_list = []
 
int action_demo_with_anno.txt_pos_y = 50
 
 action_demo_with_anno.bbox = pose_q[-1]['bbox']
 
 action_demo_with_anno.last_frame = pose_q[-1]['frame_id']
 
str action_demo_with_anno.label = f'{track_id:3d}'
 
 action_demo_with_anno.action_result = action_model.run_recognizer(pose_q, action_k, action_sample, device=device)
 
 action_demo_with_anno.posture_result = posture_model.run_recognizer(pose_q[-pose_k:], pose_k, pose_sample, False, device=device)
 
list action_demo_with_anno.pose_label = cvt_pose_map[posture_result['pred_pose']]
 
list action_demo_with_anno.upper_label = cvt_upper_map[action_result['pred_action_upper']]
 
list action_demo_with_anno.lower_label = cvt_lower_map[action_result['pred_action_lower']]
 
list action_demo_with_anno.hand_label = cvt_hand_map[posture_result['pred_hand']]
 
str action_demo_with_anno.name = f'{frame_id:06d}.jpg'
 
 action_demo_with_anno.save_path = os.path.join(save_folder, name)
 
 action_demo_with_anno.fps
 
 action_demo_with_anno.half