Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

feat(v1): add LEFT_CHEEK_CENTER and RIGHT_CHEEK_CENTER to FaceAnnotation #103

Merged
merged 11 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .kokoro/test-samples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ for file in samples/**/requirements.txt; do
python3.6 -m nox -s "$RUN_TESTS_SESSION"
EXIT=$?

# If this is a periodic build, send the test log to the FlakyBot.
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
# If this is a periodic build, send the test log to the Build Cop Bot.
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop.
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
$KOKORO_GFILE_DIR/linux_amd64/flakybot
chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop
$KOKORO_GFILE_DIR/linux_amd64/buildcop
fi

if [[ $EXIT -ne 0 ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/trampoline_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then
"KOKORO_GITHUB_COMMIT"
"KOKORO_GITHUB_PULL_REQUEST_NUMBER"
"KOKORO_GITHUB_PULL_REQUEST_COMMIT"
# For FlakyBot
# For Build Cop Bot
"KOKORO_GITHUB_COMMIT_URL"
"KOKORO_GITHUB_PULL_REQUEST_URL"
)
Expand Down
6 changes: 6 additions & 0 deletions docs/vision_v1/image_annotator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ImageAnnotator
--------------------------------

.. automodule:: google.cloud.vision_v1.services.image_annotator
:members:
:inherited-members:
11 changes: 11 additions & 0 deletions docs/vision_v1/product_search.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ProductSearch
-------------------------------

.. automodule:: google.cloud.vision_v1.services.product_search
:members:
:inherited-members:


.. automodule:: google.cloud.vision_v1.services.product_search.pagers
:members:
:inherited-members:
10 changes: 4 additions & 6 deletions docs/vision_v1/services.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Services for Google Cloud Vision v1 API
=======================================
.. toctree::
:maxdepth: 2

.. automodule:: google.cloud.vision_v1.services.image_annotator
:members:
:inherited-members:
.. automodule:: google.cloud.vision_v1.services.product_search
:members:
:inherited-members:
image_annotator
product_search
1 change: 1 addition & 0 deletions docs/vision_v1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Types for Google Cloud Vision v1 API

.. automodule:: google.cloud.vision_v1.types
:members:
:undoc-members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/vision_v1p2beta1/image_annotator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ImageAnnotator
--------------------------------

.. automodule:: google.cloud.vision_v1p2beta1.services.image_annotator
:members:
:inherited-members:
6 changes: 3 additions & 3 deletions docs/vision_v1p2beta1/services.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Services for Google Cloud Vision v1p2beta1 API
==============================================
.. toctree::
:maxdepth: 2

.. automodule:: google.cloud.vision_v1p2beta1.services.image_annotator
:members:
:inherited-members:
image_annotator
1 change: 1 addition & 0 deletions docs/vision_v1p2beta1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Types for Google Cloud Vision v1p2beta1 API

.. automodule:: google.cloud.vision_v1p2beta1.types
:members:
:undoc-members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/vision_v1p3beta1/image_annotator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ImageAnnotator
--------------------------------

.. automodule:: google.cloud.vision_v1p3beta1.services.image_annotator
:members:
:inherited-members:
11 changes: 11 additions & 0 deletions docs/vision_v1p3beta1/product_search.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ProductSearch
-------------------------------

.. automodule:: google.cloud.vision_v1p3beta1.services.product_search
:members:
:inherited-members:


.. automodule:: google.cloud.vision_v1p3beta1.services.product_search.pagers
:members:
:inherited-members:
10 changes: 4 additions & 6 deletions docs/vision_v1p3beta1/services.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Services for Google Cloud Vision v1p3beta1 API
==============================================
.. toctree::
:maxdepth: 2

.. automodule:: google.cloud.vision_v1p3beta1.services.image_annotator
:members:
:inherited-members:
.. automodule:: google.cloud.vision_v1p3beta1.services.product_search
:members:
:inherited-members:
image_annotator
product_search
1 change: 1 addition & 0 deletions docs/vision_v1p3beta1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Types for Google Cloud Vision v1p3beta1 API

.. automodule:: google.cloud.vision_v1p3beta1.types
:members:
:undoc-members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/vision_v1p4beta1/image_annotator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ImageAnnotator
--------------------------------

.. automodule:: google.cloud.vision_v1p4beta1.services.image_annotator
:members:
:inherited-members:
11 changes: 11 additions & 0 deletions docs/vision_v1p4beta1/product_search.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ProductSearch
-------------------------------

.. automodule:: google.cloud.vision_v1p4beta1.services.product_search
:members:
:inherited-members:


.. automodule:: google.cloud.vision_v1p4beta1.services.product_search.pagers
:members:
:inherited-members:
10 changes: 4 additions & 6 deletions docs/vision_v1p4beta1/services.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Services for Google Cloud Vision v1p4beta1 API
==============================================
.. toctree::
:maxdepth: 2

.. automodule:: google.cloud.vision_v1p4beta1.services.image_annotator
:members:
:inherited-members:
.. automodule:: google.cloud.vision_v1p4beta1.services.product_search
:members:
:inherited-members:
image_annotator
product_search
1 change: 1 addition & 0 deletions docs/vision_v1p4beta1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Types for Google Cloud Vision v1p4beta1 API

.. automodule:: google.cloud.vision_v1p4beta1.types
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions google/cloud/vision_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
"GetReferenceImageRequest",
"Image",
"ImageAnnotationContext",
"ImageAnnotatorClient",
"ImageContext",
"ImageProperties",
"ImageSource",
Expand Down Expand Up @@ -180,6 +179,7 @@ class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
"Paragraph",
"Position",
"Product",
"ProductSearchClient",
"ProductSearchParams",
"ProductSearchResults",
"ProductSet",
Expand All @@ -198,5 +198,5 @@ class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
"WebDetection",
"WebDetectionParams",
"Word",
"ProductSearchClient",
"ImageAnnotatorClient",
)
3 changes: 1 addition & 2 deletions google/cloud/vision_v1/proto/geometry.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

