forked from rizkiarm/LipNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpredict
More file actions
executable file
·35 lines (27 loc) · 711 Bytes
/
Copy pathpredict
File metadata and controls
executable file
·35 lines (27 loc) · 711 Bytes
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
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ $# -lt 2 ]] ; then
echo -e 'Usage: ./predict [Weight] [Video] <Max String> <Output Size>'
exit 1
fi
WEIGHT_PATH=$1
VIDEO_PATH=$2
if [[ "$WEIGHT_PATH" != /* ]]; then
WEIGHT_PATH="$DIR/$WEIGHT_PATH"
fi
if [[ "$VIDEO_PATH" != /* ]]; then
VIDEO_PATH="$DIR/$VIDEO_PATH"
fi
if [[ $# -eq 2 ]] ; then
python "$DIR/evaluation/predict.py" "$WEIGHT_PATH" "$VIDEO_PATH"
exit 1
fi
if [[ $# -eq 3 ]] ; then
python "$DIR/evaluation/predict.py" "$WEIGHT_PATH" "$VIDEO_PATH" $3
exit 1
fi
if [[ $# -eq 4 ]] ; then
python "$DIR/evaluation/predict.py" "$WEIGHT_PATH" "$VIDEO_PATH" $3 $4
exit 1
fi
echo 'Too much argument(s)'