Skip to content

add inference demo for mindir #209

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

Merged
merged 1 commit into from
Apr 26, 2023
Merged

add inference demo for mindir #209

merged 1 commit into from
Apr 26, 2023

Conversation

liangxhao
Copy link
Contributor

@liangxhao liangxhao commented Apr 24, 2023

Thank you for your contribution to the MindOCR repo.
Before submitting this PR, please make sure:

Motivation

add inference demo for mindir.

Test Plan

(How should this PR be tested? Do you require special setup to run the test or repro the fixed bug?)

Related Issues and PRs

(Is this PR part of a group of changes? Link the other relevant PRs and Issues here. Use https://help.github.com/en/articles/closing-issues-using-keywords for help on GitHub syntax)

@SamitHuang
Copy link
Collaborator

SamitHuang commented Apr 25, 2023

文件结构不是很直观,建议改成:

demo/
    mindocr_lite/
          infer.py
          README_CN.md
          README.md
          src/
                asset/font
                framework/
                operators/
                ...

@liangxhao
Copy link
Contributor Author

文件结构不是很直观,建议改成:

demo/
    mindocr_lite/
          infer.py
          README_CN.md
          README.md
          src/
                asset/font
                framework/
                operators/
                ...

已修改


#### Model Export

Please refer to [test_mindir_export.py](https://github.com/mindspore-lab/mindocr/blob/main/tests/ut/test_mindir_export.py), export your trained ckpt to a MindIR file.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里用tools/export.py, 给出转换指令。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改,并补充export指令示例

Just decompress the inference toolkit, and set environment variables:

```shell
export LITE_HOME=/xxx/mindspore-lite
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/xxx/mindspore-lite -> /your_path_to/mindspore-lite

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改


#### Model Inference

cd deploy/demo/mindocr_lite
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

->

cd deploy/demo/mindocr_lite

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改


#### Evaluation

cd mindocr/deploy/eval_utils, and run the following 3 evaluation script:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> cd mindocr/deploy/eval_utils

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改


#### Benchmark

Test conditions:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test conditions -> Test setting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

根据英文做相应调整。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已同步至中文版

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些复用mindocr组件的代码后续需要考虑代码同步更新问题,可能需要改成直接调用(demo后)。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对,后续应该要调用mindocr里面的组件
目前主要是有些阻塞问题:
比如:mindspore和mindspore_lite不能同时import,否则会报错,所以导致现在inference必须和mindocr组件隔离开来

@HaoyangLee HaoyangLee merged commit 9617280 into mindspore-lab:main Apr 26, 2023
colawyee pushed a commit that referenced this pull request Jan 2, 2024
* dreambooth dataloader draft

* add sdxl dreambooth

* add dreambooth

* add sdxl base dreambooth

* delete redundant code

* separate class_image_generation and train

* add readme

* fix pre-commit

---------

Co-authored-by: Fzilan <Fzilan@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

3 participants