Skip to content

Commit 2f4969c

Browse files
authored
Merge branch 'master' into master
2 parents 4bdd834 + 7e5bd2c commit 2f4969c

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

vision/cloud-client/face_detection/faces.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# [START vision_face_detection_tutorial_imports]
2222
from google.cloud import vision
2323
from google.cloud.vision import types
24-
from PIL import Image, ImageDraw, ImageFont
24+
from PIL import Image, ImageDraw
2525
# [END vision_face_detection_tutorial_imports]
2626

2727

@@ -60,7 +60,6 @@ def highlight_faces(image, faces, output_filename):
6060
im = Image.open(image)
6161
draw = ImageDraw.Draw(im)
6262
# Sepecify the font-family and the font-size
63-
font = ImageFont.truetype("arial.ttf", 25)
6463
for face in faces:
6564
box = [(vertex.x, vertex.y)
6665
for vertex in face.bounding_poly.vertices]
@@ -70,7 +69,7 @@ def highlight_faces(image, faces, output_filename):
7069
draw.text(((face.bounding_poly.vertices)[0].x,
7170
(face.bounding_poly.vertices)[0].y - 30),
7271
str(format(face.detection_confidence, '.3f')) + '%',
73-
font=font, fill='#FF0000')
72+
fill='#FF0000')
7473
im.save(output_filename)
7574
# [END vision_face_detection_tutorial_process_response]
7675

vision/cloud-client/product_search/import_product_sets_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
PROJECT_ID = os.getenv('GCLOUD_PROJECT')
2727
LOCATION = 'us-west1'
2828

29-
GCS_URI = 'gs://python-docs-samples-tests/product_search/product_sets.csv'
29+
GCS_URI = 'gs://cloud-samples-data/vision/product_search/product_sets.csv'
3030
PRODUCT_SET_DISPLAY_NAME = 'fake_product_set_display_name_for_testing'
3131
PRODUCT_SET_ID = 'fake_product_set_id_for_testing'
3232
PRODUCT_ID_1 = 'fake_product_id_for_testing_1'

vision/cloud-client/product_search/product_search_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
PRODUCT_ID_2 = 'indexed_product_id_for_testing_2'
2727

2828
FILE_PATH_1 = 'resources/shoes_1.jpg'
29-
IMAGE_URI_1 = 'gs://python-docs-samples-tests/product_search/shoes_1.jpg'
29+
IMAGE_URI_1 = 'gs://cloud-samples-data/vision/product_search/shoes_1.jpg'
3030
FILTER = 'style=womens'
3131

3232

vision/cloud-client/product_search/reference_image_management_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
PRODUCT_ID = 'fake_product_id_for_testing'
3030

3131
REFERENCE_IMAGE_ID = 'fake_reference_image_id_for_testing'
32-
GCS_URI = 'gs://python-docs-samples-tests/product_search/shoes_1.jpg'
32+
GCS_URI = 'gs://cloud-samples-data/vision/product_search/shoes_1.jpg'
3333

3434

3535
@pytest.fixture
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
"gs://python-docs-samples-tests/product_search/shoes_1.jpg","indexed_product_set_id_for_testing","indexed_product_id_for_testing_1","apparel","style=womens","0.1,0.1,0.9,0.1,0.9,0.9,0.1,0.9"
2-
"gs://python-docs-samples-tests/product_search/shoes_2.jpg","indexed_product_set_id_for_testing","indexed_product_id_for_testing_2","apparel",,
1+
"gs://cloud-samples-data/vision/product_search/shoes_1.jpg","indexed_product_set_id_for_testing","indexed_product_id_for_testing_1","apparel","style=womens","0.1,0.1,0.9,0.1,0.9,0.9,0.1,0.9"
2+
"gs://cloud-samples-data/vision/product_search/shoes_2.jpg","indexed_product_set_id_for_testing","indexed_product_id_for_testing_2","apparel",,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
"gs://python-docs-samples-tests/product_search/shoes_1.jpg","fake_product_set_id_for_testing","fake_product_id_for_testing_1","apparel","style=womens","0.1,0.1,0.9,0.1,0.9,0.9,0.1,0.9"
2-
"gs://python-docs-samples-tests/product_search/shoes_2.jpg","fake_product_set_id_for_testing","fake_product_id_for_testing_2","apparel",,
1+
"gs://cloud-samples-data/vision/product_search/shoes_1.jpg","fake_product_set_id_for_testing","fake_product_id_for_testing_1","apparel","style=womens","0.1,0.1,0.9,0.1,0.9,0.9,0.1,0.9"
2+
"gs://cloud-samples-data/vision/product_search/shoes_2.jpg","fake_product_set_id_for_testing","fake_product_id_for_testing_2","apparel",,

0 commit comments

Comments
 (0)