Skip to content

Commit 6194882

Browse files
author
Peeranat Fupongsiripan
committed
Feat/update oneml
1 parent 1ff14e3 commit 6194882

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+30
-138
lines changed

.gitlab-ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ image:
44

55
variables:
66
ONEML_PATH: sertiscorp/mle/edge/oneml
7-
ONEML_REF: v3.11.1 # a tag or branch name to get oneML artifacts from
7+
ONEML_REF: v4.5.0 # a tag or branch name to get oneML artifacts from
88
ONEML_COMMIT_HASH: "" # needed only if ONEML_REF is not a tag
9-
BOOTCAMP_TAG: v0.10.1 # set manually to the latest or new oneML-bootcamp tag
9+
BOOTCAMP_TAG: v0.11.0-rc.0 # set manually to the latest or new oneML-bootcamp tag
1010
RELEASE_BODY: "" # generated automatically
1111
PRERELEASE: "true" # set automatically
1212
BOOTCAMP_REF: develop # set automatically
@@ -199,13 +199,13 @@ create-release:
199199
- if [[ $ONEML_REF == v* ]]; then ONEML_POSTFIX=${ONEML_REF}; else ONEML_POSTFIX=${ONEML_COMMIT_HASH:0:7}; fi
200200
- >
201201
BINARIES="";
202-
BINARIES="${BINARIES} oneml-bootcamp-x86_64-$ONEML_POSTFIX.tar.gz";
203-
BINARIES="${BINARIES} oneml-bootcamp_tvm-x86_64-$ONEML_POSTFIX.tar.gz";
204-
BINARIES="${BINARIES} oneml-bootcamp-msvc-x64-$ONEML_POSTFIX.tar.gz";
205-
BINARIES="${BINARIES} oneml-bootcamp_android-aarch64-linux-android-$ONEML_POSTFIX.tar.gz";
206-
BINARIES="${BINARIES} oneml-bootcamp_android-arm-linux-android-$ONEML_POSTFIX.tar.gz";
207-
BINARIES="${BINARIES} oneml-bootcamp-aarch64-linux-gnu-$ONEML_POSTFIX.tar.gz";
208-
BINARIES="${BINARIES} oneml-bootcamp-arm-linux-gnueabihf-$ONEML_POSTFIX.tar.gz";
202+
BINARIES="${BINARIES} oneml-bootcamp-cpu-x86_64-$ONEML_POSTFIX.tar.gz";
203+
BINARIES="${BINARIES} oneml-bootcamp-cuda-x86_64-$ONEML_POSTFIX.tar.gz";
204+
BINARIES="${BINARIES} oneml-bootcamp-cpu-msvc-x64-$ONEML_POSTFIX.tar.gz";
205+
BINARIES="${BINARIES} oneml-bootcamp-android-aarch64-linux-android-$ONEML_POSTFIX.tar.gz";
206+
BINARIES="${BINARIES} oneml-bootcamp-android-arm-linux-android-$ONEML_POSTFIX.tar.gz";
207+
BINARIES="${BINARIES} oneml-bootcamp-cpu-aarch64-linux-gnu-$ONEML_POSTFIX.tar.gz";
208+
BINARIES="${BINARIES} oneml-bootcamp-cpu-arm-linux-gnueabihf-$ONEML_POSTFIX.tar.gz";
209209
export BINARIES=${BINARIES};
210210
LABELS="";
211211
LABELS="${LABELS} oneml-bootcamp-x86_64.tar.gz";

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,14 @@ user has to rely on their own local environment and make sure all the dependenci
356356
before proceeding with the build process and run the applications.
357357

