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

Fixed DivisionByZeroError issue with contours having 0 height or width by excluding them #1380

Closed
wants to merge 1 commit into from

Conversation

samuelmathew280
Copy link

I encountered a DivisionByZeroError when running the function to determine orientation (which calls the function get_max_width_length_ratio() while sorting, which divides the width and height), with one of the contours having 0 width or height, which caused the code to abruptly stop. So I added a quick fix to exclude any such contours, as the width and height of the contours are used later on as well.

@felixT2K
Copy link
Contributor

Hey @samuelmathew280 👋🏼,

Thanks for the PR :)

I think after #1336 is merged this shouldn't happen again because we use the models segmentation map which is much more robust as the whole opencv approach, because some to small "boxes" are already filtered out before in the models post processing step

@samuelmathew280
Copy link
Author

Oh great! Any ETA on when that'll happen?

@felixT2K
Copy link
Contributor

depends on @odulcy-mindee review 😅

@felixdittrich92
Copy link
Contributor

felixdittrich92 commented Nov 15, 2023

convert to draft until #1336 is merged to eval if the issue still exists

@felixdittrich92 felixdittrich92 marked this pull request as draft November 15, 2023 08:40
@felixdittrich92
Copy link
Contributor

@samuelmathew280 Could you check it again with the latest changes in main branch please ? :)

@felixdittrich92
Copy link
Contributor

Ping @samuelmathew280 :)

@felixdittrich92
Copy link
Contributor

Hey @samuelmathew280 👋 i will close this ftm feel free to re-open if you still face the error

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