main.py 1.9 KB
Newer Older
Eric.Lee2021's avatar
Eric.Lee2021 已提交
1 2 3 4 5 6 7 8 9 10 11
#-*-coding:utf-8-*-
'''
 DpCas-Light
||||      |||||        ||||         ||       |||||||
||  ||    ||   ||    ||    ||      ||||     ||     ||
||    ||  ||    ||  ||      ||    ||  ||     ||
||    ||  ||   ||   ||           ||====||     ||||||
||    ||  |||||     ||      ||  ||======||         ||
||  ||    ||         ||    ||  ||        ||  ||     ||
||||      ||           ||||   ||          ||  |||||||

12
/-------------------- APP_X --------------------/
Eric.Lee2021's avatar
Eric.Lee2021 已提交
13 14 15 16 17 18 19 20 21 22 23 24
'''
# date:2020-10-19.7.23.24
# Author: Eric.Lee
# function: main

import os
import warnings
warnings.filterwarnings("ignore")
import sys
sys.path.append("./components/") # 添加模型组件路径

from applications.handpose_local_app import main_handpose_x #加载 handpose 应用
Eric.Lee2021's avatar
Eric.Lee2021 已提交
25 26
from applications.wyw2s_local_app import main_wyw2s #加载 who you want 2 see 应用
# from applications.video_analysis_app import main_video_analysis #加载 video_analysis 应用
Eric.Lee2021's avatar
Eric.Lee2021 已提交
27 28 29 30
def demo_logo():
    print("\n/*********************************/")
    print("/---------------------------------/\n")
    print("       WELCOME : DpCas-Light      ")
31
    print("        << APP_X >>         ")
Eric.Lee2021's avatar
Eric.Lee2021 已提交
32 33 34 35 36 37 38 39
    print("   Copyright 2021 Eric.Lee2021   ")
    print("        Apache License 2.0       ")
    print("\n/---------------------------------/")
    print("/*********************************/\n")

if __name__ == '__main__':
    demo_logo()

40 41 42 43 44 45 46 47
    APP_P = "wyw2s"

    if APP_P == "handpose_x": # 手势识别
        cfg_file = "./lib/hand_lib/cfg/handpose.cfg"
        main_handpose_x(cfg_file)#加载 handpose 应用
        
    elif APP_P == "wyw2s": # 基于人脸识别的视频剪辑
        cfg_file = "./lib/wyw2s_lib/cfg/wyw2s.cfg"
Eric.Lee2021's avatar
Eric.Lee2021 已提交
48
        main_wyw2s(video_path = "./video/f1.mp4",cfg_file = cfg_file)#加载 who you want 2 see  应用
49

Eric.Lee2021's avatar
Eric.Lee2021 已提交
50 51
    # elif APP_P == "video_ana": # 基于人脸识别的视频剪辑
    #     main_video_analysis(video_path = "./video/f3.mp4")#加载 who you want 2 see  应用
Eric.Lee2021's avatar
Eric.Lee2021 已提交
52
    print(" well done ~")