Commit 2e53367a5d39b8a1041779f47acc5230aea55f0e
1 parent
64739eaf
script cleanup
Showing
8 changed files
with
15 additions
and
67 deletions
README.md
| @@ -4,7 +4,5 @@ www.openbiometrics.org | @@ -4,7 +4,5 @@ www.openbiometrics.org | ||
| 4 | $ cd openbr | 4 | $ cd openbr |
| 5 | $ git submodule init | 5 | $ git submodule init |
| 6 | $ git submodule update | 6 | $ git submodule update |
| 7 | - $ cd data | ||
| 8 | - $ ./downloadDatasets.sh | ||
| 9 | 7 | ||
| 10 | [Build Instructions](http://openbiometrics.org/doxygen/latest/installation.html) | 8 | [Build Instructions](http://openbiometrics.org/doxygen/latest/installation.html) |
data/README.md
| @@ -8,6 +8,6 @@ | @@ -8,6 +8,6 @@ | ||
| 8 | * [PCSO](PCSO/README.md) | 8 | * [PCSO](PCSO/README.md) |
| 9 | 9 | ||
| 10 | For both practical and legal reasons we don't include images in this repository. | 10 | For both practical and legal reasons we don't include images in this repository. |
| 11 | -Open source datasets can be downloaded using `downloadDatasets.sh`. | 11 | +Open source datasets can be downloaded using `../scripts/downloadDatasets.sh`. |
| 12 | Researchers should contact the respective owners of the other datasets in order to obtain a copy. | 12 | Researchers should contact the respective owners of the other datasets in order to obtain a copy. |
| 13 | The provided sigsets indicate how the images are expected to be arranged in directories, generally following the conventions established by the original authors. | 13 | The provided sigsets indicate how the images are expected to be arranged in directories, generally following the conventions established by the original authors. |
openbr/openbr_export.cpp
| @@ -270,8 +270,6 @@ $ br -help | @@ -270,8 +270,6 @@ $ br -help | ||
| 270 | * $ cd openbr | 270 | * $ cd openbr |
| 271 | * $ git submodule init | 271 | * $ git submodule init |
| 272 | * $ git submodule update | 272 | * $ git submodule update |
| 273 | - * $ cd data | ||
| 274 | - * $ ./downloadDatasets.sh | ||
| 275 | * \endcode | 273 | * \endcode |
| 276 | * -# Build OpenBR! | 274 | * -# Build OpenBR! |
| 277 | * \code | 275 | * \code |
| @@ -362,8 +360,6 @@ $ br -help | @@ -362,8 +360,6 @@ $ br -help | ||
| 362 | * $ cd openbr | 360 | * $ cd openbr |
| 363 | * $ git submodule init | 361 | * $ git submodule init |
| 364 | * $ git submodule update | 362 | * $ git submodule update |
| 365 | - * $ cd data | ||
| 366 | - * $ ./downloadDatasets.sh | ||
| 367 | * \endcode | 363 | * \endcode |
| 368 | * -# Build OpenBR! | 364 | * -# Build OpenBR! |
| 369 | * \code | 365 | * \code |
| @@ -431,8 +427,6 @@ $ br -help | @@ -431,8 +427,6 @@ $ br -help | ||
| 431 | * $ cd openbr | 427 | * $ cd openbr |
| 432 | * $ git submodule init | 428 | * $ git submodule init |
| 433 | * $ git submodule update | 429 | * $ git submodule update |
| 434 | - * $ cd data | ||
| 435 | - * $ ./downloadDatasets.sh | ||
| 436 | * \endcode | 430 | * \endcode |
| 437 | * -# Build OpenBR! | 431 | * -# Build OpenBR! |
| 438 | * \code | 432 | * \code |
data/downloadDatasets.sh renamed to scripts/downloadDatasets.sh
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | if [ ! -f downloadDatasets.sh ]; then | 3 | if [ ! -f downloadDatasets.sh ]; then |
| 4 | - echo "Run this script from the data folder!" | 4 | + echo "Run this script from the scripts folder!" |
| 5 | exit | 5 | exit |
| 6 | fi | 6 | fi |
| 7 | 7 | ||
| 8 | # BioID | 8 | # BioID |
| 9 | -if [ ! -d BioID/img ]; then | 9 | +if [ ! -d ../data/BioID/img ]; then |
| 10 | echo "Downloading BioID..." | 10 | echo "Downloading BioID..." |
| 11 | curl -OL ftp://ftp.uni-erlangen.de/pub/facedb/BioID-FaceDatabase-V1.2.zip | 11 | curl -OL ftp://ftp.uni-erlangen.de/pub/facedb/BioID-FaceDatabase-V1.2.zip |
| 12 | unzip BioID-FaceDatabase-V1.2.zip | 12 | unzip BioID-FaceDatabase-V1.2.zip |
| 13 | - mkdir BioID/img | ||
| 14 | - mv *.pgm BioID/img | 13 | + mkdir ../data/BioID/img |
| 14 | + mv *.pgm ../data/BioID/img | ||
| 15 | rm *.eye description.txt BioID-FaceDatabase-V1.2.zip | 15 | rm *.eye description.txt BioID-FaceDatabase-V1.2.zip |
| 16 | fi | 16 | fi |
| 17 | 17 | ||
| @@ -19,17 +19,17 @@ fi | @@ -19,17 +19,17 @@ fi | ||
| 19 | if [ ! -d ../data/LFW/img ]; then | 19 | if [ ! -d ../data/LFW/img ]; then |
| 20 | echo "Downloading LFW..." | 20 | echo "Downloading LFW..." |
| 21 | curl -OL http://vis-www.cs.umass.edu/lfw/lfw.tgz | 21 | curl -OL http://vis-www.cs.umass.edu/lfw/lfw.tgz |
| 22 | - tar -xf lfw.tgz -C LFW | ||
| 23 | - mv LFW/lfw LFW/img | 22 | + tar -xf lfw.tgz |
| 23 | + mv lfw ../data/LFW/img | ||
| 24 | rm lfw.tgz | 24 | rm lfw.tgz |
| 25 | fi | 25 | fi |
| 26 | 26 | ||
| 27 | # MEDS | 27 | # MEDS |
| 28 | -if [ ! -d MEDS/img ]; then | 28 | +if [ ! -d ../data/MEDS/img ]; then |
| 29 | echo "Downloading MEDS..." | 29 | echo "Downloading MEDS..." |
| 30 | curl -OL http://nigos.nist.gov:8080/nist/sd/32/NIST_SD32_MEDS-II_face.zip | 30 | curl -OL http://nigos.nist.gov:8080/nist/sd/32/NIST_SD32_MEDS-II_face.zip |
| 31 | unzip NIST_SD32_MEDS-II_face.zip | 31 | unzip NIST_SD32_MEDS-II_face.zip |
| 32 | - mkdir MEDS/img | ||
| 33 | - mv data/*/*.jpg MEDS/img | 32 | + mkdir ../data/MEDS/img |
| 33 | + mv data/*/*.jpg ../data/MEDS/img | ||
| 34 | rm -r data NIST_SD32_MEDS-II_face.zip | 34 | rm -r data NIST_SD32_MEDS-II_face.zip |
| 35 | fi | 35 | fi |
scripts/evalFaceRecognition-MEDS.sh
| @@ -7,6 +7,9 @@ if [ ! -f evalFaceRecognition-MEDS.sh ]; then | @@ -7,6 +7,9 @@ if [ ! -f evalFaceRecognition-MEDS.sh ]; then | ||
| 7 | exit | 7 | exit |
| 8 | fi | 8 | fi |
| 9 | 9 | ||
| 10 | +# Get the data | ||
| 11 | +./downloadDatasets.sh | ||
| 12 | + | ||
| 10 | if [ ! -e Algorithm_Dataset ]; then | 13 | if [ ! -e Algorithm_Dataset ]; then |
| 11 | mkdir Algorithm_Dataset | 14 | mkdir Algorithm_Dataset |
| 12 | fi | 15 | fi |
scripts/helloWorld.sh
| @@ -10,25 +10,8 @@ if ! hash br 2>/dev/null; then | @@ -10,25 +10,8 @@ if ! hash br 2>/dev/null; then | ||
| 10 | exit | 10 | exit |
| 11 | fi | 11 | fi |
| 12 | 12 | ||
| 13 | -cd ../data | ||
| 14 | - | ||
| 15 | -# Download, unzip, and reorganize the BioID database | ||
| 16 | -if [ ! -d BioID/img ]; then | ||
| 17 | - curl -OL ftp://ftp.uni-erlangen.de/pub/facedb/BioID-FaceDatabase-V1.2.zip | ||
| 18 | - unzip BioID-FaceDatabase-V1.2.zip | ||
| 19 | - mkdir BioID/img | ||
| 20 | - mv *.pgm BioID/img | ||
| 21 | - rm *.eye description.txt BioID-FaceDatabase-V1.2.zip | ||
| 22 | -fi | ||
| 23 | - | ||
| 24 | -# Download, unzip, and reorganize the MEDS-II database | ||
| 25 | -if [ ! -d MEDS/img ]; then | ||
| 26 | - curl -OL http://nigos.nist.gov:8080/nist/sd/32/NIST_SD32_MEDS-II_face.zip | ||
| 27 | - unzip NIST_SD32_MEDS-II_face.zip | ||
| 28 | - mkdir MEDS/img | ||
| 29 | - mv data/*/*.jpg MEDS/img | ||
| 30 | - rm -r data NIST_SD32_MEDS-II_face.zip | ||
| 31 | -fi | 13 | +# Get the data |
| 14 | +./downloadDatasets.sh | ||
| 32 | 15 | ||
| 33 | # Train the Eigenfaces algorithm | 16 | # Train the Eigenfaces algorithm |
| 34 | 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 | 17 | 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 |
scripts/trainFaceRecognition-MEDS.sh deleted
| 1 | -#!/bin/bash | ||
| 2 | -if [ ! -f trainFaceRecognition-MEDS.sh ]; then | ||
| 3 | - echo "Run this script from the scripts folder!" | ||
| 4 | - exit | ||
| 5 | -fi | ||
| 6 | - | ||
| 7 | -rm -f ../share/openbr/models/algorithms/FaceRecognitionHoG | ||
| 8 | - | ||
| 9 | -br -algorithm FaceRecognitionHoG -path ../data/MEDS/img -train ../data/MEDS/sigset/MEDS_frontal_all.xml ../share/openbr/models/algorithms/FaceRecognitionHoG |
scripts/trainImageRetrieval-LFW.sh deleted
| 1 | -#!/bin/bash | ||
| 2 | -if [ ! -f trainImageRetrieval-LFW.sh ]; then | ||
| 3 | - echo "Run this script from the scripts folder!" | ||
| 4 | - exit | ||
| 5 | -fi | ||
| 6 | - | ||
| 7 | -if [ ! -e Algorithm_Dataset ]; then | ||
| 8 | - mkdir Algorithm_Dataset | ||
| 9 | -fi | ||
| 10 | - | ||
| 11 | -if [ ! -e LFW.mask ]; then | ||
| 12 | - br -makeMask ~/lfw2[step=10] . LFW.mask | ||
| 13 | -fi | ||
| 14 | - | ||
| 15 | -rm -f ../share/openbr/models/algorithms/ImageRetrieval | ||
| 16 | - | ||
| 17 | -br -algorithm ImageRetrieval -train ~/lfw2[step=10] ../share/openbr/models/algorithms/ImageRetrieval | ||
| 18 | -br -algorithm ImageRetrieval -compare ~/lfw2[step=10] . ImageRetrieval_LFW.mtx -eval ImageRetrieval_LFW.mtx LFW.mask Algorithm_Dataset/ImageRetrieval_LFW.csv | ||
| 19 | -br -plot Algorithm_Dataset/*_LFW.csv LFW | ||
| 20 | - | ||
| 21 | -#rm -f ../share/openbr/models/algorithms/ImageRetrieval |