-
Notifications
You must be signed in to change notification settings - Fork 60
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
additional minor updates (skimage 0.20) #455
Conversation
For floating point inputs, the user must specify data_range. For integer dtype other than uint8 warn on automatic setting of data_range.
disallow order='xy' with ndim>2 for hessian_matrix after the changes, order behavior is as documented and is consistent with structure_tensor
e.g. a user might pass `data_range=image.ptp()`
fix output dtype in case of approximate=True
increment by 1 due to presence of the channel_as_last_axis decorator
@@ -223,7 +228,7 @@ def _hessian_matrix_with_gaussian(image, sigma=1, mode='reflect', cval=0, | |||
|
|||
# 2.) apply the derivative along another axis as well | |||
axes = range(ndim) | |||
if order == 'rc': | |||
if order == 'xy': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the previous behavior here was a bug or should this have remained the same?
Edit: See another line like this below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it was a bug.
In practice, the actual order does not matter for internal functions like skimage.filters.frangi
, skimage.feature.blob_doh
, or skimage.feature.shape_index
that calls this function since these rely only on the eigenvalues or determinant of the matrix which are fortunately the same for either order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change here makes things consistent with skimage.feature.structure_tensor
which also uses the same logic, but had the ordering correct.
…RawModule use for_each_device=True needed for general multi-gpu systems
updated to fix style checks |
Had to add this condition for the scikit-image CPU-based implementation to pass all tests. Added it here for the GPU as well for consistency
The last commit here resolves warnings raised by the NumPy 1.24 pre-release (CuPy reuses the dtype objects from NumPy and so the deprecation warning would appear here as well). This was fixed along with other warnings not currently relevant to cuCIM in scikit-image/scikit-image#6637 |
The change in 5a8e44c seems advisable. I didn't run into NaNs on the GPU when testing this funcdtion, but when porting the same code to Cython I did still see them in scikit-image. The argument to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @grlee77 ! Looks good to me!
@gpucibot merge |
a few additional late additions from skimage 0.20
data_range
forstructural_similarity
hessian_matrix
was reversedand two minor updates to previously merged cucim 2022.12.00 MRs
data_range
argument forstructural_similarity
hessian_matrix_det
Each of these are in separate commits, so can be reveiwed independently