-
Notifications
You must be signed in to change notification settings - Fork 1
/
deconvolution.sh
50 lines (42 loc) · 1015 Bytes
/
deconvolution.sh
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
#!/bin/bash
help()
{
echo "Usage: deconvolution -p | --model_path MODEL_PATH
-m | --peak_matrix PEAK_MATRIX
[ -h | --help ]"
exit 2
}
SHORT=p:,m:,h
LONG=model_path:,peak_matrix:,help
OPTS=$(getopt -a -n deconvolution --option $SHORT --longoptions $LONG -- "$@")
VALID_ARGUMENTS=$# # Returns the count of arguments that are in short or long options
if [ "$VALID_ARGUMENTS" -eq 0 ]; then
help
fi
eval set -- "$OPTS"
while :
do
case "$1" in
-p | --model_path )
model_path="$2"
shift 2
;;
-m | --peak_matrix )
peak_matrix="$2"
shift 2
;;
-h | --help)
help
;;
--)
shift;
break
;;
*)
echo "Unexpected option: $1"
help
;;
esac
done
python src/2_deconvolution/inference.py --model_path $model_path --model SepFormerTasNet --peak_count_matrix $peak_matrix --mask
echo "Done!"