ilastik icon indicating copy to clipboard operation
ilastik copied to clipboard

Could not load project file

Open jospell opened this issue 4 years ago • 6 comments

Describe the bug

We are using the Pixel and Object Classification workflow. We trained the classifier a few days ago, always saved the project file and opened it multiple times already for batch processing. However, when we now want to open and run this project this fails. When trying to open the project we get this error message: Could not load project file Axistags AxisInfo 'y' (type: space) AxisInfo 'x' (type: space) AxisInfo 'c' (type: channels) don't fit data shape (3000, 2598)

We have not changes the directory of the project nor of the files we trained the classifier with.

Expected behavior

We expected the project to open normally such that it then also runs as before and then allows to upload multiple files into the project and start another round of batch processing

Error message/traceback

error message: Could not load project file Axistags AxisInfo 'y' (type: space) AxisInfo 'x' (type: space) AxisInfo 'c' (type: channels) don't fit data shape (3000, 2598)

Screenshots

If applicable, please add screenshots to help explain your problem. eventually helpful for traceback anydesk00009

Desktop (please complete the following information):

  • ilastik version: 1.3.3
  • OS: Ubuntu 18.04

jospell avatar Nov 05 '21 20:11 jospell

Hello @jospell,

sorry you ran into this. The error message is not really helpful. ilastik will always append a channel axis to 2d data (during training), so it expects three axis for your data and only gets two. You can explicitly add the input axes description by adding

run_ilastik.sh --headles \
    --project MyProject.ilp \
    --input_axes yx \
    my_data.h5

to your call...

k-dominik avatar Nov 08 '21 13:11 k-dominik

Hello @jospell,

did it help specifying the input axes?

k-dominik avatar Dec 08 '21 07:12 k-dominik

Hey,

Thanks for coming back to this issue again. Unfortunately, explicitly stating the axes did not help and we cannot open that project anymore. Our question is also why this happened seemingly out of nowhere. It worked when setting it up and multiple times after saving, closing and opening it. And then that day this error message occured. Any idea why this can happen? For other projects I never had to explicitly state the axes.

Am 08.12.2021 um 08:51 schrieb Dominik Kutra @.*** @.***>>:

Hello @jospell https://github.com/jospell,

did it help specifying the input axes?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ilastik/ilastik/issues/2495#issuecomment-988577569, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZRESAEVR5TLG7WWZJMMSLUP4FBPANCNFSM5HOVOEXA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jospell avatar Dec 08 '21 12:12 jospell

Hello @jospell,

do you get an error when opening the file (in Gui mode?!)?

Well when the data you want to batch process is somewhat similar to the training data wrt axes ordering, then it should work. But there are some heuristics at work in some places that guess the axis ordering that work often. But not always. It's always best to specify the axes explicitly.

k-dominik avatar Dec 14 '21 13:12 k-dominik

Hi Dominik. I am also getting a similar error 'Could not load project file'.

Starting ilastik from "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta".
ERROR 2022-02-06 15:25:12,500 log_exception 59467 4499740160 Traceback (most recent call last):
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/shell/projectManager.py", line 460, in _loadProject
    serializer.deserializeFromHdf5(self.currentProjectFile, projectFilePath, self._headless)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/base/appletSerializer.py", line 1151, in deserializeFromHdf5
    self._deserializeFromHdf5(topGroup, groupVersion, hdf5File, projectFilePath, headless)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/lazyflow/utility/timer.py", line 153, in wrapper
    return func(*args, **kwargs)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/dataSelectionSerializer.py", line 200, in _deserializeFromHdf5
    datasetInfo, dirty = self._readDatasetInfo(infoGroup, projectFilePath, headless)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/dataSelectionSerializer.py", line 248, in _readDatasetInfo
    datasetInfo = info_class.from_h5_group(infoGroup)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/opDataSelection.py", line 585, in from_h5_group
    return super().from_h5_group(data, params)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/opDataSelection.py", line 174, in from_h5_group
    return cls(**params)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/opDataSelection.py", line 541, in __init__
    assert len(self.expanded_paths) == 1 or self.sequence_axis
AssertionError

ERROR 2022-02-06 15:25:12,501 log_exception 59467 4499740160 Project could not be loaded due to the exception shown above.
Aborting Project Open Action
ERROR 2022-02-06 15:25:12,507 log_exception 59467 4499740160 Traceback (most recent call last):
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/shell/gui/ilastikShell.py", line 1554, in _loadProject
    self.projectManager._loadProject(hdf5File, projectFilePath, readOnly)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/lazyflow/utility/timer.py", line 153, in wrapper
    return func(*args, **kwargs)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/shell/projectManager.py", line 460, in _loadProject
    serializer.deserializeFromHdf5(self.currentProjectFile, projectFilePath, self._headless)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/base/appletSerializer.py", line 1151, in deserializeFromHdf5
    self._deserializeFromHdf5(topGroup, groupVersion, hdf5File, projectFilePath, headless)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/lazyflow/utility/timer.py", line 153, in wrapper
    return func(*args, **kwargs)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/dataSelectionSerializer.py", line 200, in _deserializeFromHdf5
    datasetInfo, dirty = self._readDatasetInfo(infoGroup, projectFilePath, headless)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/dataSelectionSerializer.py", line 248, in _readDatasetInfo
    datasetInfo = info_class.from_h5_group(infoGroup)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/opDataSelection.py", line 585, in from_h5_group
    return super().from_h5_group(data, params)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/opDataSelection.py", line 174, in from_h5_group
    return cls(**params)
  File "/Applications/ilastik-1.4.0b21-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/ilastik/applets/dataSelection/opDataSelection.py", line 541, in __init__
    assert len(self.expanded_paths) == 1 or self.sequence_axis
AssertionError

Any ideas on how to overcome the problem? thank you so much

dcare91 avatar Feb 06 '22 14:02 dcare91

Hey, I am still having issues with index errors and assertions errors. How can I specify axes explicitly? I never had to to it in the past, that’s why I have no clue what to do … Thank you so much!

Am 14.12.2021 um 14:05 schrieb Dominik Kutra @.*** @.***>>:

Hello @jospell https://github.com/jospell,

do you get an error when opening the file (in Gui mode?!)?

Well when the data you want to batch process is somewhat similar to the training data wrt axes ordering, then it should work. But there are some heuristics at work in some places that guess the axis ordering that work often. But not always. It's always best to specify the axes explicitly.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ilastik/ilastik/issues/2495#issuecomment-993518885, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZRESCRUIBXL3LUP4XPWCLUQ46INANCNFSM5HOVOEXA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jospell avatar Feb 23 '22 08:02 jospell