From 2e53367a5d39b8a1041779f47acc5230aea55f0e Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Sun, 14 Apr 2013 14:58:22 -0400 Subject: [PATCH] script cleanup --- README.md | 2 -- data/README.md | 2 +- data/downloadDatasets.sh | 35 ----------------------------------- openbr/openbr_export.cpp | 6 ------ scripts/downloadDatasets.sh | 35 +++++++++++++++++++++++++++++++++++ scripts/evalFaceRecognition-MEDS.sh | 3 +++ scripts/helloWorld.sh | 21 ++------------------- scripts/trainFaceRecognition-MEDS.sh | 9 --------- scripts/trainImageRetrieval-LFW.sh | 21 --------------------- 9 files changed, 41 insertions(+), 93 deletions(-) delete mode 100755 data/downloadDatasets.sh create mode 100755 scripts/downloadDatasets.sh delete mode 100755 scripts/trainFaceRecognition-MEDS.sh delete mode 100755 scripts/trainImageRetrieval-LFW.sh 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/data/downloadDatasets.sh b/data/downloadDatasets.sh deleted file mode 100755 index dd508b5..0000000 --- a/data/downloadDatasets.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -if [ ! -f downloadDatasets.sh ]; then - echo "Run this script from the data folder!" - exit -fi - -# BioID -if [ ! -d 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 - rm *.eye description.txt BioID-FaceDatabase-V1.2.zip -fi - -# LFW -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 - rm lfw.tgz -fi - -# MEDS -if [ ! -d 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 - rm -r data NIST_SD32_MEDS-II_face.zip -fi 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/scripts/downloadDatasets.sh b/scripts/downloadDatasets.sh new file mode 100755 index 0000000..4f74b10 --- /dev/null +++ b/scripts/downloadDatasets.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +if [ ! -f downloadDatasets.sh ]; then + echo "Run this script from the scripts folder!" + exit +fi + +# BioID +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 ../data/BioID/img + mv *.pgm ../data/BioID/img + rm *.eye description.txt BioID-FaceDatabase-V1.2.zip +fi + +# LFW +if [ ! -d ../data/LFW/img ]; then + echo "Downloading LFW..." + curl -OL http://vis-www.cs.umass.edu/lfw/lfw.tgz + tar -xf lfw.tgz + mv lfw ../data/LFW/img + rm lfw.tgz +fi + +# MEDS +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 ../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 -- libgit2 0.21.4