diff --git a/data/INRIAPerson/README.md b/data/INRIAPerson/README.md new file mode 100644 index 0000000..61d79f6 --- /dev/null +++ b/data/INRIAPerson/README.md @@ -0,0 +1,3 @@ +## INRIA Person Database +Dataset for human detection in several formats: original positive and negative images with bounding box annotations and normalized positive images (just the bounding box). +* [Website](http://pascal.inrialpes.fr/data/human/) diff --git a/scripts/downloadDatasets.sh b/scripts/downloadDatasets.sh index 37daff3..734573c 100755 --- a/scripts/downloadDatasets.sh +++ b/scripts/downloadDatasets.sh @@ -35,6 +35,24 @@ if [ ! -d ../data/BioID/img ]; then rm *.eye description.txt BioID-FaceDatabase-V1.2.zip fi +# INRIA person +if [ ! -d ../data/INRIAPerson/img ]; then + echo "Downloading INRIA person dataset..." + if hash curl 2>/dev/null; then + curl -OL http://pascal.inrialpes.fr/data/human/INRIAPerson.tar + else + wget http://pascal.inrialpes.fr/data/human/INRIAPerson.tar + fi + tar -xf INRIAPerson.tar + mkdir ../data/INRIAPerson/img ../data/INRIAPerson/sigset + ./writeINRIAPersonSigset.sh Train > ../data/INRIAPerson/sigset/train.xml + ./writeINRIAPersonSigset.sh Test > ../data/INRIAPerson/sigset/test.xml + ./writeINRIAPersonSigset.sh train_64x128_H96 > ../data/INRIAPerson/sigset/train_normalized.xml + ./writeINRIAPersonSigset.sh test_64x128_H96 > ../data/INRIAPerson/sigset/test_normalized.xml + mv INRIAPerson/* ../data/INRIAPerson/img + rm -r INRIAPerson* +fi + # KTH if [ ! -d ../data/KTH/vid ]; then echo "Downloading KTH..." diff --git a/scripts/writeINRIAPersonSigset.sh b/scripts/writeINRIAPersonSigset.sh new file mode 100755 index 0000000..cf72936 --- /dev/null +++ b/scripts/writeINRIAPersonSigset.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +writePresentation() +{ + pres="\t\t" + pres="$pres\n\t\t" + else + pres="$pres />" + fi + printf "$pres\n" +} +# for xargs calling bash below +export -f writePresentation +SEDREGEX='s/.*(\([0-9]*\), \([0-9]*\)) - (\([0-9]*\), \([0-9]*\))/writeIt \1 \2 \3 \4/' + +echo '' +echo '' +for fullpath in INRIAPerson/$1/pos/*; do + filename=$(basename "$fullpath") + echo -e "\t" + if [ -d INRIAPerson/$1/annotations ]; then + annotation="INRIAPerson/$1/annotations/${filename%.*}.txt" + grep 'Bounding box' $annotation | sed "$SEDREGEX" | xargs -n 5 bash -c "writePresentation $1 $filename \$@" + else + writePresentation $1 $filename + fi + echo -e '\t' +done +for fullpath in INRIAPerson/$1/neg/*; do + filename=$(basename "$fullpath") + echo -e "\t" + echo -e "\t\t" + echo -e '\t' +done +echo ''