-
Notifications
You must be signed in to change notification settings - Fork 10
/
MotionTraceBulkList_en.bat
127 lines (101 loc) · 3.36 KB
/
MotionTraceBulkList_en.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
@echo off
rem ---
rem --- 映像データから各種トレースデータを揃えてvmdを生成する
rem --- 複数映像対応バージョン
rem ---
cls
rem -----------------------------------
rem 各種ソースコードへのディレクトリパス(相対 or 絶対)
rem -----------------------------------
rem --- Openpose
set OPENPOSE_DIR=..\openpose-1.5.1-binaries-win64-gpu-python-flir-3d_recommended\openpose
rem --- OpenposeDemo.exeのあるディレクトリパス(PortableDemo版: bin, 自前ビルド版: Release)
set OPENPOSE_BIN_DIR=bin
rem --- 3d-pose-baseline-vmd
set BASELINE_DIR=..\3d-pose-baseline-vmd
rem -- 3dpose_gan_vmd
set GAN_DIR=..\3dpose_gan_vmd
rem -- mannequinchallenge-vmd
set DEPTH_DIR=..\mannequinchallenge-vmd
rem -- VMD-3d-pose-baseline-multi
set VMD_DIR=..\VMD-3d-pose-baseline-multi
cd /d %~dp0
rem --- 入力対象パラメーターファイルパス
echo Please enter the full path of the parameter setting list file to be analyzed.
echo This setting is available only for half size alphanumeric characters, it is a required item.
set TARGET_LIST=
set /P TARGET_LIST=** Analysis target list file path:
rem echo INPUT_VIDEO:%INPUT_VIDEO%
IF /I "%TARGET_LIST%" EQU "" (
ECHO Analysis target list file path is not set, therefore, processing is aborted.
EXIT /B
)
SETLOCAL enabledelayedexpansion
rem -- ファイル内をループして全件処理する
for /f "tokens=1-7 skip=1" %%m in (%TARGET_LIST%) do (
echo ------------------------------
echo Input target video file path: %%m
echo Frame number to start analysis: %%n
echo Maximum number of people in the image: %%o
echo Detailed log[yes/no/warn]: %%p
echo Analysis end frame number: %%q
echo Reverse specification list: %%r
echo Sequential list: %%s
rem --- パラメーター保持
set INPUT_VIDEO=%%m
set FRAME_FIRST=%%n
set NUMBER_PEOPLE_MAX=%%o
set VERBOSE=2
set IS_DEBUG=%%p
set FRAME_END=%%q
set REVERSE_SPECIFIC_LIST=%%r
set ORDER_SPECIFIC_LIST=%%s
IF /I "!IS_DEBUG!" EQU "yes" (
set VERBOSE=3
)
IF /I "!IS_DEBUG!" EQU "warn" (
set VERBOSE=1
)
rem -- 実行日付
set DT=!date!
rem -- 実行時間
set TM=!time!
rem -- 時間の空白を0に置換
set TM2=!time: =0!
rem -- 実行日時をファイル名用に置換
set DTTM=!DT:~0,4!!DT:~5,2!!DT:~8,2!_!TM2:~0,2!!TM2:~3,2!!TM2:~6,2!
echo now: !DTTM!
rem -- Openpose 実行(質問なし)
cd /d %~dp0
call BulkOpenposeSilent.bat
echo BULK OUTPUT_JSON_DIR: !OUTPUT_JSON_DIR!
cd /d %~dp0
rem -----------------------------------
rem --- JSON出力ディレクトリ から index別サブディレクトリ生成
FOR %%i IN (!OUTPUT_JSON_DIR!) DO (
set OUTPUT_JSON_DIR_PARENT=%%~dpi
set OUTPUT_JSON_DIR_NAME=%%~ni
)
rem -- mannequinchallenge-vmd実行
call BulkDepth.bat
rem -- キャプチャ人数分ループを回す
for /L %%i in (1,1,!NUMBER_PEOPLE_MAX!) do (
set IDX=%%i
rem -- 3d-pose-baseline実行
call Bulk3dPoseBaseline.bat
rem -- 3dpose_gan実行
rem call Bulk3dPoseGan.bat
rem -- VMD-3d-pose-baseline-multi 実行
call BulkVmd.bat
)
echo ------------------------------------------
echo トレース結果
echo json: !OUTPUT_JSON_DIR!
echo vmd: !OUTPUT_SUB_DIR!
echo ------------------------------------------
rem -- カレントディレクトリに戻る
cd /d %~dp0
)
ENDLOCAL
rem -- カレントディレクトリに戻る
cd /d %~dp0