kreshuklab / plant-seg

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

No cuda selection at predictions on Napari GUI #242

Closed Giannisbiol closed 2 months ago

Giannisbiol commented 2 months ago

Hello, as the title says, please check snapshot below too.

Cheers

image

qin-yu commented 2 months ago

Could you share your PlantSeg version and system information?

Also, please check if the following code gives True, because I don't think your cards are visible to PlantSeg:

import torch
torch.cuda.is_available()

Even without CUDA_VISIBLE_DEVICES, PlantSeg should discover all graphic cards if they are available:

image

Giannisbiol commented 2 months ago

Version: 1.7.1 / System: Windows 11 / nvidia gf card: RTX 3500 Ada, CUDA vers. 12.4, driver version: 552.22 (think the latest, havent checked).

I get False actually from the code.

qin-yu commented 2 months ago

I get False actually from the code.

That means PyTorch doesn't see any graphics card available, and PlantSeg only show devices available to PyTorch. The problem is very likely to be CUDA installation. It is very hard to tell what exactly breaks the environment, and Google/ChatGPT would give you a list of things to check. But I would start to look into this problem by checking what packages your mamba actually installed by running conda list (focus on the ones that has cuda or cu in their names).

Giannisbiol commented 2 months ago

Hi again. I did a mistake during installation. Instead of pytorch-cuda=12.1 i put pytorch-cuda=12.4, because of the cuda version of my card. Apologies for bothering you.

Now it works just fine.

Cheers!

qin-yu commented 2 months ago

Congrats! No worries