|
| 1 | +# Tensorflow Object Detection API: main runnables. |
| 2 | + |
| 3 | +package( |
| 4 | + default_visibility = ["//visibility:public"], |
| 5 | +) |
| 6 | + |
| 7 | +licenses(["notice"]) |
| 8 | + |
| 9 | +# Apache 2.0 |
| 10 | + |
| 11 | +py_binary( |
| 12 | + name = "train", |
| 13 | + srcs = [ |
| 14 | + "train.py", |
| 15 | + ], |
| 16 | + deps = [ |
| 17 | + ":trainer", |
| 18 | + "//tensorflow", |
| 19 | + "//tensorflow_models/object_detection/builders:input_reader_builder", |
| 20 | + "//tensorflow_models/object_detection/builders:model_builder", |
| 21 | + "//tensorflow_models/object_detection/protos:input_reader_py_pb2", |
| 22 | + "//tensorflow_models/object_detection/protos:model_py_pb2", |
| 23 | + "//tensorflow_models/object_detection/protos:pipeline_py_pb2", |
| 24 | + "//tensorflow_models/object_detection/protos:train_py_pb2", |
| 25 | + ], |
| 26 | +) |
| 27 | + |
| 28 | +py_library( |
| 29 | + name = "trainer", |
| 30 | + srcs = ["trainer.py"], |
| 31 | + deps = [ |
| 32 | + "//tensorflow", |
| 33 | + "//tensorflow_models/object_detection/builders:optimizer_builder", |
| 34 | + "//tensorflow_models/object_detection/builders:preprocessor_builder", |
| 35 | + "//tensorflow_models/object_detection/core:batcher", |
| 36 | + "//tensorflow_models/object_detection/core:standard_fields", |
| 37 | + "//tensorflow_models/object_detection/utils:ops", |
| 38 | + "//tensorflow_models/object_detection/utils:variables_helper", |
| 39 | + "//tensorflow_models/slim:model_deploy", |
| 40 | + ], |
| 41 | +) |
| 42 | + |
| 43 | +py_test( |
| 44 | + name = "trainer_test", |
| 45 | + srcs = ["trainer_test.py"], |
| 46 | + deps = [ |
| 47 | + ":trainer", |
| 48 | + "//tensorflow", |
| 49 | + "//tensorflow_models/object_detection/core:losses", |
| 50 | + "//tensorflow_models/object_detection/core:model", |
| 51 | + "//tensorflow_models/object_detection/core:standard_fields", |
| 52 | + "//tensorflow_models/object_detection/protos:train_py_pb2", |
| 53 | + ], |
| 54 | +) |
| 55 | + |
| 56 | +py_library( |
| 57 | + name = "eval_util", |
| 58 | + srcs = [ |
| 59 | + "eval_util.py", |
| 60 | + ], |
| 61 | + deps = [ |
| 62 | + "//tensorflow", |
| 63 | + "//tensorflow_models/object_detection/utils:label_map_util", |
| 64 | + "//tensorflow_models/object_detection/utils:object_detection_evaluation", |
| 65 | + "//tensorflow_models/object_detection/utils:visualization_utils", |
| 66 | + ], |
| 67 | +) |
| 68 | + |
| 69 | +py_library( |
| 70 | + name = "evaluator", |
| 71 | + srcs = ["evaluator.py"], |
| 72 | + deps = [ |
| 73 | + "//tensorflow", |
| 74 | + "//tensorflow_models/object_detection:eval_util", |
| 75 | + "//tensorflow_models/object_detection/core:box_list", |
| 76 | + "//tensorflow_models/object_detection/core:box_list_ops", |
| 77 | + "//tensorflow_models/object_detection/core:prefetcher", |
| 78 | + "//tensorflow_models/object_detection/core:standard_fields", |
| 79 | + "//tensorflow_models/object_detection/protos:eval_py_pb2", |
| 80 | + ], |
| 81 | +) |
| 82 | + |
| 83 | +py_binary( |
| 84 | + name = "eval", |
| 85 | + srcs = [ |
| 86 | + "eval.py", |
| 87 | + ], |
| 88 | + deps = [ |
| 89 | + ":evaluator", |
| 90 | + "//tensorflow", |
| 91 | + "//tensorflow_models/object_detection/builders:input_reader_builder", |
| 92 | + "//tensorflow_models/object_detection/builders:model_builder", |
| 93 | + "//tensorflow_models/object_detection/protos:eval_py_pb2", |
| 94 | + "//tensorflow_models/object_detection/protos:input_reader_py_pb2", |
| 95 | + "//tensorflow_models/object_detection/protos:model_py_pb2", |
| 96 | + "//tensorflow_models/object_detection/protos:pipeline_py_pb2", |
| 97 | + "//tensorflow_models/object_detection/utils:label_map_util", |
| 98 | + ], |
| 99 | +) |
| 100 | + |
| 101 | +py_library( |
| 102 | + name = "exporter", |
| 103 | + srcs = [ |
| 104 | + "exporter.py", |
| 105 | + ], |
| 106 | + deps = [ |
| 107 | + "//tensorflow", |
| 108 | + "//tensorflow/python/tools:freeze_graph_lib", |
| 109 | + "//tensorflow_models/object_detection/builders:model_builder", |
| 110 | + "//tensorflow_models/object_detection/core:standard_fields", |
| 111 | + "//tensorflow_models/object_detection/data_decoders:tf_example_decoder", |
| 112 | + ], |
| 113 | +) |
| 114 | + |
| 115 | +py_test( |
| 116 | + name = "exporter_test", |
| 117 | + srcs = [ |
| 118 | + "exporter_test.py", |
| 119 | + ], |
| 120 | + deps = [ |
| 121 | + ":exporter", |
| 122 | + "//tensorflow", |
| 123 | + "//tensorflow_models/object_detection/builders:model_builder", |
| 124 | + "//tensorflow_models/object_detection/core:model", |
| 125 | + "//tensorflow_models/object_detection/protos:pipeline_py_pb2", |
| 126 | + ], |
| 127 | +) |
| 128 | + |
| 129 | +py_binary( |
| 130 | + name = "export_inference_graph", |
| 131 | + srcs = [ |
| 132 | + "export_inference_graph.py", |
| 133 | + ], |
| 134 | + deps = [ |
| 135 | + ":exporter", |
| 136 | + "//tensorflow", |
| 137 | + "//tensorflow_models/object_detection/protos:pipeline_py_pb2", |
| 138 | + ], |
| 139 | +) |
| 140 | + |
| 141 | +py_binary( |
| 142 | + name = "create_pascal_tf_record", |
| 143 | + srcs = [ |
| 144 | + "create_pascal_tf_record.py", |
| 145 | + ], |
| 146 | + deps = [ |
| 147 | + "//third_party/py/PIL:pil", |
| 148 | + "//third_party/py/lxml", |
| 149 | + "//tensorflow", |
| 150 | + "//tensorflow_models/object_detection/utils:dataset_util", |
| 151 | + "//tensorflow_models/object_detection/utils:label_map_util", |
| 152 | + ], |
| 153 | +) |
| 154 | + |
| 155 | +py_test( |
| 156 | + name = "create_pascal_tf_record_test", |
| 157 | + srcs = [ |
| 158 | + "create_pascal_tf_record_test.py", |
| 159 | + ], |
| 160 | + deps = [ |
| 161 | + ":create_pascal_tf_record", |
| 162 | + "//tensorflow", |
| 163 | + ], |
| 164 | +) |
| 165 | + |
| 166 | +py_binary( |
| 167 | + name = "create_pet_tf_record", |
| 168 | + srcs = [ |
| 169 | + "create_pet_tf_record.py", |
| 170 | + ], |
| 171 | + deps = [ |
| 172 | + "//third_party/py/PIL:pil", |
| 173 | + "//third_party/py/lxml", |
| 174 | + "//tensorflow", |
| 175 | + "//tensorflow_models/object_detection/utils:dataset_util", |
| 176 | + "//tensorflow_models/object_detection/utils:label_map_util", |
| 177 | + ], |
| 178 | +) |
0 commit comments