Issues with segmentation #730
Replies: 4 comments 11 replies
-
Just for reference, this is the segmentation that I can get on axonseg. I would love to use the newer version but just can't seem to get it to work for my application. |
Beta Was this translation helpful? Give feedback.
-
Hi @kmayne01 ! Thanks for opening this issue - I've go a few comments/suggestions. First off, I just want to clarify that although the AxonSeg software that you mentioned using previously with success was also developed in our lab, how it works completely differs from this current AxonDeepSeg project, so there's no direct link between the two in terms of development. Secondly, yes the choice of model will be important when considering how o segment your images; typically we first start with a model that used the same modality; you mentioned your images are bright field/BF, and we have a BF model, so I would recommend trying that first even if it was trained on a different specimen than yours. The reason for this is that the image contrast plays an important role in the deep learning model when segmenting (i.e. if myelin is darker than axons or vice versa). As for the choice of resolution, inputing your image's actual resolution is necessary for proper morphology later on. If you don't get good results immediately, the second thing I would suggest is to click the "Settings" button and then adjust the "Zoom" factor. What this does is effectively resamples your image to a different resolution for the segmentation, because we've found that we typically get better results when the 512x512 or 256x256 square "patches" that we send to our deep learning model to segment give better results when the axons appear about the same size within these patches relative to our original training data. After all those options are exhausted and if you don't get good results yet, this is at the point where we could open up the discussion of finding out what properties your images have that make them not segment well and if training a new model may give more desirable results. If you'd like, you could also send us one of your images and we could see we could quickly check to see if there's a combination of settings that works better for your images. |
Beta Was this translation helpful? Give feedback.
-
Hey @mathieuboudreau. Thanks for your quick reply and for your suggestions. I have tried to use the BF model but it didn't show any segmentation even if I adjusted the pixel size. I will definitely try adjusting the zoom factor as this is something that I haven't tried yet. I have been using some different images as I wanted to make sure that the images were of sufficient quality for AxonDeepSeg to analyse before going ahead and imaging all of my samples. I would be more than happy to send you some of them for you to try also if you don't mind! Do you have an email that I can send them via? Thanks! |
Beta Was this translation helpful? Give feedback.
-
I'm wondering if you ever found good settings and/or trained another model that works well for this. I'm attempting to do the same thing with images that look very similar to those you posted and would love to skip ahead on the troubleshooting if possible. Thanks!! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I think I am having a similar issue to one discussed in a previous comment but I cannot see the resolution to as it ended in a zoom call - "Using Brightfield Toluidine Blue images for analysis #639".
I have installed and can load fsleyes for the GUI, however there seems to be an issues with the pixel size that I am using. If I enter the correct pixel size, the code loops and gives the following message:
2023-03-21 15:53:56.432 | DEBUG | ivadomed.inference:get_preds:70 - PyTorch model detected at: /home/ninc-user/axondeepseg/AxonDeepSeg/models/model_seg_mouse_axon-myelin_tem/model_seg_mouse_axon-myelin_tem.pt
2023-03-21 15:53:56.432 | DEBUG | ivadomed.inference:get_preds:71 - Loading model from: /home/ninc-user/axondeepseg/AxonDeepSeg/models/model_seg_mouse_axon-myelin_tem/model_seg_mouse_axon-myelin_tem.pt
2023-03-21 15:53:56.481 | DEBUG | ivadomed.inference:get_preds:74 - Evaluating model: /home/ninc-user/axondeepseg/AxonDeepSeg/models/model_seg_mouse_axon-myelin_tem/model_seg_mouse_axon-myelin_tem.pt
2023-03-21 15:53:56.484 | DEBUG | ivadomed.inference:get_preds:91 - Sending predictions to CPU
I have entered different pixel sizes and have been able to get some segmentation, but nothing that looks correct. We previously used the axonseg software and we have found that it can still do a decent job of segmenting the same image (with the correct pixel size). I'm not sure if this is to do with the model that I have selected and whether I need to create my own as the only model I have been able to get anything from is the TEM one whereas I am using BF images.
Please see the image attached which is using the TEM model with a pixel size of 0.01. I have adjusted this a few times but this is the best that I seem to get without the error message.
Any help would be greatly appreciated!
Katie
Beta Was this translation helpful? Give feedback.
All reactions