forked from CMU-Perceptual-Computing-Lab/openpose_train
-
Notifications
You must be signed in to change notification settings - Fork 2
/
a_copyModelsCar.sh.example
77 lines (59 loc) · 2.89 KB
/
a_copyModelsCar.sh.example
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
#!/bin/bash
# Script to copy models from local disk to NAS 3
clear && clear
echo "Common parameters to both files a_*.sh and b_*.sh"
EXPERIMENT=2_22car
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_19_25/
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_19_x2/
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_19_x2/
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_19b/
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_19n/
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_25/
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_25a/
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_25d/
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_25e/
# SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/pose/body_23/
SHARED_FOLDER=/media/posefs3b/Users/gines/openpose_train/training_results/${EXPERIMENT}/car/car_22/
echo " "
echo "Paths"
TRAINING_FOLDER=/home/gines/devel/openpose_train/
MODELS_RELATIVE_FOLDER=training_results/pose/model/
PROTOTXT_RELATIVE_FOLDER=training_results/pose/
echo " "
echo "File names"
PROTOTXT_NAME=*.prototxt
TRAINING_LOG_NAME=*.txt
SET_LAYERS_FILE_NAME1=training/d_setLayers.py
SET_LAYERS_FILE_NAME2=training/generateProtoTxt.py
SET_LAYERS_FILE_NAME3=training/getResNetProtoTxt.py
echo " "
SLEEPING_TIME=600
SLEEPING_TIME_MIN=10
# Different code than b_*.sh
echo "Creating shared folder $SHARED_FOLDER..."
mkdir -p $SHARED_FOLDER
echo " "
while true
do
echo "Copying prototxt and training log from ${TRAINING_FOLDER}${MODELS_RELATIVE_FOLDER}..."
cp -nr ${TRAINING_FOLDER}${PROTOTXT_RELATIVE_FOLDER}${PROTOTXT_NAME} ${SHARED_FOLDER}
cp -f ${TRAINING_FOLDER}${PROTOTXT_RELATIVE_FOLDER}${TRAINING_LOG_NAME} ${SHARED_FOLDER}
echo " "
echo "Copying ${SET_LAYERS_FILE_NAME1} from ${TRAINING_FOLDER}${MODELS_RELATIVE_FOLDER}..."
cp -n ${TRAINING_FOLDER}${SET_LAYERS_FILE_NAME1} ${SHARED_FOLDER}
cp -n ${TRAINING_FOLDER}${SET_LAYERS_FILE_NAME2} ${SHARED_FOLDER}
cp -n ${TRAINING_FOLDER}${SET_LAYERS_FILE_NAME3} ${SHARED_FOLDER}
echo " "
echo "Copying models from ${TRAINING_FOLDER}${MODELS_RELATIVE_FOLDER}..."
for caffemodelFile in ${TRAINING_FOLDER}${MODELS_RELATIVE_FOLDER}*.caffemodel; do
cp -n ${caffemodelFile} ${SHARED_FOLDER}
done
echo " "
# Sleeping
echo "Sleeping ${SLEEPING_TIME} seconds (${SLEEPING_TIME_MIN} minutes)..."
sleep $SLEEPING_TIME
echo "Copying again in 10 seconds"
sleep 10
done
echo "Finished! Exiting script..."
echo " "