@@ -206,7 +206,8 @@ def track_objects_gcs(gcs_uri):
206
206
207
207
# Get only the first annotation for demo purposes.
208
208
object_annotation = object_annotations [0 ]
209
- print ('Entity description: {}' .format (
209
+ # description is in Unicode
210
+ print (u'Entity description: {}' .format (
210
211
object_annotation .entity .description ))
211
212
if object_annotation .entity .entity_id :
212
213
print ('Entity id: {}' .format (object_annotation .entity .entity_id ))
@@ -259,7 +260,8 @@ def track_objects(path):
259
260
260
261
# Get only the first annotation for demo purposes.
261
262
object_annotation = object_annotations [0 ]
262
- print ('Entity description: {}' .format (
263
+ # description is in Unicode
264
+ print (u'Entity description: {}' .format (
263
265
object_annotation .entity .description ))
264
266
if object_annotation .entity .entity_id :
265
267
print ('Entity id: {}' .format (object_annotation .entity .entity_id ))
@@ -343,7 +345,8 @@ def stream_generator():
343
345
description = annotation .entity .description
344
346
# Every annotation has only one frame
345
347
confidence = annotation .frames [0 ].confidence
346
- print ('\t {} (confidence: {})' .format (description , confidence ))
348
+ # description is in Unicode
349
+ print (u'\t {} (confidence: {})' .format (description , confidence ))
347
350
# [END video_streaming_label_detection_beta]
348
351
349
352
@@ -463,7 +466,8 @@ def stream_generator():
463
466
# track_id tracks the same object in the video.
464
467
track_id = annotation .track_id
465
468
466
- print ('\t Entity description: {}' .format (description ))
469
+ # description is in Unicode
470
+ print (u'\t Entity description: {}' .format (description ))
467
471
print ('\t Track Id: {}' .format (track_id ))
468
472
if annotation .entity .entity_id :
469
473
print ('\t Entity id: {}' .format (annotation .entity .entity_id ))
0 commit comments