diff --git a/README.md b/README.md index 8d54b80..834cf02 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,5 @@ www.openbiometrics.org $ cd openbr $ git submodule init $ git submodule update - $ cd data - $ ./downloadDatasets.sh [Build Instructions](http://openbiometrics.org/doxygen/latest/installation.html) diff --git a/data/README.md b/data/README.md index abffb51..e951354 100644 --- a/data/README.md +++ b/data/README.md @@ -8,6 +8,6 @@ * [PCSO](PCSO/README.md) For both practical and legal reasons we don't include images in this repository. -Open source datasets can be downloaded using `downloadDatasets.sh`. +Open source datasets can be downloaded using `../scripts/downloadDatasets.sh`. Researchers should contact the respective owners of the other datasets in order to obtain a copy. The provided sigsets indicate how the images are expected to be arranged in directories, generally following the conventions established by the original authors. diff --git a/openbr/openbr_export.cpp b/openbr/openbr_export.cpp index b2ee8d6..3f3a9cc 100644 --- a/openbr/openbr_export.cpp +++ b/openbr/openbr_export.cpp @@ -270,8 +270,6 @@ $ br -help * $ cd openbr * $ git submodule init * $ git submodule update - * $ cd data - * $ ./downloadDatasets.sh * \endcode * -# Build OpenBR! * \code @@ -362,8 +360,6 @@ $ br -help * $ cd openbr * $ git submodule init * $ git submodule update - * $ cd data - * $ ./downloadDatasets.sh * \endcode * -# Build OpenBR! * \code @@ -431,8 +427,6 @@ $ br -help * $ cd openbr * $ git submodule init * $ git submodule update - * $ cd data - * $ ./downloadDatasets.sh * \endcode * -# Build OpenBR! * \code diff --git a/data/downloadDatasets.sh b/scripts/downloadDatasets.sh index dd508b5..4f74b10 100755 --- a/data/downloadDatasets.sh +++ b/scripts/downloadDatasets.sh @@ -1,17 +1,17 @@ #!/bin/bash if [ ! -f downloadDatasets.sh ]; then - echo "Run this script from the data folder!" + echo "Run this script from the scripts folder!" exit fi # BioID -if [ ! -d BioID/img ]; then +if [ ! -d ../data/BioID/img ]; then echo "Downloading BioID..." curl -OL ftp://ftp.uni-erlangen.de/pub/facedb/BioID-FaceDatabase-V1.2.zip unzip BioID-FaceDatabase-V1.2.zip - mkdir BioID/img - mv *.pgm BioID/img + mkdir ../data/BioID/img + mv *.pgm ../data/BioID/img rm *.eye description.txt BioID-FaceDatabase-V1.2.zip fi @@ -19,17 +19,17 @@ fi if [ ! -d ../data/LFW/img ]; then echo "Downloading LFW..." curl -OL http://vis-www.cs.umass.edu/lfw/lfw.tgz - tar -xf lfw.tgz -C LFW - mv LFW/lfw LFW/img + tar -xf lfw.tgz + mv lfw ../data/LFW/img rm lfw.tgz fi # MEDS -if [ ! -d MEDS/img ]; then +if [ ! -d ../data/MEDS/img ]; then echo "Downloading MEDS..." curl -OL http://nigos.nist.gov:8080/nist/sd/32/NIST_SD32_MEDS-II_face.zip unzip NIST_SD32_MEDS-II_face.zip - mkdir MEDS/img - mv data/*/*.jpg MEDS/img + mkdir ../data/MEDS/img + mv data/*/*.jpg ../data/MEDS/img rm -r data NIST_SD32_MEDS-II_face.zip fi diff --git a/scripts/evalFaceRecognition-MEDS.sh b/scripts/evalFaceRecognition-MEDS.sh index 544aed7..e5e07ea 100755 --- a/scripts/evalFaceRecognition-MEDS.sh +++ b/scripts/evalFaceRecognition-MEDS.sh @@ -7,6 +7,9 @@ if [ ! -f evalFaceRecognition-MEDS.sh ]; then exit fi +# Get the data +./downloadDatasets.sh + if [ ! -e Algorithm_Dataset ]; then mkdir Algorithm_Dataset fi diff --git a/scripts/helloWorld.sh b/scripts/helloWorld.sh index f2a7af8..0373875 100755 --- a/scripts/helloWorld.sh +++ b/scripts/helloWorld.sh @@ -10,25 +10,8 @@ if ! hash br 2>/dev/null; then exit fi -cd ../data - -# Download, unzip, and reorganize the BioID database -if [ ! -d BioID/img ]; then - curl -OL ftp://ftp.uni-erlangen.de/pub/facedb/BioID-FaceDatabase-V1.2.zip - unzip BioID-FaceDatabase-V1.2.zip - mkdir BioID/img - mv *.pgm BioID/img - rm *.eye description.txt BioID-FaceDatabase-V1.2.zip -fi - -# Download, unzip, and reorganize the MEDS-II database -if [ ! -d MEDS/img ]; then - curl -OL http://nigos.nist.gov:8080/nist/sd/32/NIST_SD32_MEDS-II_face.zip - unzip NIST_SD32_MEDS-II_face.zip - mkdir MEDS/img - mv data/*/*.jpg MEDS/img - rm -r data NIST_SD32_MEDS-II_face.zip -fi +# Get the data +./downloadDatasets.sh # Train the Eigenfaces algorithm br -algorithm 'Open+Cvt(Gray)+Cascade(FrontalFace)+ASEFEyes+Affine(128,128,0.33,0.45)+CvtFloat+PCA(0.95):Dist(L2)' -train BioID/img Eigenfaces diff --git a/scripts/trainFaceRecognition-MEDS.sh b/scripts/trainFaceRecognition-MEDS.sh deleted file mode 100755 index 6f9bf60..0000000 --- a/scripts/trainFaceRecognition-MEDS.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -if [ ! -f trainFaceRecognition-MEDS.sh ]; then - echo "Run this script from the scripts folder!" - exit -fi - -rm -f ../share/openbr/models/algorithms/FaceRecognitionHoG - -br -algorithm FaceRecognitionHoG -path ../data/MEDS/img -train ../data/MEDS/sigset/MEDS_frontal_all.xml ../share/openbr/models/algorithms/FaceRecognitionHoG diff --git a/scripts/trainImageRetrieval-LFW.sh b/scripts/trainImageRetrieval-LFW.sh deleted file mode 100755 index f0f11e5..0000000 --- a/scripts/trainImageRetrieval-LFW.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -if [ ! -f trainImageRetrieval-LFW.sh ]; then - echo "Run this script from the scripts folder!" - exit -fi - -if [ ! -e Algorithm_Dataset ]; then - mkdir Algorithm_Dataset -fi - -if [ ! -e LFW.mask ]; then - br -makeMask ~/lfw2[step=10] . LFW.mask -fi - -rm -f ../share/openbr/models/algorithms/ImageRetrieval - -br -algorithm ImageRetrieval -train ~/lfw2[step=10] ../share/openbr/models/algorithms/ImageRetrieval -br -algorithm ImageRetrieval -compare ~/lfw2[step=10] . ImageRetrieval_LFW.mtx -eval ImageRetrieval_LFW.mtx LFW.mask Algorithm_Dataset/ImageRetrieval_LFW.csv -br -plot Algorithm_Dataset/*_LFW.csv LFW - -#rm -f ../share/openbr/models/algorithms/ImageRetrieval