Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d64d4f

Browse files
author
Rebecca Taylor
committed
Add score_threshold
1 parent d1b3f77 commit 2d64d4f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

video/cloud-client/automl/v1beta1/automl_video_object_tracking_batch_predict.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ def sample_batch_predict(gcs_output_prefix, model_id, project):
5858
gcs_destination = {"output_uri_prefix": gcs_output_prefix}
5959
output_config = {"gcs_destination": gcs_destination}
6060

61-
operation = client.batch_predict(name, input_config, output_config)
61+
# A value from 0.0 to 1.0. When the model detects objects on video frames,
62+
# it will only produce bounding boxes that have at least this confidence score.
63+
# The default is 0.5.
64+
params_item = "0.0"
65+
params = {"score_threshold": params_item}
66+
67+
operation = client.batch_predict(name, input_config, output_config, params=params)
6268

6369
print(u"Waiting for operation to complete...")
6470
response = operation.result()

0 commit comments

Comments
 (0)