Abe404 / root_painter

RootPainter: Deep Learning Segmentation of Biological Images with Corrective Annotation
https://nph.onlinelibrary.wiley.com/doi/full/10.1111/nph.18387
Other
58 stars 16 forks source link

Region Property Crash #22

Closed thecrobe closed 2 years ago

thecrobe commented 2 years ago

Howdy!

When using the extract region property function I find the root painter app crashes on my computer (server is fine). This seems to happen quite often. Any ideas on how to prevent this?

Thanks,

Justin

thecrobe commented 2 years ago

I found its an image (although a few seem to cause this) that was segmented. I have attatched it here. So grateful for the help! A205_stitched_green

Abe404 commented 2 years ago

Thanks! I'm looking into it now.

Abe404 commented 2 years ago

I was able to reproduce the problem with the file provided. The only output so far is "zsh: bus error". Extract length seems to work while extract region properties does not. I will update again when I have more details.

thecrobe commented 2 years ago

oh glad its not just me! No rush!!! Many many thanks

On Nov 2, 2021, at 1:18 PM, Abraham George Smith @.***> wrote:

I was able to reproduce the problem with the file found. Only output so far is "zsh: bus error". Extract length seems to work while extract region properties does not. Will update when I have more details.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Abe404/root_painter/issues/22#issuecomment-957427806, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP52XKZGRNHKKR2UDWZSCDUJ7JJZANCNFSM5HGEK2WA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Abe404 commented 2 years ago

The problem seems to be with the computation of eccentricity. Is this something you are using? I'm thinking of just removing it in the next version as I don't know anyone who is using it.

thecrobe commented 2 years ago

I think its a cool metric but do not know if its the most helpful. The only thing we use it for is to search for outliers when identifying spores and nodules but obviously this doesn’t help well when we get to large clusters. I think removal would be fine if not too much work.

On Nov 2, 2021, at 4:00 PM, Abraham George Smith @.***> wrote:

The problem seems to be with the computation of eccentricity. Is this something you are using? I'm thinking of just removing it in the next version as I don't know anyone who is using it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Abe404/root_painter/issues/22#issuecomment-957762724, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP52XKPDSGYA635SGTROQ3UJ74HFANCNFSM5HGEK2WA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Abe404 commented 2 years ago

It turns out that others are also using it, so I will try to find a way to fix the problem and keep eccentricity output.

Abe404 commented 2 years ago

Hey Justin,

I wasn't able to properly track down the issue in scikit-image that was causing the bus error but found that the issue went away after moving the eccentricity computation code into the RootPainter code base (as opposed to calling the method in the scikit-image library).

I have made a new release for you to test which is available here: https://github.com/Abe404/root_painter/releases/tag/0.2.9

Can you let me know if you are still experiencing the problem with this new version?

Kind regards, Abraham

thecrobe commented 2 years ago

Hi Abraham,

I just had a chance to try it out and it works fine on the image I sent that gave trouble. It now seems its also acting up for this image interestingly. Cant tell if its the same issue… I attached the segmentation in case you’d like to try. It also is happening with another image but will take time to figure out which one.

Is a version of the software without the eccentricity an option to use in the meantime, although I have no idea how difficult that is logistically.

Again so many thanks!

-Justin

On Nov 2, 2021, at 6:12 PM, Abraham George Smith @.***> wrote:

Hey Justin,

I wasn't able to properly track down the issue in scikit-image, that was causing the bus error but found that the issue went away when pulling the eccentricity computation code into the RootPainter code base (as opposed to calling the scikit-image library).

I have made a new release for you to test which is available here: https://github.com/Abe404/root_painter/releases/tag/0.2.9 https://github.com/Abe404/root_painter/releases/tag/0.2.9 Can you let me know if you are still experiencing the problem with this new version?

Kind regards, Abraham

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Abe404/root_painter/issues/22#issuecomment-957957326, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP52XNULITXBZYKUPAVZKDUKALXHANCNFSM5HGEK2WA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Abe404 commented 2 years ago

