Cindy Liu | 43879e4 | 2023-10-18 11:18:03 -0700 | [diff] [blame] | 1 | # 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 | |
| 15 | load("//build_tools/bazel:kelvin.bzl", "generate_cc_arrays", "kelvin_binary") |
| 16 | |
Alex Van Damme | 8c1f6ee | 2023-07-26 16:17:06 -0700 | [diff] [blame] | 17 | package(default_visibility = ["//visibility:public"]) |
| 18 | |
| 19 | kelvin_binary( |
| 20 | name = "person_detection", |
| 21 | srcs = [ |
Alex Van Damme | 8c1f6ee | 2023-07-26 16:17:06 -0700 | [diff] [blame] | 22 | "person_bmp.cc", |
Cindy Liu | 43879e4 | 2023-10-18 11:18:03 -0700 | [diff] [blame] | 23 | "person_detect_tflite.cc", |
| 24 | "person_detection.cc", |
Alex Van Damme | 8c1f6ee | 2023-07-26 16:17:06 -0700 | [diff] [blame] | 25 | ], |
| 26 | hdrs = [ |
| 27 | "person_bmp.h", |
| 28 | "person_detect_tflite.h", |
| 29 | ], |
| 30 | deps = [ |
Cindy Liu | 43879e4 | 2023-10-18 11:18:03 -0700 | [diff] [blame] | 31 | "//crt", |
Alex Van Damme | 8c1f6ee | 2023-07-26 16:17:06 -0700 | [diff] [blame] | 32 | "@tflite-micro//tensorflow/lite/micro:micro_framework", |
| 33 | "@tflite-micro//tensorflow/lite/micro:system_setup", |
| 34 | ], |
| 35 | ) |
| 36 | |
| 37 | generate_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 Liu | 43879e4 | 2023-10-18 11:18:03 -0700 | [diff] [blame] | 42 | |
Alex Van Damme | 8c1f6ee | 2023-07-26 16:17:06 -0700 | [diff] [blame] | 43 | generate_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 | |
| 49 | generate_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 | |
| 55 | generate_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 | ) |