Open aloboa opened 4 months ago
@aloboa thanks for trying my plugin. Could you please upload your image and/or provide more information about your data so I can better understand what may cause the issue e.g. can you copy the console messages too?
Thanks for your prompt reaction. The image: https://www.dropbox.com/scl/fi/1psdrhw78mdsdtdzfr4yb/DI17_2.tif?rlkey=ij3zntteropr92yt7pu22x9u2&dl=0 The video:
https://github.com/spreka/napari-annotatorj/assets/6074054/902e7cef-802d-481f-b749-5a5b7a418aed
@aloboa thanks for the recording. I did a fresh install of the plugin to a clean env and found that the latest version of keras is not compatible with the default model shipped with the plugin - I will look into this. In the meantime, please check your keras
and tensorflow
versions and make sure to have keras<=2.15.0
and tensorflow<=2.15.0
; I checked with these exact versions and it worked. You can check the console messages to see the model is successfully loaded when you start the plugin/start contour assist.
With pip you can do this with the following commands in the terminal:
pip uninstall keras tensorflow tensorflow-intel tensorflow-io-gcs-filesystem tensorboard tensorboard-data-server
then type y
as many times as it asks if you really want to uninstall these packages; when finished, continue:
pip install keras==2.15.0 tensorflow==2.15.0
Please also note that the default model was trained for nucleus segmentation on regular microscopy images thus it might not be suitable for your images. If so, you can train a new custom model on your own images with the Train
button after you manually annotated at least one image. Also see the README for more info. Let me know if you need help with this.
In a new environment, I do:
(napariannotatorj) alobo@pop-os:~$ pip install napari[all]
(napariannotatorj) alobo@pop-os:~$ pip install napari-annotatorj
(napariannotatorj) alobo@pop-os:~$ pip uninstall keras tensorflow tensorflow-intel tensorflow-io-gcs-filesystem tensorboard tensorboard-data-server
(napariannotatorj) alobo@pop-os:~$ pip install keras==2.15.0 tensorflow==2.15.0
Collecting keras==2.15.0
Using cached keras-2.15.0-py3-none-any.whl.metadata (2.4 kB)
ERROR: Could not find a version that satisfies the requirement tensorflow==2.15.0 (from versions: 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow==2.15.0
(napariannotatorj) alobo@pop-os:~$
@aloboa I see you have pop os which I do not have at the moment, I tried this on win10, win11 and ubuntu 20.04. The problem with the versions was the new keras 3.x needed new tensorflow too and these were not compatible with my older model, so the goal was to downgrade to a version that is. I remember I used something like keras 2.3 or so some time ago with an older tensorflow. Can you try downgrading tensorflow to something below 2.16 which needs keras 3.x and vice verse? Like 2.13 or 2.14 for both e.g. pip install tensorflow<=2.15
My pop OS is essentialy Ubuntu 22.04 LTS
This is what I have tried:
(base) alobo@pop-os:~$ conda activate napariannotatorj
(napariannotatorj) alobo@pop-os:~$ pip install keras==2.14.0 tensorflow==2.14.0
Collecting keras==2.14.0
Downloading keras-2.14.0-py3-none-any.whl.metadata (2.4 kB)
ERROR: Could not find a version that satisfies the requirement tensorflow==2.14.0 (from versions: 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow==2.14.0
(napariannotatorj) alobo@pop-os:~$ pip install keras==2.13.0 tensorflow==2.13.0
ERROR: Could not find a version that satisfies the requirement keras==2.13.0 (from versions: 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.2.2, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0rc0, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0rc3, 2.6.0, 2.7.0rc0, 2.7.0rc2, 2.7.0, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.10.0rc0, 2.10.0rc1, 2.10.0, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0rc3, 2.11.0, 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.13.1rc0, 2.13.1rc1, 2.13.1, 2.14.0rc0, 2.14.0, 2.15.0rc0, 2.15.0rc1, 2.15.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.3.0, 3.3.1, 3.3.2, 3.3.3)
ERROR: No matching distribution found for keras==2.13.0
I have made a fresh installation of napari on a Ubuntu 22.04.5 machine within a mamba environment and installed your plugin with the Plugins tool in napari.
importing from json config + weights .h5 files...
Started loading U-Net model... 2024-10-03 11:37:32.384318: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable
TF_ENABLE_ONEDNN_OPTS=0
. 2024-10-03 11:37:32.404548: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:10575] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-10-03 11:37:32.404566: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:479] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-10-03 11:37:32.405264: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1442] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-10-03 11:37:32.408669: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: SSE4.1 SSE4.2 AVX AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. No module named 'unet'
I open an image and this is written to the console: Opened file: /media/alobo2/SP PHD U3/Islandia/Alteration/Fotos_A_LOBO/DI17_2.tif ROI is the ROI shapes layer Fetched annotation type: instance Found config file /home/alobo2/.napari_annotatorj/models/napari-annotatorj_config.json, updating it now... Successfully wrote config file with current settings ROI is the ROI shapes layer ROI is the ROI shapes layer Contour assist cleared Could not find the Labels layer editLayer is None Could not find the ROI layer
I select Contour assist and start digitizing: contourAssist is the ROI shapes layer Suggesting improved contour... curROI: [[ 939.85571552 1330.34413027] [ 962.96666684 1314.16646434] [1020.74404514 1307.23317895]] list index out of range
I actually never get any suggestion.
Uninstalling from within napari and installing with:
pip install git+https://github.com/spreka/napari-annotatorj.git
results in very different text ti the console:
importing from json config + weights .h5 files...
Started loading U-Net model... WARNING: All log messages before absl::InitializeLog() is called are written to STDERR I0000 00:00:1727949263.579995 28552 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355 2024-10-03 11:54:23.598473: W tensorflow/core/common_runtime/gpu/gpu_device.cc:2343] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... Using CPU for U-Net predictions starting loadUnetModel... Could not load model /home/alobo2/.napari_annotatorj/models/model_real_weights.h5 Could not locate class 'Model'. Make sure custom classes are decorated with
@keras.saving.register_keras_serializable()
. Full object config: {'class_name': 'Model', 'backend': 'tensorflow', 'config': {'input_layers': [['input_1', 0, 0]], 'output_layers': [['conv2d_24', 0, 0]], 'layers': [{'class_name': 'InputLayer', 'config': {'dtype': 'float32', 'name': 'input_1', 'batch_input_shape': [None, 256, 256, 3], 'sparse': False}, 'name': 'input_1', 'inbound_nodes': []}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_1', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 64, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_1', 'inbound_nodes': [[['input_1', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_2', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 64, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_2', 'inbound_nodes': [[['conv2d_1', 0, 0, {}]]]}, {'class_name': 'MaxPooling2D', 'config': {'pool_size': [2, 2], 'strides': [2, 2], 'name': 'max_pooling2d_1', 'data_format': 'channels_last', 'trainable': True, 'padding': 'valid'}, 'name': 'max_pooling2d_1', 'inbound_nodes': [[['conv2d_2', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_3', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 128, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_3', 'inbound_nodes': [[['max_pooling2d_1', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_4', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 128, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_4', 'inbound_nodes': [[['conv2d_3', 0, 0, {}]]]}, {'class_name': 'MaxPooling2D', 'config': {'pool_size': [2, 2], 'strides': [2, 2], 'name': 'max_pooling2d_2', 'data_format': 'channels_last', 'trainable': True, 'padding': 'valid'}, 'name': 'max_pooling2d_2', 'inbound_nodes': [[['conv2d_4', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_5', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 256, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_5', 'inbound_nodes': [[['max_pooling2d_2', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_6', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 256, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_6', 'inbound_nodes': [[['conv2d_5', 0, 0, {}]]]}, {'class_name': 'MaxPooling2D', 'config': {'pool_size': [2, 2], 'strides': [2, 2], 'name': 'max_pooling2d_3', 'data_format': 'channels_last', 'trainable': True, 'padding': 'valid'}, 'name': 'max_pooling2d_3', 'inbound_nodes': [[['conv2d_6', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_7', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 512, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_7', 'inbound_nodes': [[['max_pooling2d_3', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_8', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 512, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_8', 'inbound_nodes': [[['conv2d_7', 0, 0, {}]]]}, {'class_name': 'Dropout', 'config': {'noise_shape': None, 'trainable': True, 'seed': None, 'rate': 0.5, 'name': 'dropout_1'}, 'name': 'dropout_1', 'inbound_nodes': [[['conv2d_8', 0, 0, {}]]]}, {'class_name': 'MaxPooling2D', 'config': {'pool_size': [2, 2], 'strides': [2, 2], 'name': 'max_pooling2d_4', 'data_format': 'channels_last', 'trainable': True, 'padding': 'valid'}, 'name': 'max_pooling2d_4', 'inbound_nodes': [[['dropout_1', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_9', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 1024, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_9', 'inbound_nodes': [[['max_pooling2d_4', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_10', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 1024, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_10', 'inbound_nodes': [[['conv2d_9', 0, 0, {}]]]}, {'class_name': 'Dropout', 'config': {'noise_shape': None, 'trainable': True, 'seed': None, 'rate': 0.5, 'name': 'dropout_2'}, 'name': 'dropout_2', 'inbound_nodes': [[['conv2d_10', 0, 0, {}]]]}, {'class_name': 'UpSampling2D', 'config': {'trainable': True, 'data_format': 'channels_last', 'name': 'up_sampling2d_1', 'size': [2, 2]}, 'name': 'up_sampling2d_1', 'inbound_nodes': [[['dropout_2', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [2, 2], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_11', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 512, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_11', 'inbound_nodes': [[['up_sampling2d_1', 0, 0, {}]]]}, {'class_name': 'Concatenate', 'config': {'trainable': True, 'name': 'concatenate_1', 'axis': 3}, 'name': 'concatenate_1', 'inbound_nodes': [[['dropout_1', 0, 0, {}], ['conv2d_11', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_12', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 512, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_12', 'inbound_nodes': [[['concatenate_1', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_13', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 512, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_13', 'inbound_nodes': [[['conv2d_12', 0, 0, {}]]]}, {'class_name': 'UpSampling2D', 'config': {'trainable': True, 'data_format': 'channels_last', 'name': 'up_sampling2d_2', 'size': [2, 2]}, 'name': 'up_sampling2d_2', 'inbound_nodes': [[['conv2d_13', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [2, 2], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_14', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 256, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_14', 'inbound_nodes': [[['up_sampling2d_2', 0, 0, {}]]]}, {'class_name': 'Concatenate', 'config': {'trainable': True, 'name': 'concatenate_2', 'axis': 3}, 'name': 'concatenate_2', 'inbound_nodes': [[['conv2d_6', 0, 0, {}], ['conv2d_14', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_15', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 256, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_15', 'inbound_nodes': [[['concatenate_2', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_16', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 256, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_16', 'inbound_nodes': [[['conv2d_15', 0, 0, {}]]]}, {'class_name': 'UpSampling2D', 'config': {'trainable': True, 'data_format': 'channels_last', 'name': 'up_sampling2d_3', 'size': [2, 2]}, 'name': 'up_sampling2d_3', 'inbound_nodes': [[['conv2d_16', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [2, 2], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_17', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 128, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_17', 'inbound_nodes': [[['up_sampling2d_3', 0, 0, {}]]]}, {'class_name': 'Concatenate', 'config': {'trainable': True, 'name': 'concatenate_3', 'axis': 3}, 'name': 'concatenate_3', 'inbound_nodes': [[['conv2d_4', 0, 0, {}], ['conv2d_17', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_18', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 128, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_18', 'inbound_nodes': [[['concatenate_3', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_19', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 128, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_19', 'inbound_nodes': [[['conv2d_18', 0, 0, {}]]]}, {'class_name': 'UpSampling2D', 'config': {'trainable': True, 'data_format': 'channels_last', 'name': 'up_sampling2d_4', 'size': [2, 2]}, 'name': 'up_sampling2d_4', 'inbound_nodes': [[['conv2d_19', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [2, 2], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_20', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 64, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_20', 'inbound_nodes': [[['up_sampling2d_4', 0, 0, {}]]]}, {'class_name': 'Concatenate', 'config': {'trainable': True, 'name': 'concatenate_4', 'axis': 3}, 'name': 'concatenate_4', 'inbound_nodes': [[['conv2d_2', 0, 0, {}], ['conv2d_20', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_21', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 64, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_21', 'inbound_nodes': [[['concatenate_4', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_22', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 64, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_22', 'inbound_nodes': [[['conv2d_21', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [3, 3], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_in', 'scale': 2.0, 'seed': None, 'distribution': 'normal'}}, 'name': 'conv2d_23', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 2, 'activation': 'relu', 'padding': 'same', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_23', 'inbound_nodes': [[['conv2d_22', 0, 0, {}]]]}, {'class_name': 'Conv2D', 'config': {'kernel_size': [1, 1], 'kernel_regularizer': None, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'mode': 'fan_avg', 'scale': 1.0, 'seed': None, 'distribution': 'uniform'}}, 'name': 'conv2d_24', 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, 'use_bias': True, 'data_format': 'channels_last', 'trainable': True, 'activity_regularizer': None, 'strides': [1, 1], 'bias_constraint': None, 'filters': 1, 'activation': 'sigmoid', 'padding': 'valid', 'dilation_rate': [1, 1], 'kernel_constraint': None, 'bias_regularizer': None}, 'name': 'conv2d_24', 'inbound_nodes': [[['conv2d_23', 0, 0, {}]]]}], 'name': 'model_1'}, 'keras_version': '2.1.5'} importing done... no exception in loading the model... Failed, model is None
Once I select Contour assist, I get: Opened file: /media/alobo2/SP PHD U3/Islandia/Alteration/Fotos_A_LOBO/DI17_2.tif new layer inserted Image event: Event [<Shapes layer 'ROI' at 0x7bafac4ca7d0>, <Image layer 'Image' at 0x7baea05937d0>] ROI is the ROI shapes layer layers reordered [<Image layer 'Image' at 0x7baea05937d0>, <Shapes layer 'ROI' at 0x7bafac4ca7d0>] Fetched annotation type: instance Found config file /home/alobo2/.napari_annotatorj/models/napari-annotatorj_config.json, updating it now... Successfully wrote config file with current settings ROI is the ROI shapes layer ---- reinited shape controls to layer ROI ROI is the ROI shapes layer Contour assist cleared Could not find the Labels layer editLayer is None Could not find the ROI layer ROI is the ROI shapes layer Contour assist selected at least 1 image layer found Image is the uppermost image layer ROI is the ROI shapes layer Could not find the ROI layer new layer inserted contourAssist event: Event [<Image layer 'Image' at 0x7baea05937d0>, <Shapes layer 'ROI' at 0x7bafac4ca7d0>, <Shapes layer 'contourAssist' at 0x7bb148bf8a50>]
I draw a contour (and get no suggestions) and this is written to the console: Fetched annotation type: instance Found config file /home/alobo2/.napari_annotatorj/models/napari-annotatorj_config.json, updating it now... Successfully wrote config file with current settings ROI is the ROI shapes layer ---- reinited shape controls to layer ROI ROI is the ROI shapes layer Contour assist cleared Could not find the Labels layer editLayer is None Could not find the ROI layer ROI is the ROI shapes layer Contour assist selected at least 1 image layer found Image is the uppermost image layer ROI is the ROI shapes layer Could not find the ROI layer new layer inserted contourAssist event: Event [<Image layer 'Image' at 0x7baea05937d0>, <Shapes layer 'ROI' at 0x7bafac4ca7d0>, <Shapes layer 'contourAssist' at 0x7bb148bf8a50>] contourAssist is the ROI shapes layer Suggesting improved contour... Empty ROI contourAssist is the ROI shapes layer Suggesting improved contour... Empty ROI
Describe the bug I always get "Failed suggesting a better contour"
To Reproduce Steps to reproduce the behavior:
Expected behavior As in the video
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
napari setup (please complete the following information): napari: 0.4.19 Platform: Linux-6.8.0-76060800daily20240311-generic-x86_64-with-glibc2.35 System: Pop!_OS 22.04 LTS Python: 3.9.18 | packaged by conda-forge | (main, Dec 23 2023, 16:33:10) [GCC 12.3.0] Qt: 5.15.2 PyQt5: 5.15.10 NumPy: 1.26.4 SciPy: 1.11.3 Dask: 2024.2.0 VisPy: 0.14.1 magicgui: 0.8.1 superqt: 0.6.1 in-n-out: 0.1.9 app-model: 0.2.4 npe2: 0.7.4
OpenGL:
Screens:
Settings path: