azure.ai.vision.imageanalysis.models package

class azure.ai.vision.imageanalysis.models.CaptionResult(*args: Any, **kwargs: Any)[source]

Represents a generated phrase that describes the content of the whole image.

Variables:
  • confidence (float) – A score, in the range of 0 to 1 (inclusive), representing the confidence that this description is accurate. Higher values indicating higher confidence. Required.

  • text (str) – The text of the caption. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
confidence: float

A score, in the range of 0 to 1 (inclusive), representing the confidence that this description is accurate. Higher values indicating higher confidence. Required.

text: str

The text of the caption. Required.

class azure.ai.vision.imageanalysis.models.CropRegion(*args: Any, **kwargs: Any)[source]

A region at the desired aspect ratio that can be used as image thumbnail. The region preserves as much content as possible from the analyzed image, with priority given to detected faces.

Variables:
  • aspect_ratio (float) – The aspect ratio of the crop region. Aspect ratio is calculated by dividing the width of the region in pixels by its height in pixels. The aspect ratio will be in the range 0.75 to 1.8 (inclusive) if provided by the developer during the analyze call. Otherwise, it will be in the range 0.5 to 2.0 (inclusive). Required.

  • bounding_box (ImageBoundingBox) – The bounding box of the region. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
aspect_ratio: float

The aspect ratio of the crop region. Aspect ratio is calculated by dividing the width of the region in pixels by its height in pixels. The aspect ratio will be in the range 0.75 to 1.8 (inclusive) if provided by the developer during the analyze call. Otherwise, it will be in the range 0.5 to 2.0 (inclusive). Required.

bounding_box: _models.ImageBoundingBox

The bounding box of the region. Required.

class azure.ai.vision.imageanalysis.models.DenseCaption(*args: Any, **kwargs: Any)[source]

Represents a generated phrase that describes the content of the whole image or a region in the image.

Variables:
  • confidence (float) – A score, in the range of 0 to 1 (inclusive), representing the confidence that this description is accurate. Higher values indicating higher confidence. Required.

  • text (str) – The text of the caption. Required.

  • bounding_box (ImageBoundingBox) – The image region of which this caption applies. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
bounding_box: _models.ImageBoundingBox

The image region of which this caption applies. Required.

confidence: float

A score, in the range of 0 to 1 (inclusive), representing the confidence that this description is accurate. Higher values indicating higher confidence. Required.

text: str

The text of the caption. Required.

class azure.ai.vision.imageanalysis.models.DenseCaptionsResult(*args: Any, **kwargs: Any)[source]

Represents a list of up to 10 image captions for different regions of the image. The first caption always applies to the whole image.

Variables:

list (list[DenseCaption]) – The list of image captions. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
list: List[_models.DenseCaption]

The list of image captions. Required.

class azure.ai.vision.imageanalysis.models.DetectedObject(*args: Any, **kwargs: Any)[source]

Represents a physical object detected in an image.

Variables:
  • bounding_box (ImageBoundingBox) – A rectangular boundary where the object was detected. Required.

  • tags (list[DetectedTag]) – A single-item list containing the object information. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
bounding_box: _models.ImageBoundingBox

A rectangular boundary where the object was detected. Required.

tags: List[_models.DetectedTag]

A single-item list containing the object information. Required.

class azure.ai.vision.imageanalysis.models.DetectedPerson(*args: Any, **kwargs: Any)[source]

Represents a person detected in an image.

Readonly variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • bounding_box (ImageBoundingBox) – A rectangular boundary where the person was detected. Required.

  • confidence (float) – A score, in the range of 0 to 1 (inclusive), representing the confidence that this detection was accurate. Higher values indicating higher confidence. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
bounding_box: _models.ImageBoundingBox

A rectangular boundary where the person was detected. Required.

confidence: float

A score, in the range of 0 to 1 (inclusive), representing the confidence that this detection was accurate. Higher values indicating higher confidence. Required.

class azure.ai.vision.imageanalysis.models.DetectedTag(*args: Any, **kwargs: Any)[source]

A content entity observation in the image. A tag can be a physical object, living being, scenery, or action that appear in the image.

Variables:
  • confidence (float) – A score, in the range of 0 to 1 (inclusive), representing the confidence that this entity was observed. Higher values indicating higher confidence. Required.

  • name (str) – Name of the entity. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
confidence: float

