KosinskiLab / colabseg

Jupyter-based tool for membrane segmentation manipulation
Apache License 2.0
9 stars 3 forks source link

Merge clusters not working #4

Closed Luc1100 closed 6 months ago

Luc1100 commented 6 months ago

Merge clusters does not appear to work. When I select two clusters (or more), they are highlighted in the GUI and the point cloud display. However, when I click 'Merge Clusters' nothing happens. No errors appear in the Jupyter notebook log.

maurerv commented 6 months ago

Hi @Luc1100!

Are you using the Github or PyPi version of Colabseg?

Luc1100 commented 6 months ago

Hi @maurerv,

I am using the Github version of Colabseg i.e. I installed it using pip install . from the colabseg directory.

maurerv commented 6 months ago

Great!

I just uploaded the 0.0.3 version of the code base. Could you please pull and install the newest version from GitHub?

Attached below are two screenshots of the procedure. Merging clusters 0, 1, and 2 creates the new cluster 11, which is appended to the end of the list.

Screenshot 2024-04-20 at 22 39 09 Screenshot 2024-04-20 at 22 39 20

Luc1100 commented 6 months ago

It is working now! Thank you for the quick fix!

maurerv commented 6 months ago

Great to hear!

I will go ahead and close this issue, feel free to re-open or create a new issue should you run into any complications

Luc1100 commented 6 months ago

Hi @maurerv,

I just installed the latest GitHub version of ColabSeg on another computer and merging clusters seems to have broken again in the newest version that incorporates MemBrain-seg functionality.

Edit: On the 0.0.3 version I am not sure what causes it but sometimes merging does not work until the kernel is restarted and the data is reloaded. I did a couple rounds of clustering and merging and then randomly I was unable to merge clusters anymore.

Edit 2: This actually appears to be an issue with Jupyter notebook UI over ssh as the viewer also started acting weird. The same version ran locally seems to work fine.

maurerv commented 6 months ago

Hi @Luc1100,

Thanks for reporting this.

Unfortunately, the widgets used by colabseg are very sensitive to the version of jupyter and associated software. As a result, it's possible that not everything works as intended with the jupyter over ssh setup. Personally, I usually compress segmentations using gzip, transfer them to my local PC, and then read the compressed files using colabseg. Even for large tomograms, the size of gzip-compressed segmentations rarely exceeds a few megabytes.

I'll make sure to keep an eye out for similar patterns next time I work on my segmentations :)

Luc1100 commented 6 months ago

I figured it was something that would not really be fixable once I realized the pattern, thanks for the suggestion :)

kimdn commented 5 months ago

Hi @Luc1100,

Thanks for reporting this.

Unfortunately, the widgets used by colabseg are very sensitive to the version of jupyter and associated software. As a result, it's possible that not everything works as intended with the jupyter over ssh setup. Personally, I usually compress segmentations using gzip, transfer them to my local PC, and then read the compressed files using colabseg. Even for large tomograms, the size of gzip-compressed segmentations rarely exceeds a few megabytes.

I'll make sure to keep an eye out for similar patterns next time I work on my segmentations :)

Thank you for releasing awesome tool!

For your troubleshooting/debug, I share what versions I use "jupyter notebook : 6.5.2 and python 3.8".

I can't merge clusters as well (I can delete cluster well though).