Image Type
The image source that needs to be detected. Currently this only supports JPG and PNG formats.
Field Summary
Name | Type | Meaning |
---|---|---|
Content | String | Represents the binary information of an image. |
Uri | String | The URI of a picture. Currently this only supports the URI of Xiaomi FDS. The format is fds://endpoint/bucket/object |
Method Summary
Image(uri=None, content=None)
Syntax Sample
from vision.models import Image
# Vision_client is the client's object
source_bytes = vision_client.load_image("/home/mi/image/yz.jpg")
image = Image(content=source_bytes)
Parameters
content : string
Picture binary information.
uri: string
The URI information of the picture. Currently, this only supports pictures stored in FDS. The URI format needs to comply with the schame of URI in FDS. Example:
fds://cnbj1-fds.api.xiaomi.net/tst-team-2/img_930.jpg
Return Type
- Image Class Object