A score, in the range of 0 to 1 (inclusive), representing the confidence that this entity was observed. Higher values indicating higher confidence. Required.

name: str

Name of the entity. Required.

class azure.ai.vision.imageanalysis.models.DetectedTextBlock(*args: Any, **kwargs: Any)[source]

Represents a single block of detected text in the image.

Variables:

lines (list[DetectedTextLine]) – A list of text lines in this block. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
lines: List[_models.DetectedTextLine]

A list of text lines in this block. Required.

class azure.ai.vision.imageanalysis.models.DetectedTextLine(*args: Any, **kwargs: Any)[source]

Represents a single line of text in the image.

Variables:
  • text (str) – Text content of the detected text line. Required.

  • bounding_polygon (list[ImagePoint]) – A bounding polygon around the text line. At the moment only quadrilaterals are supported (represented by 4 image points). Required.

  • words (list[DetectedTextWord]) – A list of words in this line. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
bounding_polygon: List[_models.ImagePoint]

A bounding polygon around the text line. At the moment only quadrilaterals are supported (represented by 4 image points). Required.

text: str

Text content of the detected text line. Required.

words: List[_models.DetectedTextWord]

A list of words in this line. Required.

class azure.ai.vision.imageanalysis.models.DetectedTextWord(*args: Any, **kwargs: Any)[source]

A word object consisting of a contiguous sequence of characters. For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word.

Variables:
  • text (str) – Text content of the word. Required.

  • bounding_polygon (list[ImagePoint]) – A bounding polygon around the word. At the moment only quadrilaterals are supported (represented by 4 image points). Required.

  • confidence (float) – The level of confidence that the word was detected. Confidence scores span the range of 0.0 to 1.0 (inclusive), with higher values indicating a higher confidence of detection. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
bounding_polygon: List[_models.ImagePoint]

A bounding polygon around the word. At the moment only quadrilaterals are supported (represented by 4 image points). Required.

confidence: float

The level of confidence that the word was detected. Confidence scores span the range of 0.0 to 1.0 (inclusive), with higher values indicating a higher confidence of detection. Required.

text: str

Text content of the word. Required.

class azure.ai.vision.imageanalysis.models.ImageAnalysisResult(*args: Any, **kwargs: Any)[source]

Represents the outcome of an Image Analysis operation.

Variables:
  • caption (CaptionResult) – The generated phrase that describes the content of the analyzed image.

  • dense_captions (DenseCaptionsResult) – The up to 10 generated phrases, the first describing the content of the whole image, and the others describing the content of different regions of the image.

  • metadata (ImageMetadata) – Metadata associated with the analyzed image. Required.

  • model_version (str) – The cloud AI model used for the analysis. Required.

  • objects (ObjectsResult) – A list of detected physical objects in the analyzed image, and their location.

  • people (PeopleResult) – A list of detected people in the analyzed image, and their location.

  • read (ReadResult) – The extracted printed and hand-written text in the analyze image. Also knows as OCR.

  • smart_crops (SmartCropsResult) – A list of crop regions at the desired as aspect ratios (if provided) that can be used as image thumbnails. These regions preserve as much content as possible from the analyzed image, with priority given to detected faces.

  • tags (TagsResult) – A list of content tags in the analyzed image.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
caption: _models.CaptionResult | None

The generated phrase that describes the content of the analyzed image.

dense_captions: _models.DenseCaptionsResult | None

The up to 10 generated phrases, the first describing the content of the whole image, and the others describing the content of different regions of the image.

metadata: _models.ImageMetadata

Metadata associated with the analyzed image. Required.

model_version: str

The cloud AI model used for the analysis. Required.

objects: _models.ObjectsResult | None

A list of detected physical objects in the analyzed image, and their location.

people: _models.PeopleResult | None

A list of detected people in the analyzed image, and their location.

read: _models.ReadResult | None

The extracted printed and hand-written text in the analyze image. Also knows as OCR.

smart_crops: _models.SmartCropsResult | None

A list of crop regions at the desired as aspect ratios (if provided) that can be used as image thumbnails. These regions preserve as much content as possible from the analyzed image, with priority given to detected faces.

tags: _models.TagsResult | None

A list of content tags in the analyzed image.

class azure.ai.vision.imageanalysis.models.ImageBoundingBox(*args: Any, **kwargs: Any)[source]

A basic rectangle specifying a sub-region of the image.

