sudo apt update && sudo apt upgrade
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bazel build -c opt //tensorflow/contrib/android:libtensorflow_inference.so \ | |
| --crosstool_top=//external:android/crosstool \ | |
| --host_crosstool_top=@bazel_tools//tools/cpp:toolchain --cpu=armeabi-v7a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TENSORFLOW_DIR=/home/VICOMTECH/uelordi/repos/tensorflow | |
| MODEL_NAME=quantized_face_graph.pb | |
| arch=armeabi-v7a | |
| ANDROID_PROJ=/home/VICOMTECH/uelordi/projects/SwitchTrackingEngine/kanvas_tracker/kt/tools/Deep-learning-tools/android/TFFaceDetection | |
| NATIVE_LIB_DIR=${ANDROID_PROJ}/app/src/main/jniLibs/$arch | |
| JAVA_LIBRARY_DIR=${ANDROID_PROJ}/app/libs | |
| #APPLY SELECTIVE REGISTRATION: | |
| OLD_PWD=$(pwd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| toco \ | |
| --input_file=frozen_output.pb \ | |
| --output_file=optimized_graph_seg.lite \ | |
| --input_format=TENSORFLOW_GRAPHDEF \ | |
| --output_format=TFLITE \ | |
| --input_shape=1024,2048,3 \ | |
| --input_array=Placeholder \ | |
| --output_array=Reshape_1 \ | |
| --inference_type=FLOAT \ | |
| --input_type=FLOAT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This file was autogenerated by print_selective_registration_header.py | |
| #ifndef OPS_TO_REGISTER | |
| #define OPS_TO_REGISTER | |
| namespace { | |
| constexpr const char* skip(const char* x) { | |
| return (*x) ? (*x == ' ' ? skip(x + 1) : x) : x; | |
| } | |
| constexpr bool isequal(const char* x, const char* y) { |
Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.
Download the latest Raspbian Jessie Light image. Earlier versions of Raspbian won't work.
Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String apiKey = BuildConfig.API_KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // callback4.cpp - C++11 Lambda Callback | |
| // To build: | |
| // g++ -std=c++11 callback4.cpp | |
| // Situation: A "Caller" class allows another class "Callee" | |
| // to connect to it via callback. How to implement this? | |
| // A C++11 lambda function can be used. |
NewerOlder