Skip to content

Commit

Permalink
changing around data folders
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Sep 22, 2016
1 parent 91d65e9 commit 9be7e69
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 31 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,9 @@ build/
# data
datasets/animals
datasets/vgg16_weights.h5
*.sqlite3
*.sqlite3

# models
models/image-net-2012.words
models/image-net-2012.sqlite3
models/shape_predictor_68_face_landmarks.dat
2 changes: 1 addition & 1 deletion apps/ConvnetClassifier/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void ofApp::setup() {
setClassifier( SVM_LINEAR );


ccv.setup("image-net-2012.sqlite3");
ccv.setup("../../../../models/image-net-2012.sqlite3");
if (!ccv.isLoaded()) return;

}
Expand Down
2 changes: 1 addition & 1 deletion apps/ConvnetOSC/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ void ofApp::setup() {
ofSetWindowTitle("ConvnetOSC");
cam.initGrabber(320, 240);

ccv.setup("image-net-2012.sqlite3");
ccv.setup("../../../../models/image-net-2012.sqlite3");
if (!ccv.isLoaded()) return;

// default settings
Expand Down
2 changes: 1 addition & 1 deletion apps/ConvnetViewer/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
void ofApp::setup(){
ofSetWindowShape(1280, 800);
grab.initGrabber(640, 480);
ccv.setup("image-net-2012.sqlite3");
ccv.setup("../../../../models/image-net-2012.sqlite3");
ccv.setEncode(true);
ccv.start();
}
Expand Down
8 changes: 2 additions & 6 deletions apps/FaceClassifier/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,13 @@ void ofApp::setup(){
drawPose = false;
drawVideo = false;


//FaceTracker2 setup
ofSetDataPathRoot(ofFile(__BASE_FILE__).getEnclosingDirectory()+"../../model/");

// Setup grabber
grabber.setup(1280,720);
//grabber.setup(960,540);

// Setup tracker
tracker.setup();
tracker.setup("../../../../models/shape_predictor_68_face_landmarks.dat");

}

//--------------------------------------------------------------
Expand Down
5 changes: 1 addition & 4 deletions apps/FaceDTW/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,12 @@ pipeline.addPostProcessingModule( ClassLabelTimeoutFilter(timeOutFilter,ClassLab
drawVideo = false;


//FaceTracker2 setup
ofSetDataPathRoot(ofFile(__BASE_FILE__).getEnclosingDirectory()+"../../model/");

// Setup grabber
grabber.setup(1280,720);
//grabber.setup(960,540);

// Setup tracker
tracker.setup();
tracker.setup("../../../../models/shape_predictor_68_face_landmarks.dat");

}

Expand Down
6 changes: 1 addition & 5 deletions apps/FaceRegressor/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,12 @@ void ofApp::setup(){
drawVideo = true;


//FaceTracker2 setup
ofSetDataPathRoot(ofFile(__BASE_FILE__).getEnclosingDirectory()+"../../model/");

// Setup grabber
grabber.setup(1280,720);
//grabber.setup(960,540);

// Setup tracker
tracker.setup();

tracker.setup("../../../../models/shape_predictor_68_face_landmarks.dat");

}

Expand Down
9 changes: 0 additions & 9 deletions apps/download-model.sh

This file was deleted.

3 changes: 0 additions & 3 deletions apps/models/README.md

This file was deleted.

File renamed without changes.
5 changes: 5 additions & 0 deletions models/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This folder needs to contain the landmark predictor data file for the examples using ofxFaceTracker2 to work, and it needs to contain the image-net-2012 weights and class names for examples with ofxCcv to work.

Run `sh setup.sh` from the root folder to download the `shape_predictor_68_face_landmarks.dat` data file automatically from [sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2](https://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2), as well as [image-net-2012.sqlite3](https://raw.githubusercontent.com/liuliu/ccv/unstable/samples/image-net-2012.sqlite3) and [image-net-2012.words](https://raw.githubusercontent.com/liuliu/ccv/unstable/samples/image-net-2012.words).

Alternatively, download those files manually and unzip the landmarks file.
File renamed without changes.
13 changes: 13 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

echo "Downloading shape_predictor_68_face_landmarks.dat"
curl -L -o models/shape_predictor_68_face_landmarks.dat.bz2 --progress-bar https://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2

echo "Extracting shape_predictor_68_face_landmarks.dat"
bzip2 -d models/shape_predictor_68_face_landmarks.dat.bz2

echo "Downloading image-net-2012.sqlite3 and image-net-2012.words"
curl -L -o models/image-net-2012.sqlite3 --progress-bar https://raw.githubusercontent.com/liuliu/ccv/unstable/samples/image-net-2012.sqlite3
curl -L -o models/image-net-2012.words --progress-bar https://raw.githubusercontent.com/liuliu/ccv/unstable/samples/image-net-2012.words

echo "Done"

0 comments on commit 9be7e69

Please sign in to comment.