Commit 2e53367a5d39b8a1041779f47acc5230aea55f0e
1 parent
64739eaf
script cleanup
Showing
8 changed files
with
15 additions
and
67 deletions
README.md
data/README.md
| ... | ... | @@ -8,6 +8,6 @@ |
| 8 | 8 | * [PCSO](PCSO/README.md) |
| 9 | 9 | |
| 10 | 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 | 12 | Researchers should contact the respective owners of the other datasets in order to obtain a copy. |
| 13 | 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 | 270 | * $ cd openbr |
| 271 | 271 | * $ git submodule init |
| 272 | 272 | * $ git submodule update |
| 273 | - * $ cd data | |
| 274 | - * $ ./downloadDatasets.sh | |
| 275 | 273 | * \endcode |
| 276 | 274 | * -# Build OpenBR! |
| 277 | 275 | * \code |
| ... | ... | @@ -362,8 +360,6 @@ $ br -help |
| 362 | 360 | * $ cd openbr |
| 363 | 361 | * $ git submodule init |
| 364 | 362 | * $ git submodule update |
| 365 | - * $ cd data | |
| 366 | - * $ ./downloadDatasets.sh | |
| 367 | 363 | * \endcode |
| 368 | 364 | * -# Build OpenBR! |
| 369 | 365 | * \code |
| ... | ... | @@ -431,8 +427,6 @@ $ br -help |
| 431 | 427 | * $ cd openbr |
| 432 | 428 | * $ git submodule init |
| 433 | 429 | * $ git submodule update |
| 434 | - * $ cd data | |
| 435 | - * $ ./downloadDatasets.sh | |
| 436 | 430 | * \endcode |
| 437 | 431 | * -# Build OpenBR! |
| 438 | 432 | * \code | ... | ... |
data/downloadDatasets.sh renamed to scripts/downloadDatasets.sh
| 1 | 1 | #!/bin/bash |
| 2 | 2 | |
| 3 | 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 | 5 | exit |
| 6 | 6 | fi |
| 7 | 7 | |
| 8 | 8 | # BioID |
| 9 | -if [ ! -d BioID/img ]; then | |
| 9 | +if [ ! -d ../data/BioID/img ]; then | |
| 10 | 10 | echo "Downloading BioID..." |
| 11 | 11 | curl -OL ftp://ftp.uni-erlangen.de/pub/facedb/BioID-FaceDatabase-V1.2.zip |
| 12 | 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 | 15 | rm *.eye description.txt BioID-FaceDatabase-V1.2.zip |
| 16 | 16 | fi |
| 17 | 17 | |
| ... | ... | @@ -19,17 +19,17 @@ fi |
| 19 | 19 | if [ ! -d ../data/LFW/img ]; then |
| 20 | 20 | echo "Downloading LFW..." |
| 21 | 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 | 24 | rm lfw.tgz |
| 25 | 25 | fi |
| 26 | 26 | |
| 27 | 27 | # MEDS |
| 28 | -if [ ! -d MEDS/img ]; then | |
| 28 | +if [ ! -d ../data/MEDS/img ]; then | |
| 29 | 29 | echo "Downloading MEDS..." |
| 30 | 30 | curl -OL http://nigos.nist.gov:8080/nist/sd/32/NIST_SD32_MEDS-II_face.zip |
| 31 | 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 | 34 | rm -r data NIST_SD32_MEDS-II_face.zip |
| 35 | 35 | fi | ... | ... |
scripts/evalFaceRecognition-MEDS.sh
scripts/helloWorld.sh
| ... | ... | @@ -10,25 +10,8 @@ if ! hash br 2>/dev/null; then |
| 10 | 10 | exit |
| 11 | 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 | 16 | # Train the Eigenfaces algorithm |
| 34 | 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 |