Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GOT-OCR-2-GUI 安装经验分享(我在自己的另外一台电脑又安装了,希望作者能再完善看看呢) #5

Closed
602387193c opened this issue Sep 27, 2024 · 6 comments

Comments

@602387193c
Copy link

GOT-OCR-2-GUI 安装经验分享

环境配置

  1. 创建并激活 Conda 环境:

    conda create -n gotgui python=3.10
    conda activate gotgui
    
  2. 进入项目目录:

    cd C:\AI\GOT-OCR-2-GUI
    
  3. 安装依赖:

    pip install -r requirements-noversion.txt
    conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia
    

备注:requirements-noversion.txt这次使用也没有问题,建议作者是否把这个作为默认?
conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia是根据依赖里面指定的torch==2.4.1+cu124https://pytorch.org/get-started/locally/找到的相应版本。

下载必要文件(这里根据作者原来的来就行了)

  1. Edge WebDriver

    • 下载压缩包并解压到 edge_driver 文件夹中
    • 确保文件结构如下:
      GOT-OCR-2-GUI
      └─edge_driver
        ├─msedgedriver.exe
        └─...
      
  2. 模型文件

    • 下载并放置在 models 文件夹中
    • 确保文件结构如下:
      GOT-OCR-2-GUI
      └─models
         ├─config.json
         ├─generation_config.json
         ├─got_vision_b.py
         ├─model.safetensors
         ├─modeling_GOT.py
         ├─qwen.tiktoken
         ├─render_tools.py
         ├─special_tokens_map.json
         ├─tokenization_qwen.py
         └─tokenizer_config.json
      

运行程序

执行以下命令:

python GUI.py

遇到 OpenMP 运行时相关错误,可尝试以下解决方案:

  1. 错误信息示例:

    OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
    OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
    
  2. 解决方法:
    在运行程序前,设置环境变量:

    $env:KMP_DUPLICATE_LIB_OK = "TRUE"
    
  3. 然后重新运行程序:

    python GUI.py
    

按照以上步骤操作,您应该能够成功安装并运行 GOT-OCR-2-GUI。如遇其他问题,请参考项目文档或寻求进一步帮助。

@XJF2332 XJF2332 pinned this issue Sep 27, 2024
@XJF2332
Copy link
Owner

XJF2332 commented Sep 27, 2024

写的很详细,pin了!至于改默认依赖的事情,我现在没有别的设备可以用来确定问题,所以先把torch从requirements里独立出来看看,要是还能碰到新的issue的话就改默认吧👍🏻👍🏻👍🏻

@602387193c
Copy link
Author

嗯嗯,其实这些东西,我也是自己乱写,然后交给Claude来补充、整理下就行了,可以省很多事情。

@XJF2332 XJF2332 closed this as completed Oct 21, 2024
@vank3f3
Copy link

vank3f3 commented Nov 26, 2024

请问这个项目,最低的显卡配置是多少呢。

@XJF2332
Copy link
Owner

XJF2332 commented Nov 28, 2024

空闲1.4GB,加载模型4.xGB,跑OCR7.3GB,我刚刚拿普通ocr测的

@972449665
Copy link

GOT-OCR-2-GUI
└─models
├─config.json
├─generation_config.json
├─got_vision_b.py
├─model.safetensors
├─modeling_GOT.py
├─qwen.tiktoken
├─render_tools.py
├─special_tokens_map.json
├─tokenization_qwen.py
└─tokenizer_config.json
有谁提供一下这些文件的下载地址,谢谢。

@XJF2332
Copy link
Owner

XJF2332 commented Jan 6, 2025

就在huggingface上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants