Skip to content

DBNet output changed in inference mode for faster speed - only binary map is output #196

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 19, 2023

Conversation

SamitHuang
Copy link
Collaborator

@SamitHuang SamitHuang commented Apr 19, 2023

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

Motivation

(Write your motivation for proposed changes here.)

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 SamitHuang changed the title Remove thresh and thresh_binary map output in DBNet in inference mode DBNet output changed in inference mode for faster speed - only binary map is output Apr 19, 2023
pred = {'binary': self.segm(features)}

if self.adaptive:
if self.adaptive and self.training:
Copy link
Collaborator

@hadipash hadipash Apr 19, 2023

Choose a reason for hiding this comment

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

Will it be better to move self.training inside initialization to line 10 to avoid confusion when printing out the model structure?

Copy link
Collaborator Author

@SamitHuang SamitHuang Apr 19, 2023

Choose a reason for hiding this comment

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

It will lead to error for val_while_train=True since we need the thresh branch in training.

@SamitHuang SamitHuang merged commit df2135c into mindspore-lab:main Apr 19, 2023
colawyee pushed a commit that referenced this pull request Jan 2, 2024
…llel_workers setting (#196)

* Support step mode in training, JSON annotation file loading, dataset num parallel workers setting.

* update readme

* update yaml

* add assert

* update readme

* add json annot file

* save

* mv tmp_video dir outside data dir to avoid permission denied when training on modelarts/SFS

* update data loading exception

* fix tokenizer exceeding max_length

* improve data test

* format

---------

Co-authored-by: HaoyangLI <417493727@qq.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.

2 participants