README inference example fail on M1 macbook after fresh install
bgriffen opened this issue · comments
Describe the bug
Crashing on M1 Mac, upon following README and sample image provided as per example.
To reproduce
Create conda environment, pip install stardist
then run the first few lines of the README
Expected behavior
Inference to be performed
Data and screenshots
In [6]: labels, _ = model.predict_instances(normalize(im))
2023-02-09 22:10:39.930079: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2023-02-09 22:10:39.933592: W tensorflow/core/platform/profile_utils/cpu_utils.cc:126] Failed to get CPU frequency: 0 Hz
2023-02-09 22:10:39.943672: F tensorflow/core/grappler/costs/op_level_cost_estimator.cc:710] Check failed: 0 < gflops (0 vs. 0)type: "CPU"
model: "0"
num_cores: 8
environment {
key: "cpu_instruction_set"
value: "ARM NEON"
}
environment {
key: "eigen"
value: "3.3.90"
}
l1_cache_size: 16384
l2_cache_size: 524288
l3_cache_size: 524288
memory_size: 268435456
Abort trap: 6
**Environment (please complete the following information):**
packages in environment at /Users/username/miniforge3/envs/caltrans:
Name Version Build Channel
abseil-cpp 20200923.3 h9f76cd9_0 conda-forge
absl-py 1.4.0 pyhd8ed1ab_0 conda-forge
aiohttp 3.8.3 py38hb991d35_1 conda-forge
aiosignal 1.3.1 pyhd8ed1ab_0 conda-forge
anyio 3.6.2 pyhd8ed1ab_0 conda-forge
aom 3.5.0 h7ea286d_0 conda-forge
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
appnope 0.1.3 pyhd8ed1ab_0 conda-forge
argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py38hb991d35_3 conda-forge
astor 0.8.1 pyh9f0ad1d_0 conda-forge
asttokens 2.2.1 pyhd8ed1ab_0 conda-forge
astunparse 1.6.3 pyhd8ed1ab_0 conda-forge
async-timeout 4.0.2 pyhd8ed1ab_0 conda-forge
attrs 22.2.0 pyh71513ae_0 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 pyhd8ed1ab_3 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
bcrypt 4.0.1 pypi_0 pypi
beautifulsoup4 4.11.1 pyha770c72_0 conda-forge
bleach 6.0.0 pyhd8ed1ab_0 conda-forge
blinker 1.5 pyhd8ed1ab_0 conda-forge
blosc 1.21.3 h1d6ff8b_0 conda-forge
brotli 1.0.9 h1a8c8d9_8 conda-forge
brotli-bin 1.0.9 h1a8c8d9_8 conda-forge
brotlipy 0.7.0 py38hb991d35_1005 conda-forge
brunsli 0.1 h9f76cd9_0 conda-forge
bzip2 1.0.8 h3422bc3_4 conda-forge
c-ares 1.18.1 h3422bc3_0 conda-forge
c-blosc2 2.6.1 h303ed30_0 conda-forge
ca-certificates 2022.12.7 h4653dfc_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
cachetools 4.2.4 pyhd8ed1ab_0 conda-forge
cellpose 2.2 pypi_0 pypi
certifi 2022.12.7 pyhd8ed1ab_0 conda-forge
cffi 1.15.1 py38ha45ccd6_3 conda-forge
cfitsio 4.2.0 h2f961c4_0 conda-forge
charls 2.4.1 hb7217d7_0 conda-forge
charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge
clang 14.0 pypi_0 pypi
clang-15 15.0.7 default_h9e54d93_0 conda-forge
click 8.1.3 unix_pyhd8ed1ab_2 conda-forge
cloudpickle 2.2.1 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
comm 0.1.2 pyhd8ed1ab_0 conda-forge
contourpy 1.0.7 py38h9dc3d6a_0 conda-forge
cryptography 39.0.0 py38h5eb7249_0 conda-forge
csbdeep 0.7.2 py38h10201cd_0 conda-forge
cycler 0.11.0 pyhd8ed1ab_0 conda-forge
cytoolz 0.12.0 py38hb991d35_1 conda-forge
dask-core 2023.1.1 pyhd8ed1ab_0 conda-forge
dav1d 1.0.0 he4db4b2_1 conda-forge
debugpy 1.6.6 py38h2b1e499_0 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
executing 1.2.0 pyhd8ed1ab_0 conda-forge
flit-core 3.8.0 pyhd8ed1ab_0 conda-forge
fonttools 4.38.0 py38hb991d35_1 conda-forge
freetype 2.12.1 hd633e50_1 conda-forge
frozenlist 1.3.3 py38hb991d35_0 conda-forge
fsspec 2023.1.0 pyhd8ed1ab_0 conda-forge
gast 0.3.3 py_0 conda-forge
giflib 5.2.1 h27ca646_2 conda-forge
google-auth 1.35.0 pyh6c4a22f_0 conda-forge
google-auth-oauthlib 0.4.6 pyhd8ed1ab_0 conda-forge
google-pasta 0.2.0 pyh8c360ce_0 conda-forge
grpc-cpp 1.36.4 hfad0885_1 conda-forge
grpcio 1.36.1 py38h446835f_0 conda-forge
h5py 3.8.0 pypi_0 pypi
hdf5 1.10.6 nompi_h0fc092c_1114 conda-forge
icu 70.1 h6b3803e_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
imagecodecs 2023.1.23 py38h57345ed_0 conda-forge
imageio 2.25.0 pyh24c5eb1_0 conda-forge
importlib-metadata 6.0.0 pyha770c72_0 conda-forge
importlib_resources 5.10.2 pyhd8ed1ab_0 conda-forge
ipykernel 6.20.2 pyh736e0ef_0 conda-forge
ipython 8.9.0 pyhd1c38e8_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipywidgets 8.0.4 pyhd8ed1ab_0 conda-forge
jedi 0.18.2 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
joblib 1.2.0 pypi_0 pypi
jpeg 9e he4db4b2_2 conda-forge
jsonschema 4.17.3 pyhd8ed1ab_0 conda-forge
jupyter 1.0.0 py38h10201cd_8 conda-forge
jupyter_client 7.4.9 pyhd8ed1ab_0 conda-forge
jupyter_console 6.4.4 pyhd8ed1ab_0 conda-forge
jupyter_core 5.1.5 py38h10201cd_0 conda-forge
jupyter_events 0.6.3 pyhd8ed1ab_0 conda-forge
jupyter_server 2.1.0 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge
jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge
jupyterlab_widgets 3.0.5 pyhd8ed1ab_0 conda-forge
jxrlib 1.1 h27ca646_2 conda-forge
keras-preprocessing 1.1.2 pyhd8ed1ab_0 conda-forge
kiwisolver 1.4.4 py38h9dc3d6a_1 conda-forge
krb5 1.20.1 h127bd45_0 conda-forge
lcms2 2.14 h481adae_1 conda-forge
lerc 4.0.0 h9a09cb3_0 conda-forge
libaec 1.0.6 hb7217d7_1 conda-forge
libavif 0.11.1 h3d80962_0 conda-forge
libblas 3.9.0 16_osxarm64_openblas conda-forge
libbrotlicommon 1.0.9 h1a8c8d9_8 conda-forge
libbrotlidec 1.0.9 h1a8c8d9_8 conda-forge
libbrotlienc 1.0.9 h1a8c8d9_8 conda-forge
libcblas 3.9.0 16_osxarm64_openblas conda-forge
libclang-cpp15 15.0.7 default_h9e54d93_0 conda-forge
libcurl 7.87.0 hbe9bab4_0 conda-forge
libcxx 14.0.6 h2692d47_0 conda-forge
libdeflate 1.17 h1a8c8d9_0 conda-forge
libedit 3.1.20191231 hc8eb9b7_2 conda-forge
libev 4.33 h642e427_1 conda-forge
libffi 3.4.2 h3422bc3_5 conda-forge
libgfortran 5.0.0 11_3_0_hd922786_27 conda-forge
libgfortran5 11.3.0 hdaf2cc0_27 conda-forge
libiconv 1.17 he4db4b2_0 conda-forge
libjpeg-turbo 2.1.4 h1a8c8d9_0 conda-forge
liblapack 3.9.0 16_osxarm64_openblas conda-forge
libllvm11 11.1.0 hfa12f05_5 conda-forge
libllvm15 15.0.7 h62b9111_0 conda-forge
libnghttp2 1.51.0 hd184df1_0 conda-forge
libopenblas 0.3.21 openmp_hc731615_3 conda-forge
libpng 1.6.39 h76d750c_0 conda-forge
libprotobuf 3.15.8 hccf11d3_1 conda-forge
libsodium 1.0.18 h27ca646_1 conda-forge
libsqlite 3.40.0 h76d750c_0 conda-forge
libssh2 1.10.0 hb80f160_3 conda-forge
libtiff 4.5.0 h5dffbdd_2 conda-forge
libwebp-base 1.2.4 h57fd34a_0 conda-forge
libxcb 1.13 h9b22ae9_1004 conda-forge
libxml2 2.10.3 h87b0503_0 conda-forge
libzlib 1.2.13 h03a7124_4 conda-forge
libzopfli 1.0.3 h9f76cd9_0 conda-forge
llvm-openmp 15.0.7 h7cfbb63_0 conda-forge
llvmlite 0.39.1 pypi_0 pypi
locket 1.0.0 pyhd8ed1ab_0 conda-forge
lz4-c 1.9.4 hb7217d7_0 conda-forge
markdown 3.4.1 pyhd8ed1ab_0 conda-forge
markupsafe 2.1.2 py38hb991d35_0 conda-forge
matplotlib 3.7.0rc1 pypi_0 pypi
matplotlib-base 3.6.3 py38hbbe890c_0 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
mistune 2.0.4 pyhd8ed1ab_0 conda-forge
multidict 6.0.4 py38hb991d35_0 conda-forge
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
natsort 8.2.0 pypi_0 pypi
nbclassic 0.4.8 pyhd8ed1ab_0 conda-forge
nbclient 0.7.2 pyhd8ed1ab_0 conda-forge
nbconvert 7.2.9 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.2.9 pyhd8ed1ab_0 conda-forge
nbconvert-pandoc 7.2.9 pyhd8ed1ab_0 conda-forge
nbformat 5.7.3 pyhd8ed1ab_0 conda-forge
ncurses 6.3 h07bb92c_1 conda-forge
nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge
networkx 3.0 pyhd8ed1ab_0 conda-forge
notebook 6.5.2 pyha770c72_1 conda-forge
notebook-shim 0.2.2 pyhd8ed1ab_0 conda-forge
numba 0.56.4 pypi_0 pypi
numpy 1.23.5 py38h09ac2d9_0 conda-forge
oauthlib 3.2.2 pyhd8ed1ab_0 conda-forge
opencv-python 4.7.0.68 pypi_0 pypi
opencv-python-headless 4.7.0.68 pypi_0 pypi
openjpeg 2.5.0 hbc2ba62_2 conda-forge
openssl 1.1.1s h03a7124_1 conda-forge
opt_einsum 3.3.0 pyhd8ed1ab_1 conda-forge
packaging 23.0 pyhd8ed1ab_0 conda-forge
pandas 1.5.3 py38h61dac83_0 conda-forge
pandoc 2.19.2 hce30654_1 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
paramiko 3.0.0 pypi_0 pypi
parso 0.8.3 pyhd8ed1ab_0 conda-forge
partd 1.3.0 pyhd8ed1ab_0 conda-forge
pexpect 4.8.0 pyh1a96a4e_2 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pillow 9.4.0 py38h01505ee_0 conda-forge
pip 22.3.1 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge
platformdirs 2.6.2 pyhd8ed1ab_0 conda-forge
polyroi 0.0.4 pypi_0 pypi
pooch 1.6.0 pyhd8ed1ab_0 conda-forge
prometheus_client 0.16.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.36 pyha770c72_0 conda-forge
prompt_toolkit 3.0.36 hd8ed1ab_0 conda-forge
protobuf 3.15.8 py38h6f2b01f_0 conda-forge
psutil 5.9.4 py38hb991d35_0 conda-forge
pthread-stubs 0.4 h27ca646_1001 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pyasn1 0.4.8 py_0 conda-forge
pyasn1-modules 0.2.7 py_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pygments 2.14.0 pyhd8ed1ab_0 conda-forge
pyjwt 2.6.0 pyhd8ed1ab_0 conda-forge
pyopenssl 23.0.0 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
pyqtgraph 0.13.1 pypi_0 pypi
pyrsistent 0.19.3 py38hb991d35_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.8.15 hf452327_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.16.2 pyhd8ed1ab_0 conda-forge
python-flatbuffers 1.12 pyhd8ed1ab_1 conda-forge
python-json-logger 2.0.4 pyhd8ed1ab_0 conda-forge
python_abi 3.8 3_cp38 conda-forge
pytz 2022.7.1 pyhd8ed1ab_0 conda-forge
pyu2f 0.1.5 pyhd8ed1ab_0 conda-forge
pywavelets 1.4.1 py38hb39dbe9_0 conda-forge
pyyaml 6.0 py38hb991d35_5 conda-forge
pyzmq 25.0.0 py38hb72be9f_0 conda-forge
rastermap 0.1.3 pypi_0 pypi
re2 2021.04.01 hbdafb3b_0 conda-forge
readline 8.1.2 h46ed386_0 conda-forge
requests 2.28.2 pyhd8ed1ab_0 conda-forge
requests-oauthlib 1.3.1 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
rsa 4.9 pyhd8ed1ab_0 conda-forge
sbxreader 0.2.2 pypi_0 pypi
scanimage-tiff-reader 1.4.1 pypi_0 pypi
scikit-image 0.19.3 py38h61dac83_2 conda-forge
scikit-learn 1.2.1 pypi_0 pypi
scipy 1.10.0 pypi_0 pypi
send2trash 1.8.0 pyhd8ed1ab_0 conda-forge
setuptools 66.1.1 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
snappy 1.1.9 h17c5cce_2 conda-forge
sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
stardist 0.8.3 py38ha3abf1e_0 conda-forge
suite2p 0.12.1.dev14+g2579413 pypi_0 pypi
tensorboard 2.4.1 pyhd8ed1ab_1 conda-forge
tensorboard-plugin-wit 1.8.1 pyhd8ed1ab_0 conda-forge
tensorflow 2.4.0 py38h150bfb4_0 conda-forge
tensorflow-base 2.4.0 py38h267a8af_0 conda-forge
tensorflow-estimator 2.4.0 pyh9656e83_0 conda-forge
termcolor 2.2.0 pyhd8ed1ab_0 conda-forge
terminado 0.17.1 pyhd1c38e8_0 conda-forge
threadpoolctl 3.1.0 pypi_0 pypi
tifffile 2023.1.23.1 pyhd8ed1ab_0 conda-forge
tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.12 he1e0b03_0 conda-forge
toolz 0.12.0 pyhd8ed1ab_0 conda-forge
torch 1.11.0 pypi_0 pypi
tornado 6.2 py38hb991d35_1 conda-forge
tqdm 4.64.1 pyhd8ed1ab_0 conda-forge
traitlets 5.8.1 pyhd8ed1ab_0 conda-forge
typing-extensions 4.4.0 hd8ed1ab_0 conda-forge
typing_extensions 4.4.0 pyha770c72_0 conda-forge
unicodedata2 15.0.0 py38hb991d35_0 conda-forge
urllib3 1.26.14 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 py_1 conda-forge
websocket-client 1.5.0 pyhd8ed1ab_0 conda-forge
werkzeug 2.2.2 pyhd8ed1ab_0 conda-forge
wheel 0.38.4 pyhd8ed1ab_0 conda-forge
widgetsnbextension 4.0.5 pyhd8ed1ab_0 conda-forge
wrapt 1.14.1 py38hb991d35_1 conda-forge
xorg-libxau 1.0.9 h27ca646_0 conda-forge
xorg-libxdmcp 1.1.3 h27ca646_0 conda-forge
xz 5.2.6 h57fd34a_0 conda-forge
yaml 0.2.5 h3422bc3_2 conda-forge
yarl 1.8.2 py38hb991d35_0 conda-forge
zeromq 4.3.4 hbdafb3b_1 conda-forge
zfp 1.0.0 hb6e4faa_3 conda-forge
zipp 3.11.0 pypi_0 pypi
zlib 1.2.13 h03a7124_4 conda-forge
zlib-ng 2.0.6 he4db4b2_0 conda-forge
zstd 1.5.2 hf913c23_6 conda-forge
Versions:
os: macOS-12.5.1-arm64-arm-64bit
stardist: 0.8.3
csbdeep: 0.7.2
tensorflow: 2.4.0
WARNING:tensorflow:From <ipython-input-1-de739a17937a>:12: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
tensorflow GPU: False
Update: uninstalling tensorflow and running pip install tensorflow-macos
, pip install tensorflow-metal
then re-running pip install stardist
seems to have connected tensorflow to the gpu and now it's working. 👍 I think this should be added to the README for M1 Mac users.
Can you clarify which part of the instructions didn't work or wasn't clear?
https://github.com/stardist/stardist#apple-silicon