jiyuuchc / lacss

A deep learning model for single cell segmentation from microsopy images.
https://jiyuuchc.github.io/lacss/
MIT License
31 stars 4 forks source link

AttributeError: 'Predictor' object has no attribute 'predict_label'(inference.ipynb run in google clab) #8

Closed Guangpengwgp1202 closed 9 months ago

Guangpengwgp1202 commented 9 months ago

image /usr/local/lib/python3.10/dist-packages/imageio/plugins/pillow.py:304: UserWarning: Loading 16-bit (uint16) PNG as int32 due to limitations in pillow's PNG decoder. This will be fixed in a future version of pillow which will make this warning dissapear. warnings.warn(

AttributeError Traceback (most recent call last) in <cell line: 4>() 2 gt = imageio.imread("image_data/test/000_masks.png") 3 ----> 4 pred = predictor.predict_label(image.astype("float32")) 5 6 # the default model outputs are JAX arrays. It is more convenient

AttributeError: 'Predictor' object has no attribute 'predict_label'

jiyuuchc commented 9 months ago

The notebook is a bit out-of-date. The current API use the following syntax:

pred = predictor.predict(image.astype("float32"), output_type="label")

Will fix in the next commit.

jiyuuchc commented 9 months ago

Fixed with commit 0796bb