Expand Down
53 changes: 34 additions & 19 deletions google/cloud/vision_v1/proto/image_annotator.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

Expand Down Expand Up @@ -48,7 +47,8 @@ service ImageAnnotator {
"https://www.googleapis.com/auth/cloud-vision";

// Run image detection and annotation for a batch of images.
rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) {
rpc BatchAnnotateImages(BatchAnnotateImagesRequest)
returns (BatchAnnotateImagesResponse) {
option (google.api.http) = {
post: "/v1/images:annotate"
body: "*"
Expand All @@ -71,7 +71,8 @@ service ImageAnnotator {
// AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
// file provided and perform detection and annotation for each image
// extracted.
rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) returns (BatchAnnotateFilesResponse) {
rpc BatchAnnotateFiles(BatchAnnotateFilesRequest)
returns (BatchAnnotateFilesResponse) {
option (google.api.http) = {
post: "/v1/files:annotate"
body: "*"
Expand All @@ -96,7 +97,8 @@ service ImageAnnotator {
//
// This service will write image annotation outputs to json files in customer
// GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) returns (google.longrunning.Operation) {
rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/images:asyncBatchAnnotate"
body: "*"
Expand All @@ -122,7 +124,8 @@ service ImageAnnotator {
// `google.longrunning.Operations` interface.
// `Operation.metadata` contains `OperationMetadata` (metadata).
// `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) {
rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/files:asyncBatchAnnotate"
body: "*"
Expand Down Expand Up @@ -242,6 +245,9 @@ message Image {
// Image content, represented as a stream of bytes.
// Note: As with all `bytes` fields, protobuffers use a pure binary
// representation, whereas JSON representations use base64.
//
// Currently, this field only works for BatchAnnotateImages requests. It does
// not work for AsyncBatchAnnotateImages requests.
bytes content = 1;

// Google Cloud Storage image location, or publicly-accessible image
Expand Down Expand Up @@ -385,6 +391,12 @@ message FaceAnnotation {

// Chin right gonion.
CHIN_RIGHT_GONION = 34;

// Left cheek center.
LEFT_CHEEK_CENTER = 35;

// Right cheek center.
RIGHT_CHEEK_CENTER = 36;
}

// Face landmark type.
Expand Down Expand Up @@ -569,27 +581,27 @@ message SafeSearchAnnotation {

// Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
// very confident.
float adult_confidence = 16;
float adult_confidence = 16 [deprecated = true];

// Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
// very confident.
float spoof_confidence = 18;
float spoof_confidence = 18 [deprecated = true];

// Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
// very confident.
float medical_confidence = 20;
float medical_confidence = 20 [deprecated = true];

// Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
// very confident.
float violence_confidence = 22;
float violence_confidence = 22 [deprecated = true];

// Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
// confident.
float racy_confidence = 24;
float racy_confidence = 24 [deprecated = true];

// Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
// confident.
float nsfw_confidence = 26;
float nsfw_confidence = 26 [deprecated = true];
}

// Rectangle determined by min and max `LatLng` pairs.
Expand Down Expand Up @@ -667,7 +679,6 @@ message WebDetectionParams {
// Parameters for text detections. This is used to control TEXT_DETECTION and
// DOCUMENT_TEXT_DETECTION features.
message TextDetectionParams {

// By default, Cloud Vision API only includes confidence score for
// DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
// score for TEXT_DETECTION as well.
Expand Down Expand Up @@ -781,7 +792,8 @@ message AnnotateImageResponse {
// Multiple image annotation requests are batched into a single service call.
message BatchAnnotateImagesRequest {
// Required. Individual image annotation requests for this batch.
repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
repeated AnnotateImageRequest requests = 1
[(google.api.field_behavior) = REQUIRED];

// Optional. Target project and location to make a call.
//
Expand Down Expand Up @@ -852,9 +864,10 @@ message AnnotateFileResponse {

// A list of requests to annotate files using the BatchAnnotateFiles API.
message BatchAnnotateFilesRequest {
// Required. The list of file annotation requests. Right now we support only one
// AnnotateFileRequest in BatchAnnotateFilesRequest.
repeated AnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The list of file annotation requests. Right now we support only
// one AnnotateFileRequest in BatchAnnotateFilesRequest.
repeated AnnotateFileRequest requests = 1
[(google.api.field_behavior) = REQUIRED];

// Optional. Target project and location to make a call.
//
Expand Down Expand Up @@ -902,7 +915,8 @@ message AsyncAnnotateFileResponse {
// Request for async image annotation for a list of images.
message AsyncBatchAnnotateImagesRequest {
// Required. Individual image annotation requests for this batch.
repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
repeated AnnotateImageRequest requests = 1
[(google.api.field_behavior) = REQUIRED];

// Required. The desired output location and metadata (e.g. format).
OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED];
Expand Down Expand Up @@ -932,7 +946,8 @@ message AsyncBatchAnnotateImagesResponse {
// call.
message AsyncBatchAnnotateFilesRequest {
// Required. Individual async file annotation requests for this batch.
repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
repeated AsyncAnnotateFileRequest requests = 1
[(google.api.field_behavior) = REQUIRED];

// Optional. Target project and location to make a call.
//
Expand Down
Loading