-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
61 lines (55 loc) · 1.92 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Description:
# TensorFlow camera demo app for Android.
load("@build_bazel_rules_android//android:rules.bzl", "android_binary")
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"])
# Build the demo native demo lib from the original directory to reduce code
# reuse. Note that the Java counterparts (ObjectTracker.java and
# ImageUtils.java) are still duplicated.
cc_library(
name = "tensorflow_native_libs",
srcs = [
"//tensorflow/examples/android:libtensorflow_demo.so",
],
tags = [
"manual",
"notap",
],
)
android_binary(
name = "tflite_demo",
srcs = glob([
"app/src/main/java/**/*.java",
]),
aapt_version = "aapt",
# Package assets from assets dir as well as all model targets.
# Remove undesired models (and corresponding Activities in source)
# to reduce APK size.
assets = [
"//tensorflow/lite/examples/android/app/src/main/assets:labels_mobilenet_quant_v1_224.txt",
"@tflite_mobilenet_quant//:mobilenet_v1_1.0_224_quant.tflite",
"@tflite_conv_actions_frozen//:conv_actions_frozen.tflite",
"//tensorflow/lite/examples/android/app/src/main/assets:conv_actions_labels.txt",
"@tflite_mobilenet_ssd//:mobilenet_ssd.tflite",
"@tflite_mobilenet_ssd_quant//:detect.tflite",
"//tensorflow/lite/examples/android/app/src/main/assets:box_priors.txt",
"//tensorflow/lite/examples/android/app/src/main/assets:coco_labels_list.txt",
],
assets_dir = "",
custom_package = "com.tintash.rnd.tflite",
inline_constants = 1,
manifest = "app/src/main/AndroidManifest.xml",
nocompress_extensions = [
".tflite",
],
resource_files = glob(["app/src/main/res/**"]),
tags = [
"manual",
"notap",
],
deps = [
":tensorflow_native_libs",
"//tensorflow/lite/java:tensorflowlite",
],
)