kreshuklab / plant-seg

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

Error after updating plantseg #168

Closed athulrv closed 11 months ago

athulrv commented 1 year ago

plantseg error

2023-11-02 17:14:42,545 - key: device has got value: cuda, but torch can not detect a valid cuda device. defaulting default value: cpu 2023-11-02 17:14:42,545 - key: 'stride_ratio' is missing, plant-seg is trying to use a default. 2023-11-02 17:14:42,545 - key: stride_ratio has got value: None, but value must be a float (or integer). defaulting default value: 0.75

athulrv commented 1 year ago

error persist even if i use old working config file or change to cpu. it seems like the error is associated with the update. @qin-yu @wolny

qin-yu commented 1 year ago

@athulrv It is related to previous update of PlantSeg (a few months ago maybe?), but not due to the update I did for this paper. You can either modify the config I sent in Slack on Tuesday or use the templates from https://github.com/hci-unihd/plant-seg/tree/master/examples

athulrv commented 1 year ago

using this config file didnt help. Also tried to remove plantseg and install again. no change. is there a way to remove plantseg and its dependencies completely? i just deleted the env folder to remove it.

qin-yu commented 1 year ago

For the record, Athul encountered this different error for plantseg --config pipeline:

image

I guess this is because we haven't released the latest PlantSeg yet and the installation guide only gives Athul v1.6.0, maybe we could release a tag or version just for the paper after I finalise the default model thing? @wolny

wolny commented 1 year ago

hey Qin. Yes, if we want to use the new keys then we need to release. I'll do a minor release now and let you know

wolny commented 1 year ago

I've released the new version (v1.6.1). Now the new keys that @qin-yu introduces should not cause any issues. Please update your plantseg @athulrv

athulrv commented 1 year ago

with terminal_its_using cpu , but working error_after_updating

I updated to 1.6.1 Now plantseg has similar error in gui, with terminal its working but with cpu. @wolny

wolny commented 1 year ago

Hi @athulrv, thanks for letting me know. Regarding the 'cpu'. Could you tell me what conda list command tells about the pytorch version installed? I'm afraid that pytorch-cpu was wrongly installed after the update. I'd recommend you install plantseg from scratch following instructions in https://github.com/hci-unihd/plant-seg#install-plantseg-using-mamba.

As for the old UI: we don't use the mirror_padding option anymore in the config. But anyway, it should be a warning, not an error. As a workaround please remove the mirror_padding options from the config you're using and the default config, which can be found under ~/.plantseg_models/configs/config_gui_last.yaml.

athulrv commented 1 year ago

Hi @wolny image

The error was after I installed plantseg fresh using mamba.

qin-yu commented 1 year ago

@athulrv did you try putting CUDA_VISIBLE_DEVICES=0 in front of plantseg --config?

Buglakova commented 11 months ago

Hello. For me installing plantseg with the command given in documentation installed the cpu version only. Adding the appropriate version of cudatoolkit explicitly solved it @athulrv:

mamba create -n plant-seg -c pytorch -c nvidia -c conda-forge -c lcerrone plantseg pytorch-cuda=11.7 cudatoolkit

lorenzocerrone commented 11 months ago

Thanks @Buglakova! I have tested and worked also for me. I'll fix the read me