Vision Safe Search#
Safe Search Annotation#
Safe search class for information returned from annotating an image.
-
class
google.cloud.vision.safe.SafeSearchAnnotation(adult_likelihood, spoof_likelihood, medical_likelihood, violence_likelihood)[source]# Bases:
objectRepresentation of a SafeSearchAnnotation.
Parameters: - adult_likelihood (
Likelihood) – Likelihood that image contains adult material. - spoof_likelihood (
Likelihood) – Likelihood that image is a spoof. - medical_likelihood (
Likelihood) – Likelihood that image contains medical material. - violence_likelihood (
Likelihood) – Likelihood that image contains violence.
-
adult# Represents the adult contents likelihood for the image.
Return type: LikelihoodReturns: Likelihoodof the image containing adult content.
-
classmethod
from_api_repr(response)[source]# Factory: construct SafeSearchAnnotation from Vision API response.
Parameters: response (dict) – Dictionary response from Vision API with safe search data. Return type: SafeSearchAnnotationReturns: Instance of SafeSearchAnnotation.
-
medical# Likelihood this is a medical image.
Return type: LikelihoodReturns: The Likelihoodthat the image is medical in origin.
-
spoof# The likelihood that an obvious modification was made to the image.
Return type: LikelihoodReturns: The Likelihoodthat an obvious modification was made to the image’s canonical version to make it appear funny or offensive.
-
violence# Likeliehood that this image contains violence.
Return type: LikelihoodReturns: The Likelihoodthat the image contains violence.
- adult_likelihood (