358358
#### Requirements
359-
Only Windows 10 64 bit is currently supported.
359+
- Only Windows 10 64 bit is currently supported.
360+
- Windows users are required to set an environment variable to configure the trust store for SSL certificates. More [here](https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/bigquery/quickstart#window).
361+
```
362+
@powershell -NoProfile -ExecutionPolicy unrestricted -Command ^
363+
(new-object System.Net.WebClient).Downloadfile( ^
364+
'https://pki.google.com/roots.pem', 'roots.pem')
365+
set GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=%cd%\roots.pem
366+
```
360367

361368
#### Dependencies
362369
The following dependencies must be installed in order for the project to build and run

apps/android-simple/app/src/main/java/com/sertiscorp/oneml/onemlsimpleapp/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
167167
FaceDetectorResult detectionResult = results.get(i);
168168
if (detectionResult.getSize() > 0) {
169169
BBoxList bboxes = detectionResult.getBBoxes();
170-
ScoreList scores = detectionResult.getScores();
170+
FloatList scores = detectionResult.getScores();
171171
Landmark5List landmarks = detectionResult.getLandmarks();
172172

173173
Log.d(TAG, String.format("Found %d faces", bboxes.size()));
@@ -214,7 +214,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
214214

215215
if (detectionResult.getBBoxes().size() > 0) {
216216
BBoxList bboxes = detectionResult.getBBoxes();
217-
ScoreList scores = detectionResult.getScores();
217+
FloatList scores = detectionResult.getScores();
218218
Landmark5List landmarks = detectionResult.getLandmarks();
219219

220220
Log.d(TAG, String.format("Found %d faces", bboxes.size()));

apps/android-simple/app/src/main/java/com/sertiscorp/oneml/onemlsimpleapp/OneMLApiFactory.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ private static LicenseManager createLicenseManager(){
2222
}else{
2323
manager.activateTrial();
2424
}
25+
boolean valid = manager.validateActivation() == LicenseStatus.Ok;
2526
Log.d(TAG, "license: machine_code=" + manager.getMachineCode());
26-
Log.d(TAG, "license: valid_activation=" + manager.isValidActivation());
27+
Log.d(TAG, "license: valid_activation=" + valid);
2728
Log.d(TAG, "license: activation_type=" + manager.getActivationType());
28-
if (manager.isValidActivation()){
29+
if (valid){
2930
Log.d(TAG, "license: expiry_date=" + manager.getActivationExpiryDate());
3031
}
3132
return manager;

apps/cpp/ekyc.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main(int argc, char** argv) {
2727

2828
// RUN
2929
oneML::face::EKYCResult output;
30-
oneML::face::EKYCOps ops{true, true};
30+
oneML::face::EKYCOps ops{true};
3131
ekyc.run(img1, img2, ops, ops, output);
3232

3333
oneML::face::Pose pose1;
@@ -56,6 +56,4 @@ int main(int argc, char** argv) {
5656
std::cout << "Pose: " << pose2 << std::endl;
5757
std::cout << "Landmarks: " << landmarks2 << std::endl;
5858

59-
oneML::UsageReport report = ekyc.get_usage();
60-
report.to_log();
6159
}

apps/cpp/face_detector.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,4 @@ int main(int argc, char** argv) {
5050
}
5151
}
5252

53-
oneML::UsageReport report = detector.get_usage();
54-
report.to_log();
5553
}

apps/cpp/face_embedder.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,4 @@ int main(int argc, char** argv) {
3636
std::cout << "Embedding sum: " << std::fixed << std::setprecision(5)
3737
<< std::accumulate(emb.begin(), emb.end(), decltype(emb)::value_type(0)) << std::endl;
3838

39-
oneML::UsageReport report = embedder.get_usage();
40-
report.to_log();
4139
}

apps/cpp/face_id.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,4 @@ int main(int argc, char** argv) {
105105
face_id.get_ids(ids);
106106
std::cout << "Gallery size: " << ids.size() << std::endl;
107107

108-
oneML::UsageReport report = face_id.get_usage();
109-
report.to_log();
110108
}

apps/cpp/face_pad.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ int main(int argc, char** argv) {
3232
<< output.get_spoof_prob() << std::endl;
3333
std::cout << "Spoof classification: " << output.is_spoof() << std::endl;
3434

35-
oneML::UsageReport report = pad_rgb.get_usage();
36-
report.to_log();
37-
3835
// PAD PAPER
3936
path = ASSETS_DIR_PATH "/pad-paper-set/spoof/1.jpg";
4037
utils.read_image_cv(path, img);
@@ -47,6 +44,4 @@ int main(int argc, char** argv) {
4744
<< output.get_spoof_prob() << std::endl;
4845
std::cout << "Spoof classification: " << output.is_spoof() << std::endl;
4946

50-
report = pad_paper.get_usage();
51-
report.to_log();
5247
}

apps/cpp/face_verification.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,4 @@ int main(int argc, char** argv) {
8585
std::pair<oneML::ReturnStatus, bool> is_same2 = face_id.is_the_same_person(img3, img4);
8686
std::cout << "Is the same person (george_robertson): " << is_same2.second << std::endl;
8787

88-
oneML::UsageReport report = detector.get_usage();
89-
report.to_log();
90-
91-
report = face_id.get_usage();
92-
report.to_log();
9388
}

0 commit comments

Comments
 (0)