PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

Which external software is used to edit Excel for table annotation? The Excel cannot pop up when I clicked on the Table Recognition button in the upper right corner of PPOCRLabel

Open luowang8182 opened this issue 2 years ago • 2 comments

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

  • 系统环境/System Environment:ubuntu 20.04
  • 版本号/Version:Paddle: PaddleOCR: 问题相关组件/Related components:PPOCRLabel table annotation
  • 运行指令/Command Code:python PPOCRLabel.py --lang ch --kie True
  • 完整报错/Complete Error Message:sh: 1: open: not found

Which external software is used to edit Excel for table annotation? The Excel cannot pop up when I clicked on the Table Recognition button in the upper right corner of PPOCRLabel. How to resolve it?

luowang8182 avatar Sep 20 '22 06:09 luowang8182

Using the table recognition model in PP-Structure. The platform you’re using is Windows, Linux or Mac? For more information, please refer to PPOCRLabel document

an1018 avatar Sep 21 '22 11:09 an1018

Using the table recognition model in PP-Structure. The platform you’re using is Windows, Linux or Mac? For more information, please refer to PPOCRLabel document

Thanks for your reply. My platform is Linux (ubuntu). I have checked the documents of the PPOCRLabel and PP-Structure. However, I cannot find the information about the installment of Excel. Therefore, I cannot use the tool of table structure annotation. As mentioned in the document of the PPOCRLabel, "1. Table annotation: After opening the table picture, click on the Table Recognition button in the upper right corner of PPOCRLabel, which will call the table recognition model in PP-Structure to automatically label the table and pop up Excel at the same time." However, the Excel cannot pop up when I clicked on the Table Recognition button.

luowang8182 avatar Sep 21 '22 12:09 luowang8182

In the directory where you installed PPOCRLabel:

  1. open PPOCRLabel.py.
  2. Delete this lines https://github.com/PaddlePaddle/PaddleOCR/blob/76fefd56f86f2809a6e8f719220746442fbab9f3/PPOCRLabel/PPOCRLabel.py#L2371-L2391
  3. And replace it with these
try:
    os.startfile(os.path.normpath(excel_path))
except:
    print("CANNOT OPEN .xlsx. It could be the following reasons: " \
         ".xlsx is not existed") 

It will then open the file with default applications. I tested it with Libre Calc as default and it worked.

light42 avatar Sep 26 '22 05:09 light42