kreshuklab / plant-seg

A tool for cell instance aware segmentation in densely packed 3D volumetric images
https://kreshuklab.github.io/plant-seg/
MIT License
98 stars 31 forks source link

Possible issues in 1.8.1 #342

Open PauCasanova opened 1 month ago

PauCasanova commented 1 month ago

Good afternoon,

I am running the 1.8.1 version of plantseg on a linux Mint 22 machine. Everything works as intended but in some case I get the following error:

2024-10-01 17:44:23,683 [MainThread] INFO PlantSeg - Computing segmentation with dtWS...
Traceback (most recent call last):
  File "/home/pcasanova/anaconda3/envs/plant-seg/bin/plantseg", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/pcasanova/anaconda3/envs/plant-seg/lib/python3.12/site-packages/plantseg/run_plantseg.py", line 83, in main
    process_config(args.config)
  File "/home/pcasanova/anaconda3/envs/plant-seg/lib/python3.12/site-packages/plantseg/run_plantseg.py", line 64, in process_config
    raw2seg(config)
  File "/home/pcasanova/anaconda3/envs/plant-seg/lib/python3.12/site-packages/plantseg/pipeline/raw2seg.py", line 149, in raw2seg
    output_paths = pipeline_step()
                   ^^^^^^^^^^^^^^^
  File "/home/pcasanova/anaconda3/envs/plant-seg/lib/python3.12/site-packages/plantseg/pipeline/steps.py", line 70, in __call__
    return [self.read_process_write(input_path) for input_path in self.input_paths]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pcasanova/anaconda3/envs/plant-seg/lib/python3.12/site-packages/plantseg/pipeline/steps.py", line 88, in read_process_write
    output_data = self.process(input_data)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pcasanova/anaconda3/envs/plant-seg/lib/python3.12/site-packages/plantseg/segmentation/gasp.py", line 84, in process
    ws = self.dt_watershed(pmaps)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pcasanova/anaconda3/envs/plant-seg/lib/python3.12/site-packages/plantseg/segmentation/functional/segmentation.py", line 73, in dt_watershed
    segmentation, _ = distance_transform_watershed(boundary_pmaps, **ws_kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pcasanova/anaconda3/envs/plant-seg/lib/python3.12/site-packages/elf/segmentation/watershed.py", line 138, in distance_transform_watershed
    seeds = compute_maxima(dt, marker=np.nan, allowAtBorder=True, allowPlateaus=True)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: 
Invariant violation!
connected components: Need more labels than can be represented in the destination type.
(/home/conda/feedstock_root/build_artifacts/libvigra_1725360696982/work/include/vigra/union_find.hxx:283)

I have no idea if its an issue from my side but I was wondering if somebody else had this issue before

And not related but also a bit bothersome is that in regular monitors (1920x1080) the gui screem does not work because the run button does not fit. I run it with the config files so it does not affet me but I thought that it was worth mentioning. image

lorenzocerrone commented 1 month ago

Hi,

Regarding your first question, yes, we have seen a similar issue in the past, but we could never reproduce it on a different machine. It would be great if you could share/or privately send me the problematic image. Unfortunately, so far, we have never been able to pinpoint the issue.

Regarding your second question, you should be able to resolve this issue by adjusting the font size in the edit menu. The plantseg gui has been removed from plantsegv2, but we are diligently working on a new one with improved support for different monitors. The new gui is expected to be ready in a few weeks.