aigve.utils
read_image_detectron2(file_name, format=None)
Read an image into the given format. Will apply rotation and flipping if the image has such exif information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_name
|
str
|
image file path |
required |
format
|
str
|
one of the supported image modes in PIL, or "BGR" or "YUV-BT.601". |
None
|
Returns:
Name | Type | Description |
---|---|---|
image |
ndarray
|
an HWC image in the given format, which is 0-255, uint8 for supported image modes in PIL or "BGR"; float (0-1 for Y) for YUV-BT.601. |