202c6a056ab48cbe58924de77ffdd1c938447da6,vision/cloud-client/detect/detect.py,,detect_safe_search_uri,#Any#,183
Before Change
Detects unsafe features in the file located in Google Cloud Storage or
on the Web.
vision_client = vision.Client()
image = vision_client.image(source_uri=uri)
safe = image.detect_safe_search()
print("adult: {}".format(safe.adult))
print("medical: {}".format(safe.medical))
After Change
safe = response.safe_search_annotation
// Names of likelihood from google.cloud.vision.enums
likelihood_name = ("UNKNOWN", "VERY_UNLIKELY", "UNLIKELY", "POSSIBLE",
"LIKELY", "VERY_LIKELY")
print("Safe search:")
print("adult: {}".format(likelihood_name[safe.adult] ))
print("medical: {}".format(likelihood_name[safe.medical]))
print("spoofed: {}".format(likelihood_name[safe.spoof]))
print("violence: {}".format(likelihood_name[safe.violence]))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 202c6a056ab48cbe58924de77ffdd1c938447da6
Time: 2017-07-27
Author: dizcology@hotmail.com
File Name: vision/cloud-client/detect/detect.py
Class Name:
Method Name: detect_safe_search_uri
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 202c6a056ab48cbe58924de77ffdd1c938447da6
Time: 2017-07-27
Author: dizcology@hotmail.com
File Name: vision/cloud-client/detect/detect.py
Class Name:
Method Name: detect_faces_uri
Project Name: geometalab/OSMDeepOD
Commit Name: f6d61c5cfc78f41b4a4f95e7436887adc8de636e
Time: 2015-10-09
Author: samuel.kurath@gmail.com
File Name: src/detection/haar/HaarDetector.py
Class Name: HaarDetector
Method Name: compare