mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
* Copy image tests from ADO * wip * Port tests to googletest * Add FNS-Candy license * Add missing collaterals * Remove brand images * Fix typos * Use PrepareModelSessionBinding in MnistImageTest * Fix typos
34 lines
1.3 KiB
C++
34 lines
1.3 KiB
C++
//-----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include <winrt/Windows.Media.h>
|
|
#include <winrt/Windows.Graphics.Imaging.h>
|
|
|
|
enum OutputBindingStrategy { Bound, Unbound, Empty };
|
|
enum EvaluationStrategy { Async, Sync };
|
|
enum ModelInputOutputType { Image, Tensor };
|
|
enum InputImageSource { FromVideoFrame, FromImageFeatureValue, FromCPUResource, FromGPUResource };
|
|
enum VideoFrameSource { FromSoftwareBitmap, FromDirect3DSurface, FromUnsupportedD3DSurface };
|
|
|
|
namespace ImageTestHelper
|
|
{
|
|
winrt::Windows::Graphics::Imaging::BitmapPixelFormat GetPixelFormat(const std::wstring& inputPixelFormat);
|
|
|
|
winrt::Windows::AI::MachineLearning::TensorFloat LoadInputImageFromCPU(
|
|
winrt::Windows::Graphics::Imaging::SoftwareBitmap softwareBitmap,
|
|
const std::wstring& modelPixelFormat);
|
|
|
|
winrt::Windows::AI::MachineLearning::TensorFloat LoadInputImageFromGPU(
|
|
winrt::Windows::Graphics::Imaging::SoftwareBitmap softwareBitmap,
|
|
const std::wstring& modelPixelFormat);
|
|
|
|
bool VerifyHelper(
|
|
winrt::Windows::Media::VideoFrame actual,
|
|
winrt::Windows::Media::VideoFrame expected);
|
|
|
|
}
|