Closed pbushel closed 4 years ago
@pbushel What versions of sckikit-image and scikit-learn are in your environment? If you aren't on the latest scikit-image, can you upgrade it and see if the problem still occurs?
@manthey Thanks for the reply. I have scikit-image v0.16.2 and scikit-learn 0.22.2.post1 installed which seem to be the most current versions available that aren't development.
@manthey I commented out the code in compute_morphometry_features.py where the computation of minor_axis_length was performed/used. I'll probably have to figure out why for that image (and possibly others), the following code in _regioprops.py causes the ValueError: math domain error @property def minor_axis_length(self): l2 = self.inertia_tensor_eigvals[-1] return 4 * sqrt(l2)
@pbushel @manthey I cannot reproduce the error with the indicated image. However, I can construct an example where inertia_tensor_eigvals[-1] comes out ever so slightly negative, which np.sqrt does not like. The problem is in scikit-image, where I have submitted a fix and pull request. I will submit a defensive code fix to HistomicsTK as well so that it works even before the fix to scikit-image is released.
Fixed in #840.
My operating system is CentOS Linux 7 (Core) using Python v3.6
Following the examples to normalize, deconvolute and segment an RBG tif image of a breast cancer tissue H&E slide, I get the following error when attempting to extract features using the compute_morphometry_features module:
The image that causes this error is 0c251941d7bc09d1d42dcfb0af4e2b544565088c.tif available from the Kaggle Histopathologic Cancer Detection competition test data set located here: https://www.kaggle.com/c/histopathologic-cancer-detection/data
I don't know what causes this error.