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

Error in detect_maxima_box #59

Closed
haesleinhuepf opened this issue Mar 23, 2023 · 4 comments
Closed

Error in detect_maxima_box #59

haesleinhuepf opened this issue Mar 23, 2023 · 4 comments
Assignees
Labels
bug Something isn't working low priority

Comments

@haesleinhuepf
Copy link
Member

When executing this demo notebook:
https://github.com/clEsperanto/pyclesperanto/blob/main/demos/find_local_maxima.ipynb

The function call to detect_maxima_box results in this error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[6], line 1
----> 1 local_maxima = cle.detect_maxima_box(blurred_image)
      3 cle.imshow(local_maxima)

File ~\mambaforge\envs\bio39\lib\site-packages\pyclesperanto\_decorators.py:72, in plugin_function.<locals>.worker_function(*args, **kwargs)
     69         bound.arguments[key] = get_device()
     71 # call the decorated function
---> 72 return function(*bound.args, **bound.kwargs)

File ~\mambaforge\envs\bio39\lib\site-packages\pyclesperanto\_tier2.py:88, in detect_maxima_box(input_image, output_image, radius_x, radius_y, radius_z, device)
     64 @plugin_function
     65 def detect_maxima_box(
     66     input_image: Image,
   (...)
     71     device: Device = None,
     72 ) -> Image:
     73     """Detects local maxima in a given square/cubic neighborhood.
     74 
     75     Pixels in the resulting image are set to 1 if there is no other pixel in a
   (...)
     86     output_image
     87     """
---> 88     from ._pyclesperanto import _DetectMaximaBoxKernel_Call as op
     90     op(
     91         device,
     92         src=input_image,
   (...)
     96         radius_z=int(radius_z),
     97     )
     98     return output_image

ImportError: cannot import name '_DetectMaximaBoxKernel_Call' from 'pyclesperanto._pyclesperanto' (C:\Users\haase\mambaforge\envs\bio39\lib\site-packages\pyclesperanto\_pyclesperanto.cp39-win_amd64.pyd)

I'm working on Windows 10 and the error is reproducible on both of my GPUs: AMD Vega GPU (integrated) and NVidia RTX 3050 Laptop GPU.

@StRigaud StRigaud self-assigned this Mar 23, 2023
@StRigaud StRigaud added bug Something isn't working low priority labels Mar 23, 2023
@StRigaud
Copy link
Member

StRigaud commented Mar 23, 2023

I will have a look.
This is most likely a left over error from the detect_maxima issue already related there:

@StRigaud
Copy link
Member

this works:

 cle.detect_maxima_box(in, out radius_x=5, radius_y=5, radius_z=5)

this fails:

out =  cle.detect_maxima_box(in, radius_x=5, radius_y=5, radius_z=5)

@StRigaud
Copy link
Member

StRigaud commented Mar 1, 2024

This should be fixed by:

@StRigaud
Copy link
Member

Fix with:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority
Projects
None yet
Development

No branches or pull requests

2 participants