cellpose
cellpose copied to clipboard
GPU not being used by Cellpose
Install problem I installed CUDA 11.8.0 and PyTorch 11.8. TORCH CUDA version installed and working. The Use GPU option is enabled on the GUI. Yet, GPU remains idle (i.e. 0%) and CPU runs at max speed while running Cellpose.
Environment info Cellpose 2.2.3
Run log (cellpose) PS C:> python -m cellpose 2024-03-26 15:31:20,772 [INFO] WRITING LOG OUTPUT TO C:\Users\XXXXXXXXXX.cellpose\run.log 2024-03-26 15:31:20,772 [INFO] cellpose version: 2.2.3 platform: win32 python version: 3.11.7 torch version: 2.2.1 2024-03-26 15:31:22,626 [INFO] ** TORCH CUDA version installed and working. **
Only the CNN and the net outputs are processed on the GPU, if you're not actively segmenting an image the GPU isn't utilized
I have the same problem. If I enter print('>>> GPU activated? %d'%use_GPU)
I get >>> GPU activated? 1
however the GPU usage remains ideal even when I run model.eval() . This function should be using the GPU right? Further I don't get any error at the lines before this when I initialise the model ~ model = models.Cellpose(gpu=True, model_type='cyto')
How can I make sure that cellpose is using the GPU? I have fairly large images to work with around 5GB in size so would like to make use of it. Thanks!
I would use nvidia-smi
on the command line to check the usage, or in windows maybe something like geforce. does the GPU version of cellpose not run faster than the CPU version?