Variables:
  • x (int) – X-coordinate of the top left point of the area, in pixels. Required.

  • y (int) – Y-coordinate of the top left point of the area, in pixels. Required.

  • width (int) – Width of the area, in pixels. Required.

  • height (int) – Height of the area, in pixels. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
height: int

Height of the area, in pixels. Required.

width: int

Width of the area, in pixels. Required.

x: int

X-coordinate of the top left point of the area, in pixels. Required.

y: int

Y-coordinate of the top left point of the area, in pixels. Required.

class azure.ai.vision.imageanalysis.models.ImageMetadata(*args: Any, **kwargs: Any)[source]

Metadata associated with the analyzed image.

Variables:
  • height (int) – The height of the image in pixels. Required.

  • width (int) – The width of the image in pixels. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
height: int

The height of the image in pixels. Required.

width: int

The width of the image in pixels. Required.

class azure.ai.vision.imageanalysis.models.ImagePoint(*args: Any, **kwargs: Any)[source]

Represents the coordinates of a single pixel in the image.

Variables:
  • x (int) – The horizontal x-coordinate of this point, in pixels. Zero values corresponds to the left-most pixels in the image. Required.

  • y (int) – The vertical y-coordinate of this point, in pixels. Zero values corresponds to the top-most pixels in the image. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
x: int

The horizontal x-coordinate of this point, in pixels. Zero values corresponds to the left-most pixels in the image. Required.

y: int

The vertical y-coordinate of this point, in pixels. Zero values corresponds to the top-most pixels in the image. Required.

class azure.ai.vision.imageanalysis.models.ObjectsResult(*args: Any, **kwargs: Any)[source]

Represents a list of physical object detected in an image and their location.

Variables:

list (list[DetectedObject]) – A list of physical object detected in an image and their location. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
list: List[_models.DetectedObject]

A list of physical object detected in an image and their location. Required.

class azure.ai.vision.imageanalysis.models.PeopleResult(*args: Any, **kwargs: Any)[source]

Represents a list of people detected in an image and their location.

Variables:

list (list[DetectedPerson]) – A list of people detected in an image and their location. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
list: List[_models.DetectedPerson]

A list of people detected in an image and their location. Required.

class azure.ai.vision.imageanalysis.models.ReadResult(*args: Any, **kwargs: Any)[source]

The results of a Read (OCR) operation.

Variables:

blocks (list[DetectedTextBlock]) – A list of text blocks in the image. At the moment only one block is returned, containing all the text detected in the image. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
blocks: List[_models.DetectedTextBlock]

A list of text blocks in the image. At the moment only one block is returned, containing all the text detected in the image. Required.

class azure.ai.vision.imageanalysis.models.SmartCropsResult(*args: Any, **kwargs: Any)[source]

Smart cropping result. A list of crop regions at the desired as aspect ratios (if provided) that can be used as image thumbnails. These regions preserve as much content as possible from the analyzed image, with priority given to detected faces.

Variables:

list (list[CropRegion]) – A list of crop regions. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
list: List[_models.CropRegion]

A list of crop regions. Required.

class azure.ai.vision.imageanalysis.models.TagsResult(*args: Any, **kwargs: Any)[source]

A list of entities observed in the image. Tags can be physical objects, living being, scenery, or actions that appear in the image.

Variables:

list (list[DetectedTag]) – A list of tags. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be JSONify using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None.  Remove all items from D.
copy() Model
get(k[, d]) D[k] if k in D, else d.  d defaults to None.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(k[, d]) v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values
list: List[_models.DetectedTag]

A list of tags. Required.

class azure.ai.vision.imageanalysis.models.VisualFeatures(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The visual features supported by the Image Analysis service.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CAPTION = 'caption'

Generate a human-readable caption sentence that describes the content of the image.

DENSE_CAPTIONS = 'denseCaptions'

Generate human-readable caption sentences for up to 10 different regions in the image, including one for the whole image.

OBJECTS = 'objects'

Object detection. This is similar to tags, but focused on detecting physical objects in the image and returning their location.

PEOPLE = 'people'

Detect people in the image and return their location.

READ = 'read'

Extract printed or handwritten text from the image. Also known as Optical Character Recognition (OCR).

SMART_CROPS = 'smartCrops'

Find representative sub-regions of the image for thumbnail generation, at desired aspect ratios, with priority given to detected faces.

TAGS = 'tags'

Extract content tags for thousands of recognizable objects, living beings, scenery, and actions that appear in the image.