commit | 807f4573562472b1a58ce63a9d91b006cd1fb6cb | [log] [tgz] |
---|---|---|
author | CindyLiu <hcindyl@google.com> | Wed May 12 23:41:41 2021 +0000 |
committer | GitHub <noreply@github.com> | Wed May 12 16:41:41 2021 -0700 |
tree | 7f093a2d7b2e39e851771be632c79e280d1aa651 | |
parent | b5d90aca9d00b81e3950d83969d8932d80ead159 [diff] |
Add image_util library for image --> buffer_view (#5655) * Add image_util library for image -> buffer view image_util library produces HAL buffer views based on image files. The library utilizes third_party/stblib/stb_image.h to produce the uint8_t pixel data, and wraps/rescales the pixel data buffer to create the HAL buffer view. Only i8, u8, and f32 are supported. Some limitations: * The image dimension has to match the iree_hal_dim_t input argument. No resize or channel selection internally (except dropping the alpha channel). * For f32 element type, the array is rescaled to the specified input range with `iree_tools_utils_buffer_view_from_image_rescaled` * For i8 element type, the user is responsible for the u8 --> i8 data preparation, as the function wraps the pixel data buffer directly with `iree_tools_utils_buffer_view_from_image` An example of running the mnist model with an image file and the image_util library is added to `iree/samples/vision`.
IREE (Intermediate Representation Execution Environment, pronounced as “eerie”) is an MLIR-based end-to-end compiler that lowers Machine Learning (ML) models to a unified IR optimized for real-time inference on mobile/edge devices against heterogeneous hardware accelerators. IREE also provides flexible deployment solutions for its compiled ML models.
See our website for project details, user guides, and instructions on building from source.
IREE is still in its early phase. We have settled down on the overarching infrastructure and are actively improving various software components as well as project logistics. It is still quite far from ready for everyday use and is made available without any support at the moment. With that said, we welcome any kind of feedback on any communication channels!
IREE is licensed under the terms of the Apache license. See LICENSE for more information.