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:
object
Representation 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: Likelihood
Returns: Likelihood
of 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: SafeSearchAnnotation
Returns: Instance of SafeSearchAnnotation
.
-
medical
# Likelihood this is a medical image.
Return type: Likelihood
Returns: The Likelihood
that the image is medical in origin.
-
spoof
# The likelihood that an obvious modification was made to the image.
Return type: Likelihood
Returns: The Likelihood
that 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: Likelihood
Returns: The Likelihood
that the image contains violence.
- adult_likelihood (