• Getting Started
  • Development Guide
  • API Reference
  • Release Notes
Search Results for

    Show / Hide Table of Contents
    • Saige.Infrastructure
      • GpuDetectedEventArgs
      • IGpuService
      • NvGpuService
      • PhysicalGpu
    • SaigeVision.Core
      • AugmentationParams
      • ClassInfo
      • DetTrainingOptions
      • Ellipse
      • EngineAlgorithm
      • EngineMetadata
      • IEnumerableExtensions
      • Label
      • Label<T>
      • LabeledImage<T>
      • NetworkDepthOption
      • NetworkParams
      • Range
      • SaigeVisionApp
      • SegTrainingOptions
      • SrImage
      • SrImageDataHandle
      • StringExtensions
      • TrainingOptions
    • SaigeVision.Core.Inference
      • ClassificationEngine
      • ClassificationReport
      • ClsInspectionOptions
      • ContourInspectionOptions
      • CropLargePatchMode
      • DetectedBox
      • DetectionEngine
      • DetectionReport
      • DetInspectionOptions
      • EngineInfoSerializer
      • EngineLoader
      • InspectException
      • InspectionOptions
      • ISegmentationResult
      • OcrEngine
      • OcrOptions
      • OcrReport
      • OcrResultStringInfo
      • ScoreValues<T>
      • SegContourResult
      • SegInspectionOptions
      • SegmentationEngine
      • SegmentationExtensions
      • SegmentationReport<T>
      • SegmentationReport<T1, T2>
      • SegScoremapResult
      • SizeCalculationType
    • SaigeVision.Core.Shapes
      • Box
      • Contour
      • Shape<T>

    Class OcrEngine

    Ocr을 수행할 수 있는 Engine입니다.

    Inheritance
    object
    InspectionEngine<EngineMetadata, TrainingOptions, OcrOptions>
    OcrEngine
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SaigeVision.Core.Inference
    Assembly: SaigeVision.Core.Inference.dll
    Syntax
    public sealed class OcrEngine : InspectionEngine<EngineMetadata, TrainingOptions, OcrOptions>, IDisposable
    Remarks

    SaigeVision이 제공하는 '트레이너'를 통해 훈련된 'Ocr Model'을 사용하여 Ocr을 수행할 수 있는 Engine을 제공합니다.

    해당 Engine은 OcrOptions를 통해 검사에 대한 몇가지 옵션을 지정 할 수 있습니다.

    Examples

    다음을 샘플 이미지 한장에 대한 Ocr을 수행하는 방법을 설명합니다.

    SaigeVision.Core.SaigeVisionApp.Init();
    

    IGpuService gpuService = new NvGpuService(); gpuService.DetectConnectedGPUs(); PhysicalGpu gpu = gpuService.CurrentDetectedGPUs[0];

    SrImage image = new SrImage(@"....\000001.png"); Uri model = new Uri(@"....\model.srCls");

    using(var engine = EngineLoader.LoadFrom(typeof(ClassificationEngine),model)) { engine.AllocateNetwork(gpu); ClassificationReport report = engine.Inspect(image);

    ClassInfo prediction = report.Prediction; Console.WriteLine($"Inspection time : {report.InspectionTime}"); Console.WriteLine($"Predicted : {prediction.Name}"); }

    image.Dispose();

    Methods

    View Source

    Inspect(SrImage)

    input에 대한 검사를 진행합니다.

    Declaration
    public OcrReport Inspect(SrImage input)
    Parameters
    Type Name Description
    SrImage input
    Returns
    Type Description
    OcrReport

    검사 결과.

    See Also
    OcrOptions
    OcrReport
    EngineLoader
    View Source

    InspectAsync(SrImage, CancellationToken)

    input에 대한 검사를 진행합니다.

    Declaration
    public Task<OcrReport> InspectAsync(SrImage input, CancellationToken token = default)
    Parameters
    Type Name Description
    SrImage input

    검사할 이미지.

    CancellationToken token

    검사 취소 토큰.

    Returns
    Type Description
    Task<OcrReport>

    검사 결과.

    See Also
    OcrOptions
    OcrReport
    EngineLoader

    Implements

    System.IDisposable

    See Also

    OcrOptions
    OcrReport
    EngineLoader
    • View Source
    In This Article
    Back to top Generated by DocFX