-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
35 lines (26 loc) · 1.78 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
#!/bin/bash
DATASET_TYPE="test validation train"
classes="Person Man Woman Boy Girl Rifle Shotgun Handgun Window Door"
subfolder=Person_Man_Woman_Boy_Girl_Rifle_Shotgun_Handgun_Window_Door
limit=2000
for dataset_type in $DATASET_TYPE
do
echo "********************"
echo "$dataset_type"
python main.py downloader -y --limit $limit --Dataset ~/Data/OID/ --type_csv "$dataset_type" --multiclasses 1 --image_IsGroupOf 0 --classes $classes
cp -r /home/amit/Data/OID/"$dataset_type"/$subfolder/Label /home/amit/Data/OID/"$dataset_type"/$subfolder/Label_Org
echo "converting to class_parent"
python modules/class_converter.py --labels-path /home/amit/Data/OID/"$dataset_type"/$subfolder/Label
echo "IoU filtering"
python modules/IoU_bbox_filter.py --labels-path /home/amit/Data/OID/"$dataset_type"/$subfolder/Label
echo "Gathering data statistics"
python modules/data_stats.py --data-type "$dataset_type" --labels-path /home/amit/Data/OID/"$dataset_type"/$subfolder/Label
echo "Convreting to yolo format"
cp -r /home/amit/Data/OID/"$dataset_type"/$subfolder/Label /home/amit/Data/OID/"$dataset_type"/$subfolder/Label_Merged_Cls
python modules/convert_bbox_formats.py --labels-path /home/amit/Data/OID/"$dataset_type"/$subfolder/Label
cp -r /home/amit/Data/OID/"$dataset_type"/$subfolder/Label /home/amit/Data/OID/"$dataset_type"/$subfolder/labels
mkdir /home/amit/Data/OID/"$dataset_type"/$subfolder/images
mv /home/amit/Data/OID/"$dataset_type"/$subfolder/*.jpg /home/amit/Data/OID/"$dataset_type"/$subfolder/images
echo "creating data text files"
python /home/amit/Dev/KzirTracking/detector/yolov3/data/utils/create_data_txtfile.py --labels-path /home/amit/Data/OID/"$dataset_type"/$subfolder/labels --output-data-txtfile /home/amit/Data/OID/"$dataset_type"/$subfolder/data.txt
done