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

Assertion error when computing segmentation #25

Open
csherwood-usgs opened this issue May 24, 2022 · 4 comments
Open

Assertion error when computing segmentation #25

csherwood-usgs opened this issue May 24, 2022 · 4 comments

Comments

@csherwood-usgs
Copy link
Contributor

I get the following when trying to compute segmentation on the third example (orthomosaic.jpg), which has no data in lower left quadrant. I did not have any doodles there. I also had done some zooming and panning while doodling.

  File "C:\Users\csherwood\Anaconda3\envs\doodler-dev\lib\site-packages\param\parameterized.py", line 400, in _depends
    return func(*args, **kw)
  File "C:\crs\src\holodoodler\doodler\components.py", line 562, in _compute_segmentation
    y_target_range=(0, img_height),
  File "C:\crs\src\holodoodler\doodler\components.py", line 273, in project_doodles
    df_proj['x_proj'] = _project_line_dimension(df_proj['x'], x_cur_range, x_target_range)
  File "C:\crs\src\holodoodler\doodler\components.py", line 254, in _project_line_dimension
    assert ((cur_range[0] <= s) & (s <= cur_range[1])).all()
AssertionError
@csherwood-usgs
Copy link
Contributor Author

csherwood-usgs commented May 24, 2022

After some experimentation, I am pretty sure the assertion error during segmentation occurs if the image has not been "reset" to the original zoom level (and maybe bounds). If you can trigger the "reset" action before starting the segmentation, that might prevent the error. For now, the workaround is to remember to reset if you have been zooming.

@maximlt
Copy link
Collaborator

maximlt commented May 25, 2022

Thanks for reporting this error, that indeed looks like a bug.

@maximlt
Copy link
Collaborator

maximlt commented May 25, 2022

@csherwood-usgs I haven't been able to reproduce this bug. Do you have more info about as to I could reproduce it? I've tried doodling lines after zooming in and panning out, then triggering the segmentation but I got no error.

I made a few changes today to simplify the app and validate the doodles, maybe they'll help with this issue #29

@csherwood-usgs
Copy link
Contributor Author

@maximlt Hmm. I can't reproduce it now either. If I encounter it again, I will make a video of it.

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

2 participants