def load_pretrain_model(model): dyn_graph_path = {#预训练模型所在路径 'VGG_origin': str(file_path / "Pose/graph_models/VGG_origin/graph_opt.pb"), 'mobilenet_thin': str(file_path / "Pose/graph_models/mobilenet_thin/graph_opt.pb") } graph_path = dyn_graph_path[model] if not os.path.isfile(graph_path): raise Exception('Graph file doesn\'t exist, path=%s' % graph_path) return TfPoseVisualizer(graph_path, target_size=(input_width, input_height))
def load_pretrain_model(model): dyn_graph_path = { 'VGG_origin': str(file_path / "Pose/graph_models/VGG_origin/graph_opt.pb"), } # print(dyn_graph_path.get('VGG_origin')) # C:\Users\haram\PycharmProjects\OpenBankProject\Pose\graph_models\VGG_origin\graph_opt.pb graph_path = dyn_graph_path[model] if not os.path.isfile(graph_path): raise Exception('Graph file doesn\'t exist, path=%s' % graph_path) return TfPoseVisualizer(graph_path, target_size=(input_width, input_height))
def load_pretrain_model(model): dyn_graph_path = { 'VGG_origin': str(file_path / "Pose/graph_models/VGG_origin/graph_opt.pb"), #pose训练好的 'mobilenet_thin': str(file_path / "Pose/graph_models/mobilenet_thin/graph_opt_mobile.pb") } graph_path = dyn_graph_path[model] if not os.path.isfile(graph_path): raise Exception('Graph file doesn\'t exist, path=%s' % graph_path) #输入:Pose模型文件 目标大小尺寸 return TfPoseVisualizer(graph_path, target_size=(input_width, input_height)) #(656,368) #根据自己的修改