CellProfiler / CellProfiler-plugins

Community-contributed and experimental CellProfiler modules.
http://plugins.cellprofiler.org/
56 stars 67 forks source link

Cellpose new version incompatible with runcellpose #147

Closed jesusdpa1 closed 2 years ago

jesusdpa1 commented 2 years ago

Hi,

what version of cellpose is recommended to use the plugin runcellpose.py? currently I am getting the following error

AttributeError: module 'cellpose.models' has no attribute 'use_gpu'

When I look in the cellpose website, seems that '.use_gpu' was moved to core

https://colab.research.google.com/github/MouseLand/cellpose/blob/master/notebooks/run_cellpose_GPU.ipynb

import numpy as np
import time, os, sys
from urllib.parse import urlparse
import skimage.io
import matplotlib.pyplot as plt
import matplotlib as mpl
%matplotlib inline
mpl.rcParams['figure.dpi'] = 300

from urllib.parse import urlparse
from cellpose import models, core

use_GPU = core.use_gpu()
print('>>> GPU activated? %d'%use_GPU)

# call logger_setup to have output of cellpose written
from cellpose.io import logger_setup
logger_setup();