mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
get & label OTB dataset
This commit is contained in:
22
scripts/windows/win_get_otb_human3.cmd
Normal file
22
scripts/windows/win_get_otb_human3.cmd
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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\wget http://cvlab.hanyang.ac.kr/tracker_benchmark/seq/Human3.zip
|
||||||
|
|
||||||
|
c:\cygwin64\bin\unzip -o "%CD:\=/%/Human3.zip"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
c:\cygwin64\bin\dos2unix "%CD:\=/%/windows_otb_get_labels.sh"
|
||||||
|
|
||||||
|
c:\cygwin64\bin\bash -l -c "cd %CD:\=/%/; %CD:\=/%/windows_otb_get_labels.sh"
|
||||||
|
|
||||||
|
rem c:\cygwin64\bin\find "%CD:\=/%/img" -name \*.jpg > otb_train.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pause
|
28
scripts/windows/windows_otb_get_labels.sh
Normal file
28
scripts/windows/windows_otb_get_labels.sh
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export LC_NUMERIC="en_US.UTF-8"
|
||||||
|
|
||||||
|
wd=`pwd`
|
||||||
|
IFS=','
|
||||||
|
|
||||||
|
dataset="Human3"
|
||||||
|
class_id=0
|
||||||
|
w=480
|
||||||
|
h=640
|
||||||
|
num=1
|
||||||
|
|
||||||
|
while read -a line; do
|
||||||
|
filename=$(printf "$dataset/img/%04d.txt" $num)
|
||||||
|
#rm $filename.txt
|
||||||
|
echo "$class_id " > $filename
|
||||||
|
printf "%.5f " "$(($((line[0] + line[2]/2)) * 100000 / $w))e-5" >> $filename
|
||||||
|
printf "%.5f " "$(($((line[1] + line[3]/2)) * 100000 / $h))e-5" >> $filename
|
||||||
|
printf "%.5f " "$(($((line[2])) * 100000 / $w))e-5" >> $filename
|
||||||
|
printf "%.5f " "$(($((line[3])) * 100000 / $h))e-5" >> $filename
|
||||||
|
num=$((num + 1))
|
||||||
|
done < $dataset/groundtruth_rect.txt
|
||||||
|
|
||||||
|
echo "$dataset" > $dataset/otb.names
|
||||||
|
|
||||||
|
|
||||||
|
find $dataset/img -name \*.jpg > otb_train.txt
|
Reference in New Issue
Block a user