MouseLand / cellpose

a generalist algorithm for cellular segmentation with human-in-the-loop capabilities
https://www.cellpose.org/
BSD 3-Clause "New" or "Revised" License
1.35k stars 388 forks source link

Mac segmentation 11 #34

Closed azijl closed 4 years ago

azijl commented 4 years ago

running current version of cellpose on macOS Mojave or Catalina results in segmentation 11 error when launching GUI version and simply fails to process images in command line.

carsen-stringer commented 4 years ago

can you please provide the command line errors?

azijl commented 4 years ago

Thanks for the email.

I’ve been working in both Ubuntu and MacOS (Catalina). I can work in either of these systems. There seem to be fewer obstacles with Ubuntu but I still have not been able to get the command line to function properly.

Details below. Thanks!

Ubuntu:

(cellpose) zijlstra@zijlstra-KNIME:~/Downloads/cp_image$ python -m cellpose --dir ~/Downloads/cp_images/ --pretrained_model nuclei --chan 1 --diameter 0. --save_png

using CPU estimating diameter for each image running cellpose on 0 images using chan_to_seg RED and chan (opt) NONE 0it [00:00, ?it/s] estimated cell diameters for all images saving results (cellpose) zijlstra@zijlstra-KNIME:~/Downloads/cp_image$

MacOS:

(base_cellpose) bash-3.2$ python -m cellpose objc[35464]: Class QMacAutoReleasePoolTracker is implemented in both /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1a2ef83700) and /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x1a37007030). One of the two will be used. Which one is undefined. objc[35464]: Class QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE is implemented in both /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1a2ef83778) and /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x1a370070a8). One of the two will be used. Which one is undefined. objc[35464]: Class KeyValueObserver is implemented in both /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1a2ef837a0) and /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x1a370070d0). One of the two will be used. Which one is undefined. objc[35464]: Class RunLoopModeTracker is implemented in both /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1a2ef837f0) and /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x1a37007120). One of the two will be used. Which one is undefined.

Segmentation fault: 11

Stack trace returned 10 entries: [bt] (0) 0 libmxnet.so 0x000000011ef3f560 mxnet::op::NDArrayOpProp::~NDArrayOpProp() + 3024 [bt] (1) 1 libmxnet.so 0x0000000120c5f406 mxnet::Storage::Get() + 4374 [bt] (2) 2 libsystem_platform.dylib 0x00007fff6b7b042d _sigtramp + 29 [bt] (3) 3 ??? 0x0000000000001608 0x0 + 5640 [bt] (4) 4 QtGui 0x0000001a2e4a62ec QWindowSystemInterfacePrivate::GeometryChangeEvent::GeometryChangeEvent(QWindow, QRect const&) + 140 [bt] (5) 5 QtGui 0x0000001a2e4ac121 void QWindowSystemInterface::handleGeometryChange(QWindow, QRect const&) + 161 [bt] (6) 6 libqcocoa.dylib 0x0000001a4300bf9f QCocoaWindow::handleGeometryChange() + 1439 [bt] (7) 7 libqcocoa.dylib 0x0000001a4300b3a3 QCocoaWindow::setVisible(bool) + 339 [bt] (8) 8 QtGui 0x0000001a36478d08 QWindowPrivate::setVisible(bool) + 1112 [bt] (9) 9 QtWidgets 0x0000001a37c55c57 QWidgetPrivate::show_sys() + 903

(base_cellpose) bash-3.2$ python -m cellpose --dir ~/Users/andrieszijlstra/Documents/test/ --pretrained_model nuclei --chan 2 --chan2 3 --save_png objc[35493]: Class QMacAutoReleasePoolTracker is implemented in both /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1a27b0d700) and /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x1a2fb92030). One of the two will be used. Which one is undefined. objc[35493]: Class QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE is implemented in both /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1a27b0d778) and /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x1a2fb920a8). One of the two will be used. Which one is undefined. objc[35493]: Class KeyValueObserver is implemented in both /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1a27b0d7a0) and /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x1a2fb920d0). One of the two will be used. Which one is undefined. objc[35493]: Class RunLoopModeTracker is implemented in both /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1a27b0d7f0) and /Users/andrieszijlstra/opt/anaconda3/envs/base_cellpose/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x1a2fb92120). One of the two will be used. Which one is undefined.

using CPU using diameter 30.00 for all images running cellpose on 0 images using chan_to_seg GREEN and chan (opt) BLUE saving results

On Apr 2, 2020, at 12:40 PM, carsen-stringer notifications@github.com wrote:

can you please provide the command line errors?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MouseLand/cellpose/issues/34#issuecomment-607991785, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4QCLFZZUO2LVACR7YSAMLRKTEXVANCNFSM4LQYWXPQ.

carsen-stringer commented 4 years ago

Re: Ubuntu

In the GUI, saving to PNG should work now, please pip install cellpose --upgrade. It's one of the options in the File menu.

Command line: What are the names of your images and what type of images are they? It's not finding any images for some reason.

Re: Mac

You can use the command line without the GUI dependencies now (it won't import PyQt). But not sure how to get the GUI to work, I'll need to look into it some more.

azijl commented 4 years ago

On the Ubuntu: Thanks - update did indeed add the PNG save function

I’m using .tif files. I’ve tried .png. I’ve also tried RBG vs greyscale. No luck on either of them.

I’m attaching one of them here.

On the Mac: I’m not worried about the GUI. I would prefer the command line to work. I suspect its the same problem as in Ubuntu that it can’t find the file.

Andrew

On Apr 2, 2020, at 5:40 PM, carsen-stringer notifications@github.com wrote:

Re: Ubuntu

In the GUI, saving to PNG should work now, please pip install cellpose --upgrade. It's one of the options in the File menu.

Command line: What are the names of your images and what type of images are they? It's not finding any images for some reason.

Re: Mac

You can use the command line without the GUI dependencies now (it won't import PyQt). But not sure how to get the GUI to work, I'll need to look into it some more.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MouseLand/cellpose/issues/34#issuecomment-608128520, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4QCLE4RS3MHBJ3XE27FMDRKUH5NANCNFSM4LQYWXPQ.

carsen-stringer commented 4 years ago

sorry I can't see the file, can you use the github interface to attach it?

carsen-stringer commented 4 years ago

also maybe for the GUI, you could try downgrading cv2 and the earlier version won't conflict with PyQt? Not sure though

pip install opencv_python==3.4.5.20
azijl commented 4 years ago

also maybe for the GUI, you could try downgrading cv2 and the earlier version won't conflict with PyQt? Not sure though

pip install opencv_python==3.4.5.20

This fixed the GUI interface in MacOS (Catalina and Mojave)

azijl commented 4 years ago

test

azijl commented 4 years ago

Re: Ubuntu

In the GUI, saving to PNG should work now, please pip install cellpose --upgrade. It's one of the options in the File menu.

Command line: What are the names of your images and what type of images are they? It's not finding any images for some reason.

Re: Mac

You can use the command line without the GUI dependencies now (it won't import PyQt). But not sure how to get the GUI to work, I'll need to look into it some more.

The upgrade enabled the 'saving to PNG' function in the GUI. The command line is still not recognizing the files (even though the same files are processed in the GUI.

I've tried every file format without success in the command line. The names are conventional alphanumeric names. I attached an image file above.

azijl commented 4 years ago

Access to images was a permissions issue. Using a folder at the root of the user directory /images/ is accessible and allows for command line to function.