-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·48 lines (41 loc) · 1.73 KB
/
run.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
#!/bin/bash
echo "----------------------------------------------------------------"
echo "1: Test on a video by using the custom helmet cfg and weight files"
echo "2: Test on a given image by using the custom helmet cfg and weight files"
echo "3: Run darknet on a given image to get a json for training by using the default cfg and weight files"
read -p "Please enter a corresponding integer value (press -1 to exit): " USR_OPTION
case "$USR_OPTION" in
-1)
echo "Exiting...!"
echo "----------------------------------------------------------------"
exit 0
;;
0)
echo "Error, enter a positive integer"
echo "----------------------------------------------------------------"
exit 1
;;
1)
echo "Copy the following statement or modify accordingly"
echo "----------------------------------------------------------------"
echo "./darknet detector demo cfg/coco.data cfg/yolo.cfg yolo.weights helmet_cyclists.MP4"
echo "----------------------------------------------------------------"
;;
2)
echo "Copy the following statement or modify accordingly"
echo "----------------------------------------------------------------"
echo "./darknet detect cfg/yolo-helmet-detect.cfg yolo-helmet_10000.weights data/helmet_and_non.jpg"
echo "----------------------------------------------------------------"
;;
3)
echo "Copy the following statement or modify accordingly"
echo "----------------------------------------------------------------"
echo "./darknet detect cfg/yolo.cfg yolo.weights training_data/helmet_and_non.jpg"
echo "----------------------------------------------------------------"
;;
*)
echo "Error, enter a correct input"
echo "----------------------------------------------------------------"
exit 1
;;
esac