feat: Added more ort execution_provider
This commit is contained in:
@@ -5,7 +5,7 @@ fn shape_error() -> ndarray::ShapeError {
|
||||
|
||||
mod rgb8 {
|
||||
use super::Result;
|
||||
pub(super) fn image_as_ndarray(image: &image::RgbImage) -> Result<ndarray::ArrayView3<u8>> {
|
||||
pub(super) fn image_as_ndarray(image: &image::RgbImage) -> Result<ndarray::ArrayView3<'_, u8>> {
|
||||
let (width, height) = image.dimensions();
|
||||
let data = image.as_raw();
|
||||
ndarray::ArrayView3::from_shape((height as usize, width as usize, 3), data)
|
||||
@@ -31,7 +31,9 @@ mod rgb8 {
|
||||
|
||||
mod rgba8 {
|
||||
use super::Result;
|
||||
pub(super) fn image_as_ndarray(image: &image::RgbaImage) -> Result<ndarray::ArrayView3<u8>> {
|
||||
pub(super) fn image_as_ndarray(
|
||||
image: &image::RgbaImage,
|
||||
) -> Result<ndarray::ArrayView3<'_, u8>> {
|
||||
let (width, height) = image.dimensions();
|
||||
let data = image.as_raw();
|
||||
ndarray::ArrayView3::from_shape((height as usize, width as usize, 4), data)
|
||||
@@ -82,7 +84,7 @@ mod gray_alpha8 {
|
||||
use super::Result;
|
||||
pub(super) fn image_as_ndarray(
|
||||
image: &image::GrayAlphaImage,
|
||||
) -> Result<ndarray::ArrayView3<u8>> {
|
||||
) -> Result<ndarray::ArrayView3<'_, u8>> {
|
||||
let (width, height) = image.dimensions();
|
||||
let data = image.as_raw();
|
||||
ndarray::ArrayView3::from_shape((height as usize, width as usize, 2), data)
|
||||
|
||||
Reference in New Issue
Block a user