Initial commit
This commit is contained in:
50
darknet-master/scripts/windows/otb_get_labels.sh
Normal file
50
darknet-master/scripts/windows/otb_get_labels.sh
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
dataset=$1
|
||||
w=$2
|
||||
h=$3
|
||||
|
||||
# Parameters: Human3, CarScale, Human6, Biker
|
||||
#w=480
|
||||
#h=640
|
||||
IFS=','
|
||||
|
||||
export LC_NUMERIC="en_US.UTF-8"
|
||||
|
||||
wd=`pwd`
|
||||
dataset_path="data/$dataset"
|
||||
|
||||
class_id=0
|
||||
num=1
|
||||
|
||||
mkdir data
|
||||
wget http://cvlab.hanyang.ac.kr/tracker_benchmark/seq/$dataset.zip
|
||||
|
||||
unzip -o $dataset.zip -d data
|
||||
|
||||
sed -i.bak 's/\o11/,/g' $dataset_path/groundtruth_rect.txt
|
||||
sed -i.bak 's/\o11/,/g' $dataset_path/groundtruth_rect.txt
|
||||
dos2unix $dataset_path/groundtruth_rect.txt
|
||||
|
||||
while read -r left right width height; do
|
||||
filename=$(printf "$dataset_path/img/%04d.txt" $num)
|
||||
#rm $filename.txt
|
||||
echo "$class_id " > $filename
|
||||
printf "%.5f " "$(($((left + width/2)) * 100000 / $w))e-5" >> $filename
|
||||
printf "%.5f " "$(($((right + height/2)) * 100000 / $h))e-5" >> $filename
|
||||
printf "%.5f " "$(($((width)) * 100000 / $w))e-5" >> $filename
|
||||
printf "%.5f " "$(($((height)) * 100000 / $h))e-5" >> $filename
|
||||
num=$((num + 1))
|
||||
done < $dataset_path/groundtruth_rect.txt
|
||||
|
||||
echo "$dataset" > $dataset_path/otb.names
|
||||
|
||||
|
||||
find $dataset_path/img -name \*.jpg > data/$dataset/train.txt
|
||||
|
||||
echo "classes = 1" > data/otb_$dataset.data
|
||||
echo "train = data/$dataset/train.txt" >> data/otb_$dataset.data
|
||||
echo "valid = data/$dataset/train.txt" >> data/otb_$dataset.data
|
||||
echo "names = $dataset_path/otb.names" >> data/otb_$dataset.data
|
||||
echo "backup = backup/" >> data/otb_$dataset.data
|
||||
echo "results= results/" >> data/otb_$dataset.data
|
||||
19
darknet-master/scripts/windows/win_cifar.cmd
Normal file
19
darknet-master/scripts/windows/win_cifar.cmd
Normal file
@@ -0,0 +1,19 @@
|
||||
echo Run install_cygwin.cmd before:
|
||||
|
||||
|
||||
c:\cygwin64\bin\wget https://pjreddie.com/media/files/cifar.tgz
|
||||
|
||||
c:\cygwin64\bin\gzip -d "%CD:\=/%/cifar.tgz"
|
||||
|
||||
c:\cygwin64\bin\tar --force-local -xvf "%CD:\=/%/cifar.tar"
|
||||
|
||||
c:\cygwin64\bin\cat "%CD:\=/%/labels.txt"
|
||||
|
||||
|
||||
c:\cygwin64\bin\find "%CD:\=/%/cifar/train" -name \*.png > "%CD:\=/%/cifar/train.list"
|
||||
|
||||
c:\cygwin64\bin\find "%CD:\=/%/cifar/test" -name \*.png > "%CD:\=/%/cifar/test.list"
|
||||
|
||||
|
||||
|
||||
pause
|
||||
@@ -0,0 +1,25 @@
|
||||
echo Run install_cygwin.cmd before:
|
||||
|
||||
rem http://www.image-net.org/challenges/LSVRC/2012/nonpub-downloads
|
||||
rem https://github.com/amd/OpenCL-caffe/wiki/Instructions-to-create-ImageNet-2012-data
|
||||
|
||||
|
||||
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; echo $PWD"
|
||||
|
||||
echo Wait several hours...
|
||||
|
||||
c:\cygwin64\bin\wget http://www.image-net.org/challenges/LSVRC/2012/nnoupb/ILSVRC2012_img_train.tar
|
||||
|
||||
c:\cygwin64\bin\mkdir -p "%CD:\=/%/ILSVRC2012_img_train"
|
||||
|
||||
c:\cygwin64\bin\tar --force-local -xf "%CD:\=/%/ILSVRC2012_img_train.tar" -C "%CD:\=/%/ILSVRC2012_img_train"
|
||||
|
||||
|
||||
|
||||
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; %CD:\=/%/windows_imagenet_train.sh"
|
||||
|
||||
c:\cygwin64\bin\find "%CD:\=/%/ILSVRC2012_img_train" -name \*.JPEG > imagenet1k.train.list
|
||||
|
||||
|
||||
|
||||
pause
|
||||
36
darknet-master/scripts/windows/win_get_imagenet_valid.cmd
Normal file
36
darknet-master/scripts/windows/win_get_imagenet_valid.cmd
Normal file
@@ -0,0 +1,36 @@
|
||||
echo Run install_cygwin.cmd before:
|
||||
|
||||
rem http://www.image-net.org/challenges/LSVRC/2012/nonpub-downloads
|
||||
rem https://github.com/amd/OpenCL-caffe/wiki/Instructions-to-create-ImageNet-2012-data
|
||||
|
||||
|
||||
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; echo $PWD"
|
||||
|
||||
|
||||
c:\cygwin64\bin\wget http://www.image-net.org/challenges/LSVRC/2012/nnoupb/ILSVRC2012_bbox_val_v3.tgz
|
||||
|
||||
c:\cygwin64\bin\gzip -d "%CD:\=/%/ILSVRC2012_bbox_val_v3.tgz"
|
||||
|
||||
c:\cygwin64\bin\tar --force-local -xvf "%CD:\=/%/ILSVRC2012_bbox_val_v3.tar"
|
||||
|
||||
|
||||
c:\cygwin64\bin\wget http://www.image-net.org/challenges/LSVRC/2012/nnoupb/ILSVRC2012_img_val.tar
|
||||
|
||||
c:\cygwin64\bin\mkdir -p "%CD:\=/%/imgs"
|
||||
|
||||
c:\cygwin64\bin\tar --force-local -xf "%CD:\=/%/ILSVRC2012_img_val.tar" -C "%CD:\=/%/imgs"
|
||||
|
||||
|
||||
echo Wait a few hours...
|
||||
|
||||
rem c:\cygwin64\bin\wget https://pjreddie.com/media/files/imagenet_label.sh
|
||||
|
||||
c:\cygwin64\bin\dos2unix "%CD:\=/%/windows_imagenet_label.sh"
|
||||
|
||||
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; %CD:\=/%/windows_imagenet_label.sh"
|
||||
|
||||
c:\cygwin64\bin\find "%CD:\=/%/labelled" -name \*.JPEG > inet.val.list
|
||||
|
||||
|
||||
|
||||
pause
|
||||
18
darknet-master/scripts/windows/win_get_otb_datasets.cmd
Normal file
18
darknet-master/scripts/windows/win_get_otb_datasets.cmd
Normal file
@@ -0,0 +1,18 @@
|
||||
echo Run install_cygwin.cmd before:
|
||||
|
||||
rem http://cvlab.hanyang.ac.kr/tracker_benchmark/datasets.html
|
||||
|
||||
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; echo $PWD"
|
||||
|
||||
c:\cygwin64\bin\dos2unix "%CD:\=/%/otb_get_labels.sh"
|
||||
|
||||
|
||||
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; %CD:\=/%/otb_get_labels.sh Suv 320 240"
|
||||
|
||||
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; %CD:\=/%/otb_get_labels.sh Liquor 640 480"
|
||||
|
||||
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; %CD:\=/%/otb_get_labels.sh Freeman4 360 240"
|
||||
|
||||
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; %CD:\=/%/otb_get_labels.sh Human3 480 640"
|
||||
|
||||
pause
|
||||
16
darknet-master/scripts/windows/windows_imagenet_label.sh
Normal file
16
darknet-master/scripts/windows/windows_imagenet_label.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p labelled
|
||||
wd=`pwd`
|
||||
|
||||
for f in val/*.xml;
|
||||
do
|
||||
label=`grep -m1 "<name>" $f | grep -oP '<name>\K[^<]*'`
|
||||
im=`echo $f | sed 's/val/imgs/; s/xml/JPEG/'`
|
||||
out=`echo $im | sed 's/JPEG/'${label}'.JPEG/; s/imgs/labelled/'`
|
||||
mv ${wd}/$im ${wd}/$out
|
||||
#ln -s ${wd}/$im ${wd}/$out
|
||||
done
|
||||
|
||||
#find ${wd}/labelled -name \*.JPEG > inet.val.list
|
||||
|
||||
17
darknet-master/scripts/windows/windows_imagenet_train.sh
Normal file
17
darknet-master/scripts/windows/windows_imagenet_train.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
#wget http://www.image-net.org/challenges/LSVRC/2012/nnoupb/ILSVRC2012_img_train.tar
|
||||
#mkdir -p ILSVRC2012_img_train
|
||||
#tar --force-local -xf ILSVRC2012_img_train.tar -C ILSVRC2012_img_train
|
||||
|
||||
wd=`pwd`
|
||||
|
||||
for f in ILSVRC2012_img_train/*.tar;
|
||||
do
|
||||
name=$(echo "$f" | cut -f 1 -d '.')
|
||||
mkdir "${wd}/${name}"
|
||||
tar --force-local -xf "${wd}/${f}" -C "${wd}/${name}"
|
||||
done
|
||||
|
||||
#find "${wd}/ILSVRC2012_img_train" -name \*.JPEG > imagenet1k.train.list
|
||||
|
||||
Reference in New Issue
Block a user