Giter Site home page Giter Site logo

Comments (2)

sdcb avatar sdcb commented on September 27, 2024

你没猜错,放在本地文件中其实对许多环境都是不友好的,现在的机制是以嵌入资源的形式放到了Models.LocalV3里面,当然你也可以使用本地文件中的模型,不冲突。

from paddlesharp.

n0099 avatar n0099 commented on September 27, 2024

如果您是通过包Sdcb.PaddleOCR.Models.Online中提供的在线下载模型方式使用的:

new PaddleOcrAll(await OnlineFullModels.ChineseV3.DownloadAsync(), ...)

那模型会下载到Environment.SpecialFolder.ApplicationData下:

public static string GlobalModelDirectory { get; set; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "paddleocr-models");

public string RootDirectory => Path.Combine(Settings.GlobalModelDirectory, name);

public static async Task DownloadAndExtract(string name, Uri uri, string rootDir, CancellationToken cancellationToken)

https://jimrich.sk/environment-specialfolder-on-windows-linux-and-os-x/

ENM: System.Environment.SpecialFolder.ApplicationData
WIN: C:\Users\jariq\AppData\Roaming
LIN: /home/jariq/.config
OSX: /Users/jariq/.config

您可以通过在下载前(调用任何.DownloadAsync()前)修改全局静态属性Sdcb.PaddleOCR.Models.Online.Settings.GlobalModelDirectory的值来改变下载位置

from paddlesharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.