Fix AMD and OpenVINO
This commit is contained in:
@@ -83,55 +83,55 @@ namespace ANSCENTER {
|
||||
// ── Detection postprocess ───────────────────────────────────────
|
||||
std::vector<Object> postprocessEndToEnd(
|
||||
const cv::Size& originalImageSize, const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::vector<std::string>& classNames, float confThreshold);
|
||||
|
||||
std::vector<Object> postprocessLegacy(
|
||||
const cv::Size& originalImageSize, const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::vector<std::string>& classNames,
|
||||
float confThreshold, float iouThreshold, int maxDet = 300);
|
||||
|
||||
// ── OBB postprocess ─────────────────────────────────────────────
|
||||
std::vector<Object> postprocessOBBEndToEnd(
|
||||
const cv::Size& originalImageSize, const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::vector<std::string>& classNames, float confThreshold);
|
||||
|
||||
std::vector<Object> postprocessOBBLegacy(
|
||||
const cv::Size& originalImageSize, const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::vector<std::string>& classNames,
|
||||
float confThreshold, float iouThreshold, int maxDet = 300);
|
||||
|
||||
// ── Segmentation postprocess ────────────────────────────────────
|
||||
std::vector<Object> postprocessSegEndToEnd(
|
||||
const cv::Size& originalImageSize, const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::vector<std::string>& classNames, float confThreshold);
|
||||
|
||||
std::vector<Object> postprocessSegLegacy(
|
||||
const cv::Size& originalImageSize, const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::vector<std::string>& classNames,
|
||||
float confThreshold, float iouThreshold, int maxDet = 300);
|
||||
|
||||
// ── Pose postprocess ────────────────────────────────────────────
|
||||
std::vector<Object> postprocessPoseEndToEnd(
|
||||
const cv::Size& originalImageSize, const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::vector<std::string>& classNames,
|
||||
float confThreshold, int numKPS);
|
||||
|
||||
std::vector<Object> postprocessPoseLegacy(
|
||||
const cv::Size& originalImageSize, const cv::Size& resizedImageShape,
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::vector<std::string>& classNames,
|
||||
float confThreshold, float iouThreshold, int numKPS, int maxDet = 300);
|
||||
|
||||
// ── Classification postprocess ──────────────────────────────────
|
||||
std::vector<Object> postprocessClassify(
|
||||
const std::vector<Ort::Value>& outputTensors,
|
||||
std::vector<Ort::Value>& outputTensors,
|
||||
const std::vector<std::string>& classNames,
|
||||
const cv::Size& imageSize);
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace ANSCENTER {
|
||||
|
||||
// ── Batch output slicing helper ────────────────────────────────
|
||||
static Ort::Value sliceBatchOutput(
|
||||
const Ort::Value& batchTensor,
|
||||
Ort::Value& batchTensor,
|
||||
int64_t batchIndex,
|
||||
const std::vector<int64_t>& fullShape,
|
||||
Ort::MemoryInfo& memInfo);
|
||||
@@ -224,6 +224,9 @@ namespace ANSCENTER {
|
||||
|
||||
// Initialise ORT engine from the resolved model path
|
||||
bool InitOrtEngine();
|
||||
public:
|
||||
// Initialise ORT engine with explicit engine type override (e.g. CPU fallback for AMD iGPUs)
|
||||
bool InitOrtEngine(ANSCENTER::EngineType engineType);
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user