AdaptiveMotorControlLab / CellSeg3D

A napari plugin for direct 3D cell segmentation -- taking you through training, inference, and review of masks
https://adaptivemotorcontrollab.github.io/CellSeg3D/
MIT License
63 stars 12 forks source link

detection on large cropped data #89

Closed louloupivron closed 2 months ago

louloupivron commented 2 months ago

Hello Cyril,

The plugin is great and working fine on our data without retraining the models if we stick to small hundred-pixels-large 3d cropped volumes. But if we try to scale up to larger regions of the dataset, artifacts are biasing the detection. Is it even made for such data ? How would you advise to scale up the segmentation for the full dataset (180Gb large) ?

Capture large_crop_inference

Appreciate your help !

Louis

C-Achard commented 2 months ago

Hey Louis,

Nice to hear from you again, hope you're well !

Basically it will perform a specific form of instance segmentation and remove all found instance labels that are larger than specified. It should be shown when you select instance segmentation on the latest version of the plugin. If it does not work well please let me know, maybe we can come up with a more suitable filtering.

You can do so using the contrast sliders on the semantic segmentation output; to me it seems your instance segmentation output might be empty because of the threshold value (semantic output looks fine, aside from artifacts)

In my experience those two steps helped a lot to exclude the large majority of artifacts when coupled with running the segmentation on certain regions after brain registration.

Technically I'm sure you can run on the full brain, for example you could fragment it into fairly large cubes and reconstruct it afterwards, but then you will have to go back and remove those volumes on which the segmentation cannot really work anyway - which is why I'd recommend the other way around : isolate ROIs that make sense for your question, and then run segmentation. Happy to discuss this further if this is not what you meant though :)

Hope this helps !

Best, Cyril

louloupivron commented 2 months ago

Thanks a lot for the quick reply ! I should be working on it next week so I will let you know if anything goes wrong from what you suggested.

Appreciate your help 👍

MMathisLab commented 2 months ago

will close for now, but do let us know how it goes!