-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_overnight.sh
executable file
·38 lines (32 loc) · 1.01 KB
/
run_overnight.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
#!/bin/bash
set -e
# This script is made to be run over night, producing results.py for every model in the object_detection folder.
# I hacked it together for initial launch only, but it might be useful as a starting point for later automated solutions.
current_path=$(pwd)
# Iteartion order. Start with quick-running ones to surface errors faster.
folders=(
"yolov8"
"yolov9"
"yolov10"
"rt-detr"
)
for folder in ${folders[@]}; do
cd $current_path/models/object_detection/$folder
# If results.json exists, move it to results.json.old
if [ -f results.json ]; then
mv results.json results.json.old
fi
# If folder stards with yolov9, use special rules
if [ ! -f results.json ]; then
if [[ $folder == yolov9* ]]; then
bash run_predictions.sh
fi
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
python run.py
deactivate
else
echo "results.json already exists in $folder"
fi
done