Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This contains the supporting SDK for Vertex AI Vision's GA launch. PiperOrigin-RevId: 494284494
- Loading branch information
0 parents
commit 1c2696f
Showing
13,456 changed files
with
4,564,743 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
build --copt=-fdiagnostics-color=always | ||
run --copt=-fdiagnostics-color=always | ||
|
||
build --cxxopt=-std=c++14 | ||
run --cxxopt=-std=c++14 | ||
|
||
# Enable test result streaming | ||
test --test_output=streamed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pb filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[submodule "third_party/gstreamer"] | ||
path = third_party/gstreamer | ||
url = sso://visionai/gstreamer | ||
[submodule "third_party/ffmpeg"] | ||
path = third_party/ffmpeg | ||
url = sso://visionai/ffmpeg | ||
[submodule "third_party/glib"] | ||
path = third_party/glib | ||
url = sso://visionai/glib | ||
[submodule "third_party/libffi"] | ||
path = third_party/libffi | ||
url = sso://visionai/libffi | ||
[submodule "third_party/pcre"] | ||
path = third_party/pcre | ||
url = sso://visionai/pcre |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
load("@bazel_gazelle//:def.bzl", "gazelle") | ||
|
||
# gazelle:prefix | ||
gazelle(name = "gazelle") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# How to Contribute | ||
|
||
We'd love to accept your patches and contributions to this project. There are | ||
just a few small guidelines you need to follow. | ||
|
||
## Contributor License Agreement | ||
|
||
Contributions to this project must be accompanied by a Contributor License | ||
Agreement (CLA). You (or your employer) retain the copyright to your | ||
contribution; this simply gives us permission to use and redistribute your | ||
contributions as part of the project. Head over to | ||
<https://cla.developers.google.com/> to see your current agreements on file or | ||
to sign a new one. | ||
|
||
You generally only need to submit a CLA once, so if you've already submitted one | ||
(even if it was for a different project), you probably don't need to do it | ||
again. | ||
|
||
## Code Reviews | ||
|
||
All submissions, including submissions by project members, require review. We | ||
use GitHub pull requests for this purpose. Consult | ||
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more | ||
information on using pull requests. | ||
|
||
## Community Guidelines | ||
|
||
This project follows | ||
[Google's Open Source Community Guidelines](https://opensource.google/conduct/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Copyright 2022 Google LLC | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its contributors | ||
may be used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Vertex AI Vision | ||
|
||
The Vertex AI Vision Software Development Kit (SDK) contains tools and libraries | ||
for users to develop programs and custom workflows with Vertex AI Vision. | ||
|
||
## See also | ||
For further information, please visit the official documentation: | ||
* [Vertex AI Vision SDK](https://cloud.google.com/vision-ai/docs/cloud-environment#vertex-ai-vision-sdk) | ||
* [Vertex AI Vision General Documentation](https://cloud.google.com/vision-ai/docs/overview) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
workspace(name = "visionai") | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
http_archive( | ||
name = "io_bazel_rules_go", | ||
sha256 = "8e968b5fcea1d2d64071872b12737bbb5514524ee5f0a4f54f5920266c261acb", | ||
url = "https://github.com/bazelbuild/rules_go/releases/download/v0.28.0/rules_go-v0.28.0.zip", | ||
) | ||
|
||
http_archive( | ||
name = "bazel_gazelle", | ||
sha256 = "62ca106be173579c0a167deb23358fdfe71ffa1e4cfdddf5582af26520f1c66f", | ||
url = "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz", | ||
) | ||
|
||
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies") | ||
|
||
go_rules_dependencies() | ||
|
||
load("//:deps.bzl", "go_dependencies") | ||
|
||
# gazelle:repository_macro deps.bzl%go_dependencies | ||
go_dependencies() | ||
|
||
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") | ||
|
||
gazelle_dependencies(go_sdk = "go_sdk") | ||
|
||
# Load visionai-sdk specific dependencies. | ||
load("//bazel:visionai_deps.bzl", "visionai_deps") | ||
|
||
visionai_deps() | ||
|
||
# Requirements for @com_github_googleapis_google_cloud_cpp. | ||
load("@com_github_googleapis_google_cloud_cpp//bazel:google_cloud_cpp_deps.bzl", "google_cloud_cpp_deps") | ||
|
||
google_cloud_cpp_deps() | ||
|
||
# Google APIs imports. Required to build googleapis. | ||
load("@com_github_googleapis_googleapis//:repository_rules.bzl", "switched_rules_by_language") | ||
|
||
# Enable language specific rules. | ||
# All non-enabled language-specific rules will default to no-op implementations. | ||
switched_rules_by_language( | ||
name = "com_google_googleapis_imports", | ||
cc = True, | ||
go = True, | ||
grpc = True, | ||
) | ||
|
||
# Requirements for @com_github_grpc_grpc. | ||
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") | ||
|
||
grpc_deps() | ||
|
||
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") | ||
|
||
grpc_extra_deps() | ||
|
||
load("@com_github_jupp0r_prometheus_cpp//bazel:repositories.bzl", "prometheus_cpp_repositories") | ||
|
||
prometheus_cpp_repositories() | ||
|
||
load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies") | ||
|
||
rules_foreign_cc_dependencies() | ||
|
||
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") | ||
|
||
rules_proto_dependencies() | ||
|
||
rules_proto_toolchains() | ||
|
||
# comment |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external") | ||
|
||
filegroup( | ||
name = "all_srcs", | ||
srcs = glob(["**"]), | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
cmake_external( | ||
name = "opencv", | ||
cmake_options = [ | ||
"-DWITH_QT=ON", | ||
"-DBUILD_LIST=core,highgui,imgcodecs,imgproc,videoio", | ||
], | ||
lib_source = "@opencv4//:all_srcs", | ||
make_commands = [ | ||
"make -j7", | ||
"make install", | ||
], | ||
out_include_dir = "include/opencv4", | ||
shared_libraries = [ | ||
"libopencv_core.so.406", | ||
"libopencv_highgui.so.406", | ||
"libopencv_imgcodecs.so.406", | ||
"libopencv_imgproc.so.406", | ||
"libopencv_videoio.so.406", | ||
], | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
cc_library( | ||
name = "bzip2", | ||
hdrs = [ | ||
"bzlib.h", | ||
], | ||
srcs = [ | ||
"blocksort.c", | ||
"huffman.c", | ||
"crctable.c", | ||
"randtable.c", | ||
"compress.c", | ||
"decompress.c", | ||
"bzlib.c", | ||
"bzlib_private.h", | ||
], | ||
includes = ["."], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff -Naur a/BUILD.bazel b/BUILD.bazel | ||
--- a/BUILD.bazel | ||
+++ b/BUILD.bazel | ||
@@ -13,9 +13,10 @@ | ||
# limitations under the License. | ||
|
||
load("@rules_proto//proto:defs.bzl", "proto_library") | ||
+load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library") | ||
|
||
package(default_visibility = [ | ||
- "//visibility:private", | ||
+ "//visibility:public", | ||
]) | ||
|
||
proto_library( | ||
@@ -117,6 +118,18 @@ | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
+cc_proto_library( | ||
+ name = "health_cc_proto", | ||
+ deps = [":health_proto"], | ||
+) | ||
+ | ||
+cc_grpc_library( | ||
+ name = "health_cc_grpc_proto", | ||
+ srcs = [":health_proto"], | ||
+ grpc_only = True, | ||
+ deps = [":health_cc_proto"], | ||
+) | ||
+ | ||
java_proto_library( | ||
name = "health_java_proto", | ||
visibility = ["//visibility:public"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff -Naur mediapipe-ar/mediapipe-0.8.11/mediapipe/calculators/tensorflow/BUILD mediapipe/mediapipe/calculators/tensorflow/BUILD | ||
--- a/mediapipe/calculators/tensorflow/BUILD | ||
+++ b/mediapipe/calculators/tensorflow/BUILD | ||
@@ -453,7 +453,6 @@ | ||
deps = [ | ||
":tensorflow_session", | ||
":tensorflow_inference_calculator_cc_proto", | ||
- "@com_google_absl//absl/log:check", | ||
"//mediapipe/framework:timestamp", | ||
"@com_google_absl//absl/base:core_headers", | ||
"@com_google_absl//absl/memory", | ||
diff -Naur mediapipe-ar/mediapipe-0.8.11/mediapipe/framework/tool/mediapipe_graph.bzl mediapipe/mediapipe | ||
/framework/tool/mediapipe_graph.bzl | ||
--- a/mediapipe/framework/tool/mediapipe_graph.bzl | ||
+++ b/mediapipe/framework/tool/mediapipe_graph.bzl | ||
@@ -239,10 +239,10 @@ | ||
name = name + "_type_name", | ||
srcs = [proto_lib + "_direct-direct-descriptor-set.proto.bin"], | ||
outs = [name + "_type_name.h"], | ||
- cmd = ("$(location " + "//mediapipe/framework/tool:message_type_util" + ") " + | ||
+ cmd = ("$(location " + clean_dep("//mediapipe/framework/tool:message_type_util") + ") " + | ||
("--input_path=$(location %s) " % (proto_lib + "_direct-direct-descriptor-set.proto.bin")) + | ||
("--root_type_macro_output_path=$(location %s) " % (name + "_type_name.h"))), | ||
- tools = ["//mediapipe/framework/tool:message_type_util"], | ||
+ tools = [clean_dep("//mediapipe/framework/tool:message_type_util")], | ||
visibility = visibility, | ||
testonly = testonly, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
cc_library( | ||
name = "ffmpeg", | ||
srcs = glob( | ||
[ | ||
"lib/x86_64-linux-gnu/libavcodec.so", | ||
"lib/x86_64-linux-gnu/libavdevice.so", | ||
"lib/x86_64-linux-gnu/libavfilter.so", | ||
"lib/x86_64-linux-gnu/libavformat.so", | ||
"lib/x86_64-linux-gnu/libavresample.so", | ||
"lib/x86_64-linux-gnu/libavutil.so", | ||
"lib/x86_64-linux-gnu/libpostproc.so", | ||
"lib/x86_64-linux-gnu/libswresample.so", | ||
"lib/x86_64-linux-gnu/libswscale.so", | ||
], | ||
), | ||
hdrs = glob([ | ||
"include/x86_64-linux-gnu/libavcodec/*.h", | ||
"include/x86_64-linux-gnu/libavformat/*.h", | ||
"include/x86_64-linux-gnu/libavutil/*.h", | ||
"include/x86_64-linux-gnu/libswresample/*.h", | ||
"include/x86_64-linux-gnu/libswscale/*.h", | ||
]), | ||
includes = ["include/x86_64-linux-gnu/"], | ||
linkstatic = 1, | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
load("@bazel_skylib//rules:native_binary.bzl", "native_binary") | ||
|
||
cc_library( | ||
name = "glib", | ||
srcs = glob([ | ||
"lib/x86_64-linux-gnu/libglib-2.0.so", | ||
]), | ||
hdrs = glob([ | ||
"include/glib/glib/*.h", | ||
"include/glib/gio/*.h", | ||
"include/glib/gobject/*.h", | ||
"include/glib/gmodule/*.h", | ||
"include/glib/*.h", | ||
]), | ||
includes = ["include/glib"], | ||
linkstatic = 1, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
cc_library( | ||
name = "gmodule", | ||
srcs = glob([ | ||
"lib/x86_64-linux-gnu/libgmodule-2.0.so", | ||
]), | ||
hdrs = glob([ | ||
"include/glib/glib/*.h", | ||
"include/glib/gio/*.h", | ||
"include/glib/gobject/*.h", | ||
"include/glib/gmodule/*.h", | ||
"include/glib/*.h", | ||
]), | ||
includes = ["include/glib"], | ||
linkstatic = 1, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
cc_library( | ||
name = "gio", | ||
srcs = glob([ | ||
"lib/x86_64-linux-gnu/libgio-2.0.so", | ||
]), | ||
hdrs = glob([ | ||
"include/glib/glib/*.h", | ||
"include/glib/gio/*.h", | ||
"include/glib/gobject/*.h", | ||
"include/glib/gmodule/*.h", | ||
"include/glib/*.h", | ||
]), | ||
includes = ["include/glib"], | ||
linkstatic = 1, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
cc_library( | ||
name = "gobject", | ||
srcs = glob([ | ||
"lib/x86_64-linux-gnu/libgobject-2.0.so", | ||
]), | ||
hdrs = glob([ | ||
"include/glib/glib/*.h", | ||
"include/glib/gio/*.h", | ||
"include/glib/gobject/*.h", | ||
"include/glib/gmodule/*.h", | ||
"include/glib/*.h", | ||
]), | ||
includes = ["include/glib"], | ||
linkstatic = 1, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
native_binary( | ||
name = "glib-mkenums", | ||
src = "bin/glib-mkenums", | ||
out = "glib-mkenums", | ||
visibility = ["//visibility:public"], | ||
) |
Oops, something went wrong.