1# Description: 2# TensorFlow Lite for Microcontrollers Vision Example. 3package( 4 default_visibility = ["//visibility:public"], 5 features = ["-layering_check"], 6 licenses = ["notice"], 7) 8 9cc_library( 10 name = "model_settings", 11 srcs = [ 12 "model_settings.cc", 13 ], 14 hdrs = [ 15 "model_settings.h", 16 ], 17) 18 19cc_library( 20 name = "person_detect_model_data", 21 srcs = [ 22 "@person_detect_data//:person_detect_model_data", 23 ], 24 hdrs = [ 25 "person_detect_model_data.h", 26 ], 27 tags = [ 28 "no_oss", # TODO(b/174680668): Exclude from OSS. 29 ], 30) 31 32cc_library( 33 name = "simple_images_test_data", 34 srcs = [ 35 "no_person_image_data.cc", 36 "person_image_data.cc", 37 ], 38 hdrs = [ 39 "no_person_image_data.h", 40 "person_image_data.h", 41 ], 42 tags = [ 43 "no_oss", # TODO(b/174680668): Exclude from OSS. 44 ], 45 deps = [ 46 ":model_settings", 47 ], 48) 49 50cc_test( 51 name = "person_detection_test", 52 srcs = ["person_detection_test.cc"], 53 tags = [ 54 "no_oss", # TODO(b/174680668): Exclude from OSS. 55 ], 56 deps = [ 57 ":model_settings", 58 ":person_detect_model_data", 59 ":simple_images_test_data", 60 "//tensorflow/lite/c:common", 61 "//tensorflow/lite/micro:micro_error_reporter", 62 "//tensorflow/lite/micro:micro_framework", 63 "//tensorflow/lite/micro:op_resolvers", 64 "//tensorflow/lite/micro/testing:micro_test", 65 "//tensorflow/lite/schema:schema_fbs", 66 ], 67) 68 69cc_library( 70 name = "image_provider", 71 srcs = [ 72 "image_provider.cc", 73 ], 74 hdrs = [ 75 "image_provider.h", 76 ], 77 deps = [ 78 ":model_settings", 79 "//tensorflow/lite/c:common", 80 "//tensorflow/lite/micro:micro_error_reporter", 81 ], 82) 83 84cc_test( 85 name = "image_provider_test", 86 srcs = [ 87 "image_provider_test.cc", 88 ], 89 deps = [ 90 ":image_provider", 91 ":model_settings", 92 "//tensorflow/lite/c:common", 93 "//tensorflow/lite/micro:micro_error_reporter", 94 "//tensorflow/lite/micro/testing:micro_test", 95 ], 96) 97 98cc_library( 99 name = "detection_responder", 100 srcs = [ 101 "detection_responder.cc", 102 ], 103 hdrs = [ 104 "detection_responder.h", 105 ], 106 deps = [ 107 "//tensorflow/lite/c:common", 108 "//tensorflow/lite/micro:micro_error_reporter", 109 ], 110) 111 112cc_test( 113 name = "detection_responder_test", 114 srcs = [ 115 "detection_responder_test.cc", 116 ], 117 deps = [ 118 ":detection_responder", 119 "//tensorflow/lite/micro/testing:micro_test", 120 ], 121) 122 123cc_binary( 124 name = "person_detection", 125 srcs = [ 126 "main.cc", 127 "main_functions.cc", 128 "main_functions.h", 129 ], 130 tags = [ 131 "no_oss", # TODO(b/174680668): Exclude from OSS. 132 ], 133 deps = [ 134 ":detection_responder", 135 ":image_provider", 136 ":model_settings", 137 ":person_detect_model_data", 138 "//tensorflow/lite/micro:micro_error_reporter", 139 "//tensorflow/lite/micro:micro_framework", 140 "//tensorflow/lite/micro:op_resolvers", 141 "//tensorflow/lite/micro:system_setup", 142 "//tensorflow/lite/schema:schema_fbs", 143 ], 144) 145