DayBreak-u / chineseocr_lite

超轻量级中文ocr,支持竖排文字识别, 支持ncnn、mnn、tnn推理 ( dbnet(1.8M) + crnn(2.5M) + anglenet(378KB)) 总模型仅4.7M
GNU General Public License v2.0
11.72k stars 2.25k forks source link

C# 项目 angleNet = new InferenceSession(path); // 这个没有使用 之前定义的 op 是忘了还是有意为之 #414

Open micro-step opened 2 years ago

micro-step commented 2 years ago
 public void InitModel(string path, int numThread)
    {
        try
        {
            SessionOptions op = new SessionOptions();
            op.GraphOptimizationLevel = GraphOptimizationLevel.ORT_ENABLE_EXTENDED;
            op.InterOpNumThreads = numThread;
            op.IntraOpNumThreads = numThread;
            angleNet = ### new InferenceSession(path); // 这个没有使用 之前定义的 op 是忘了还是有意为之
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message + ex.StackTrace);
            throw ex;
        }
    }
benjaminwan commented 2 years ago

这里应该要传入op的,漏写了。