版本260406

This commit is contained in:
2026-04-06 22:04:05 +08:00
parent 7dc5e73af7
commit 0b150470be
216 changed files with 98993 additions and 33 deletions

View File

@@ -0,0 +1,28 @@
using OrpaonVision.Core.Results;
using OrpaonVision.SiteApp.Runtime.Contracts;
namespace OrpaonVision.SiteApp.Runtime.Services
{
/// <summary>
/// 推理服务模拟实现MVP 阶段)。
/// </summary>
public sealed class MockInferenceService : IInferenceService
{
/// <inheritdoc />
public Result<InferenceResultDto> Predict(CameraFrameDto frame)
{
var tick = DateTime.UtcNow.Ticks;
var label = tick % 2 == 0 ? "OK" : "NG_MISALIGN";
var confidence = label == "OK" ? 0.92m : 0.78m;
var result = new InferenceResultDto
{
FrameId = frame.FrameId,
Label = label,
Confidence = confidence
};
return Result<InferenceResultDto>.Success(result, message: "推理完成。");
}
}
}