日韩专区一区,亚洲va综合va国产va中文,黄色精品国产,欧美黑人一级视频

人體動作識別

人體動作識別

人體動作識別

樣例準備

  1. 獲取源碼包。
    可以使用以下兩種方式下載,請選擇其中一種進行源碼準備。

    • 命令行方式下載(下載時間較長,但步驟簡單)。
      # 開發環境,非root用戶命令行中執行以下命令下載源碼倉。    
      cd ${HOME}     
      git clone https://gitee.com/ascend/samples.git
       
      注:如果需要切換到其它tag版本,以v0.5.0為例,可執行以下命令。
      git checkout v0.5.0
       
    • 壓縮包方式下載(下載時間較短,但步驟稍微復雜)。
      注:如果需要下載其它版本代碼,請先請根據前置條件說明進行samples倉分支切換。
       # 1. samples倉右上角選擇 【克隆/下載】 下拉框并選擇 【下載ZIP】。    
       # 2. 將ZIP包上傳到開發環境中的普通用戶家目錄中,【例如:${HOME}/ascend-samples-master.zip】。     
       # 3. 開發環境中,執行以下命令,解壓zip包。     
       cd ${HOME}    
       unzip ascend-samples-master.zip
       
  2. 模型轉換。

    模型名稱 模型說明 模型下載路徑
    openpose 人體骨骼關鍵點檢測模型。 https://gitee.com/ascend/modelzoo/blob
    /9bf8402aca694dd602be536b5d7ff782c5e8c4e4
    /contrib/TensorFlow/Research/cv
    /%20gesturedetection/ATC_OpenPose_caffe_AE
    STGCN 人體動作識別模型。 https://gitee.com/ascend/modelzoo/tree
    /9bf8402aca694dd602be536b5d7ff782c5e8c4e4
    /contrib/TensorFlow/Research/cv
    /%20gesturedetection/ATC_STGCN_tf_AE
    # 為了方便下載,在這里直接給出原始模型下載及模型轉換命令,可以直接拷貝執行。也可以參照上表在modelzoo中下載并手工轉換,以了解更多細節。     
    
    cd $HOME/samples/cplusplus/contrib/gesturedetection/model    
    wget https://modelzoo-train-atc.obs.cn-north-4.myhuaweicloud.com/003_Atc_Models/AE/ATC%20Model/gesturedetection/pose_iter_440000.caffemodel 
    wget https://modelzoo-train-atc.obs.cn-north-4.myhuaweicloud.com/003_Atc_Models/AE/ATC%20Model/gesturedetection/pose_deploy.prototxt
    wget https://modelzoo-train-atc.obs.cn-north-4.myhuaweicloud.com/003_Atc_Models/AE/ATC%20Model/gesturedetection/insert_op.cfg
    wget https://modelzoo-train-atc.obs.cn-north-4.myhuaweicloud.com/003_Atc_Models/AE/ATC%20Model/gesturedetection/stgcn_fps30_sta_ho_ki4.pb
    atc --input_shape="input_features:1,2,30,14" --input_format=NCHW --output="./stgcn_fps30_sta_ho_ki4" --soc_version=Ascend310 --framework=3 --model=./stgcn_fps30_sta_ho_ki4.pb
    atc --input_shape="data:1,3,128,128" --weight="./pose_iter_440000.caffemodel" --input_format=NCHW --output="./pose_deploy" --soc_version=Ascend310 --insert_op_conf=./insert_op.cfg --framework=0 --model=./pose_deploy.prototxt 
    
     

樣例部署

執行以下命令,執行編譯腳本,開始樣例編譯。

cd  $HOME/samples/cplusplus/contrib/gesturedetection/scripts    
bash sample_build.sh
 

樣例運行

  1. 執行以下命令,將開發環境的 gesturedetection 目錄上傳到運行環境中,例如 /home/HwHiAiUser,并以HwHiAiUser(運行用戶)登錄運行環境(Host)。

    # 【xxx.xxx.xxx.xxx】為運行環境ip,200DK在USB連接時一般為192.168.1.2,300(ai1s)為對應的公網ip。
    scp -r $HOME/samples/cplusplus/contrib/gesturedetection/ HwHiAiUser@xxx.xxx.xxx.xxx:/home/HwHiAiUser    
    ssh HwHiAiUser@xxx.xxx.xxx.xxx     
    cd $HOME/samples/cplusplus/contrib/gesturedetection/scripts
     
  2. 執行運行腳本,開始樣例運行。

    bash sample_run.sh
     

查看結果

運行完成后,會在運行環境的命令行中打印出推理結果。

常見錯誤

請參考常見問題定位對遇到的錯誤進行排查。如果wiki中不包含,請在samples倉提issue反饋。

 
 

訂閱快訊

通過快訊訂閱,您將及時收到我們的信息更新通知。