blob: 265e0fa72358931558717807f7c3dbdccd1d110f [file] [log] [blame]
Cindy Liu43879e42023-10-18 11:18:03 -07001# Copyright 2023 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15load("//build_tools/bazel:kelvin.bzl", "generate_cc_arrays", "kelvin_binary")
16
Alex Van Damme8c1f6ee2023-07-26 16:17:06 -070017package(default_visibility = ["//visibility:public"])
18
19kelvin_binary(
20 name = "person_detection",
21 srcs = [
Alex Van Damme8c1f6ee2023-07-26 16:17:06 -070022 "person_bmp.cc",
Cindy Liu43879e42023-10-18 11:18:03 -070023 "person_detect_tflite.cc",
24 "person_detection.cc",
Alex Van Damme8c1f6ee2023-07-26 16:17:06 -070025 ],
26 hdrs = [
27 "person_bmp.h",
28 "person_detect_tflite.h",
29 ],
30 deps = [
Cindy Liu43879e42023-10-18 11:18:03 -070031 "//crt",
Alex Van Damme8c1f6ee2023-07-26 16:17:06 -070032 "@tflite-micro//tensorflow/lite/micro:micro_framework",
33 "@tflite-micro//tensorflow/lite/micro:system_setup",
34 ],
35)
36
37generate_cc_arrays(
38 name = "person_bmp_cc",
39 src = "@tflite-micro//tensorflow/lite/micro/examples/person_detection:testdata/person.bmp",
40 out = "person_bmp.cc",
41)
Cindy Liu43879e42023-10-18 11:18:03 -070042
Alex Van Damme8c1f6ee2023-07-26 16:17:06 -070043generate_cc_arrays(
44 name = "person_bmp_h",
45 src = "@tflite-micro//tensorflow/lite/micro/examples/person_detection:testdata/person.bmp",
46 out = "person_bmp.h",
47)
48
49generate_cc_arrays(
50 name = "person_detect_tflite_cc",
51 src = "@tflite-micro//tensorflow/lite/micro/models:person_detect.tflite",
52 out = "person_detect_tflite.cc",
53)
54
55generate_cc_arrays(
56 name = "person_detect_tflite_h",
57 src = "@tflite-micro//tensorflow/lite/micro/models:person_detect.tflite",
58 out = "person_detect_tflite.h",
59)