ImageModerationOperations Class
ImageModerationOperations operations.
- Inheritance
-
builtins.objectImageModerationOperations
Constructor
ImageModerationOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Methods
| evaluate_file_input |
Returns probabilities of the image containing racy or adult content. |
| evaluate_method |
Returns probabilities of the image containing racy or adult content. |
| evaluate_url_input |
Returns probabilities of the image containing racy or adult content. |
| find_faces |
Returns the list of faces found. |
| find_faces_file_input |
Returns the list of faces found. |
| find_faces_url_input |
Returns the list of faces found. |
| match_file_input |
Fuzzily match an image against one of your custom Image Lists. You can
create and manage your custom image lists using this
API.
Returns ID and tags of matching image. |
| match_method |
Fuzzily match an image against one of your custom Image Lists. You can
create and manage your custom image lists using this
API.
Returns ID and tags of matching image. |
| match_url_input |
Fuzzily match an image against one of your custom Image Lists. You can
create and manage your custom image lists using this
API.
Returns ID and tags of matching image. |
| ocr_file_input |
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. |
| ocr_method |
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. |
| ocr_url_input |
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. |
evaluate_file_input
Returns probabilities of the image containing racy or adult content.
evaluate_file_input(image_stream, cache_image=None, custom_headers=None, raw=False, callback=None, **operation_config)
Parameters
- image_stream
- <xref:Generator>
The image file.
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- callback
- <xref:Callable>[<xref:Bytes>, <xref:response=None>]
When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.
- operation_config
Operation configuration overrides.
Returns
Evaluate or ClientRawResponse if raw=true
Return type
Exceptions
evaluate_method
Returns probabilities of the image containing racy or adult content.
evaluate_method(cache_image=None, custom_headers=None, raw=False, **operation_config)
Parameters
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- operation_config
Operation configuration overrides.
Returns
Evaluate or ClientRawResponse if raw=true
Return type
Exceptions
evaluate_url_input
Returns probabilities of the image containing racy or adult content.
evaluate_url_input(content_type, cache_image=None, data_representation='URL', value=None, custom_headers=None, raw=False, **operation_config)
Parameters
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- data_representation
- str
- value
- str
- operation_config
Operation configuration overrides.
Returns
Evaluate or ClientRawResponse if raw=true
Return type
Exceptions
find_faces
Returns the list of faces found.
find_faces(cache_image=None, custom_headers=None, raw=False, **operation_config)
Parameters
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- operation_config
Operation configuration overrides.
Returns
FoundFaces or ClientRawResponse if raw=true
Return type
Exceptions
find_faces_file_input
Returns the list of faces found.
find_faces_file_input(image_stream, cache_image=None, custom_headers=None, raw=False, callback=None, **operation_config)
Parameters
- image_stream
- <xref:Generator>
The image file.
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- callback
- <xref:Callable>[<xref:Bytes>, <xref:response=None>]
When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.
- operation_config
Operation configuration overrides.
Returns
FoundFaces or ClientRawResponse if raw=true
Return type
Exceptions
find_faces_url_input
Returns the list of faces found.
find_faces_url_input(content_type, cache_image=None, data_representation='URL', value=None, custom_headers=None, raw=False, **operation_config)
Parameters
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- data_representation
- str
- value
- str
- operation_config
Operation configuration overrides.
Returns
FoundFaces or ClientRawResponse if raw=true
Return type
Exceptions
match_file_input
Fuzzily match an image against one of your custom Image Lists. You can
create and manage your custom image lists using this
API.
Returns ID and tags of matching image.
Note: Refresh Index must be run on the corresponding Image List before
additions and removals are reflected in the response.
match_file_input(image_stream, list_id=None, cache_image=None, custom_headers=None, raw=False, callback=None, **operation_config)
Parameters
- image_stream
- <xref:Generator>
The image file.
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- callback
- <xref:Callable>[<xref:Bytes>, <xref:response=None>]
When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.
- operation_config
Operation configuration overrides.
Returns
MatchResponse or ClientRawResponse if raw=true
Return type
Exceptions
match_method
Fuzzily match an image against one of your custom Image Lists. You can
create and manage your custom image lists using this
API.
Returns ID and tags of matching image.
Note: Refresh Index must be run on the corresponding Image List before
additions and removals are reflected in the response.
match_method(list_id=None, cache_image=None, custom_headers=None, raw=False, **operation_config)
Parameters
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- operation_config
Operation configuration overrides.
Returns
MatchResponse or ClientRawResponse if raw=true
Return type
Exceptions
match_url_input
Fuzzily match an image against one of your custom Image Lists. You can
create and manage your custom image lists using this
API.
Returns ID and tags of matching image.
Note: Refresh Index must be run on the corresponding Image List before
additions and removals are reflected in the response.
match_url_input(content_type, list_id=None, cache_image=None, data_representation='URL', value=None, custom_headers=None, raw=False, **operation_config)
Parameters
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- data_representation
- str
- value
- str
- operation_config
Operation configuration overrides.
Returns
MatchResponse or ClientRawResponse if raw=true
Return type
Exceptions
ocr_file_input
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.
ocr_file_input(language, image_stream, cache_image=None, enhanced=False, custom_headers=None, raw=False, callback=None, **operation_config)
Parameters
- image_stream
- <xref:Generator>
The image file.
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- enhanced
- bool
When set to True, the image goes through additional processing to come with additional candidates. image/tiff is not supported when enhanced is set to true Note: This impacts the response time.
- callback
- <xref:Callable>[<xref:Bytes>, <xref:response=None>]
When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.
- operation_config
Operation configuration overrides.
Returns
OCR or ClientRawResponse if raw=true
Return type
Exceptions
ocr_method
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.
ocr_method(language, cache_image=None, enhanced=False, custom_headers=None, raw=False, **operation_config)
Parameters
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- enhanced
- bool
When set to True, the image goes through additional processing to come with additional candidates. image/tiff is not supported when enhanced is set to true Note: This impacts the response time.
- operation_config
Operation configuration overrides.
Returns
OCR or ClientRawResponse if raw=true
Return type
Exceptions
ocr_url_input
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.
ocr_url_input(language, content_type, cache_image=None, enhanced=False, data_representation='URL', value=None, custom_headers=None, raw=False, **operation_config)
Parameters
- cache_image
- bool
Whether to retain the submitted image for future use; defaults to false if omitted.
- enhanced
- bool
When set to True, the image goes through additional processing to come with additional candidates. image/tiff is not supported when enhanced is set to true Note: This impacts the response time.
- data_representation
- str
- value
- str
- operation_config
Operation configuration overrides.
Returns
OCR or ClientRawResponse if raw=true
Return type
Exceptions
Attributes
models
models = <module 'azure.cognitiveservices.vision.contentmoderator.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\cognitiveservices\\vision\\contentmoderator\\models\\__init__.py'>
Feedback
Submit and view feedback for