Hi Justin,

OK thanks. I will take a look. I can't see the new segmentation though. Are you sure you attached it?

Kind regards, Abraham

thecrobe commented 2 years ago

Oh I tried to do through email, let me upload here on github! A017_stitched_green

Abe404 commented 2 years ago

It seems to be working OK for me. Can you confirm you are running version 0.2.9? If you go the About Menu and then click the RootPainter menu item, you should see that the version is 0.2.9.

Assuming you are running 0.2.9 then there isn't much else I can do to fix the eccentricity error, as I'd need to be able to reproduce it on my machine to work on solving it. I will work on a version that makes the output optional using checkboxes as a temporary solution, so you can at least disable the eccentricity output when it causes problems.

thecrobe commented 2 years ago

Hmm very odd. Just checked and its 0.2.9. Temporary solution sounds great for now, if I come into any other bugs Ill let you know!

Justin

On Nov 2, 2021, at 8:56 PM, Abraham George Smith @.***> wrote:

It seems to be working OK for me. Can you confirm you are running version 0.2.9? If you go the About Menu and then click the RootPainter menu item, you should see that the version is 0.2.9.

Assuming you are running 0.2.9 then there isn't much else I can do to fix the eccentricity error, as I'd need to be able to reproduce it on my machine to work on solving it. I will work on a version that makes the output optional using checkboxes as a temporary solution, so you at least disable the eccentricity output when it causes problems.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Abe404/root_painter/issues/22#issuecomment-958120733, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP52XLEJ4SMPPUOKXJBIVDUKA7AXANCNFSM5HGEK2WA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Abe404 commented 2 years ago

Hey Justin,

I think one of the issues with reproducing the problem is that it's related to the computation / memory requirements of processing these large images.

Your original images have size: 5100 × 6600, which is larger than what I usually test the region properties function on.

I tried doubling the width and height of your images and now the error comes back reliably.

So I think there are just some limitations to computing the eccentricity of regions in very large images.

I will work on a solution to allow eccentricity output to be disabled, but another option (if you need eccentricity) would be to reduce the resolution of the images.

I will update in an hour or two when I have the new feature.

Kind regards, Abraham

thecrobe commented 2 years ago

Ah yeah we do take quite large and high res images in our lab. We can downsize for sure and that’s good to know for out 1 mil by 1 mil pixel images I haven’t tried out yet. Great to find this out.

Many thanks!

Justin

On Nov 2, 2021, at 9:19 PM, Abraham George Smith @.***> wrote:

Hey Justin,

I think one of the issues with reproducing the problem is that it's related to the computation / memory requirements of processing these large images.

Your original images have size: 5100 × 6600, which is larger than what I usually test the region properties function on.

I tried doubling the width and height of your images and now the error comes back reliably.

So I think there are just some limitations to computing the eccentricity of regions in very large images.

I will work on a solution to allow eccentricity output to be disabled, but another option (if you need eccentricity) would be to reduce the resolution of the images.

I will update in an hour or two when I have the new feature.

Kind regards, Abraham

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Abe404/root_painter/issues/22#issuecomment-958136224, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP52XJ2Q5JQRXV6M2SCO5DUKBBWDANCNFSM5HGEK2WA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Abe404 commented 2 years ago

OK I updated the installer for the latest release (0.2.9) to include the option to disable eccentricity output. So you have the option of working with your extremely large images if you only want the other region properties.

See inserted screenshot:

region_props_screenshot

The updated installer is available from: https://github.com/Abe404/root_painter/releases/tag/0.2.9

Abe404 commented 2 years ago

When you get chance to test this, can you let me know if extract regions properties works for all of your images now?

And thanks for all your efforts in testing, communicating issues and sharing data to help reproduce the problem

thecrobe commented 2 years ago

Works perfectly for all of the images. Super thankful!

On 2 Nov 2021, at 10:13 PM, Abraham George Smith @.***> wrote:

 When you get chance to test this, can you let me know if extract regions properties works for all of your images now?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.