Skip to content

Commit

Permalink
update build add svm
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Kocheryzhkin committed Mar 29, 2018
1 parent 0b0a363 commit 5f354e0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ android {
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:27.0.2'
compile project(':openCVLibrary300')
testCompile 'junit:junit:4.12'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation project(':openCVLibrary300')
testImplementation 'junit:junit:4.12'
}
6 changes: 4 additions & 2 deletions app/src/main/cpp/native-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>


#include <dlib/dnn.h>
#include <dlib/opencv.h>
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/image_processing.h>
#include <dlib/svm/svm_multiclass_linear_trainer.h>

#include <android/log.h>

Expand Down Expand Up @@ -61,8 +61,10 @@ extern "C"
FILE* file2 = fopen("/storage/emulated/0/Movies/dlib_face_recognition_resnet_model_v1.dat","r+");
FILE* file3 = fopen("/storage/emulated/0/Movies/first_face_feature_vector.dat","r+");
FILE* file4 = fopen("/storage/emulated/0/Movies/second_face_feature_vector.dat","r+");
FILE* file5 = fopen("/storage/emulated/0/Movies/faces_linear.svm","r+");


if (file != NULL && file2 != NULL && file3 != NULL && file4 != NULL)
if (file != NULL && file2 != NULL && file3 != NULL && file4 != NULL && file5 != NULL)
{
dlib::deserialize("/storage/emulated/0/Movies/shape_predictor_5_face_landmarks.dat") >> sp;
dlib::deserialize("/storage/emulated/0/Movies/dlib_face_recognition_resnet_model_v1.dat") >> net;
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Nov 14 12:08:52 CET 2017
#Thu Mar 29 17:20:02 MSK 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 comments on commit 5f354e0

Please sign in to comment.