-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare_data
executable file
·36 lines (31 loc) · 1.25 KB
/
prepare_data
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
data_dir="datasets/"
split_script="data_split.py"
wget https://wjdcloud.blob.core.windows.net/dataset/OFFICE31.zip -P $data_dir
unzip $data_dir/OFFICE31.zip -d $data_dir
python $split_script $data_dir/OFFICE31/amazon/
python $split_script $data_dir/OFFICE31/webcam/
python $split_script $data_dir/OFFICE31/dslr/
rm $data_dir/OFFICE31.zip
rm -rf $data_dir/OFFICE31/amazon/
rm -rf $data_dir/OFFICE31/webcam/
rm -rf $data_dir/OFFICE31/dslr/
# visda train
wget http://csr.bu.edu/ftp/visda17/clf/train.tar -P $data_dir/visda/
tar xvf $data_dir/visda/train.tar -C $data_dir/visda/
mv $data_dir/visda/train $data_dir/visda/source/
python $split_script $data_dir/visda/source/
rm $data_dir/visda/train.tar
rm -rf $data_dir/visda/source/
# visda validation
wget http://csr.bu.edu/ftp/visda17/clf/validation.tar -P $data_dir/visda
tar xvf $data_dir/visda/validation.tar -C $data_dir/visda
mv $data_dir/visda/validation $data_dir/visda/target
python $split_script $data_dir/visda/target/
rm $data_dir/visda/validation.tar
rm -rf $data_dir/visda/target/
## visda validation
#wget http://csr.bu.edu/ftp/visda17/clf/test.tar -P $data_dir/visda
#tar xvf $data_dir/visda/test.tar -C $data_dir/visda
#mv $data_dir/visda/test $data_dir/visda/target_val
#rm $data_dir/visda/test.tar