Pixel classification using the Fiji plugin

Hey All,

I was wondering if anyone could help me. I’m currently trying to use the Ilastik 1.3.3 software to do pixel classification using the fiji plugin with an eventual aim to create a macro for my imaging pipeline. So far i’ve managed to train a pixel classification workflow using the GUI interface, but on trying use this in the plugin I keep receiving this error after its nearly finished running:

NFO] /exported_data: DATASET
[INFO] /data: DATASET
[INFO] Found dataset '/data' of type 'uint8'
[INFO] Constructing output image of shape (2120, 1416, 1, 100, 1). Axis order: 'XYCZT'
[INFO] Loading HDF5 dataset took: 24014
[INFO] Done loading HDF5 file!
[INFO] Temporary files: {tempFileRawInput=C:\Users\jackh\AppData\Local\Temp\ilastik4j6827207259125517097_in_raw.h5, tempFileOutput=C:\Users\jackh\AppData\Local\Temp\ilastik4j4547291321227966472_out.h5}
[INFO] Exporting image of shape (1, 100, 1416, 2120, 1). Axis order: 'TZYXC'
[INFO] Saving as 'uint8'. Compression level: 1
[INFO] Running ilastik headless command:
[INFO] [C:\Program Files\ilastik-1.3.3post2\ilastik.exe, --headless, --project=E:\Catherine\OH15263_d1_1ftBOOH_3m_BleakG\200416_v133_hdf5pixelclass.ilp, --output_filename_format=C:\Users\jackh\AppData\Local\Temp\ilastik4j4547291321227966472_out.h5, --output_format=hdf5, --output_axis_order=tzyxc, --input_axes=tzyxc, C:\Users\jackh\AppData\Local\Temp\ilastik4j6827207259125517097_in_raw.h5]
[INFO] INFO lazyflow.operators.filterOperators: Using fast filters.
[ERROR] WARNING __init__.py(20): UserWarning: init: Could not import tiktorch classifier
[INFO] INFO ilastik_main: Starting ilastik from "C:\Program Files\ilastik-1.3.3post2".
[INFO] Starting ilastik from "C:\Program Files\ilastik-1.3.3post2".
[INFO] INFO ilastik_main: Configuring lazyflow RAM limit to 4.0GiB
[INFO] INFO lazyflow.utility.memory: Available memory set to 4.0GiB
[ERROR] WARNING 2020-04-16 01:54:42,649 opConservationTracking 6356 12868 Could not find any ILP solver
[ERROR] WARNING 2020-04-16 01:54:42,710 opStructuredTracking 6356 12868 Could not find any ILP solver
[ERROR] WARNING 2020-04-16 01:54:42,715 structuredTrackingWorkflow 6356 12868 Could not find any learning solver. Tracking will use flow-based solver (DPCT). Learning for tracking will be disabled!
[INFO] INFO ilastik.shell.projectManager: Opening Project: E:/Catherine/OH15263_d1_1ftBOOH_3m_BleakG/200416_v133_hdf5pixelclass.ilp
[ERROR] WARNING dataset.py(313): H5pyDeprecationWarning: dataset.value has been deprecated. Use dataset[()] instead.
[ERROR] WARNING 2020-04-16 01:54:45,017 pixelClassificationWorkflow 6356 12868 Your project file has no classifier.  A new classifier will be trained for this run.
[INFO] INFO ilastik.workflows.pixelClassification.pixelClassificationWorkflow: Beginning Batch Processing
[ERROR] ERROR 2020-04-16 01:54:45,111 log_exception 6356 12868 Traceback (most recent call last):
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\shell\projectManager.py", line 467, in _loadProject
[ERROR]     self.workflow.onProjectLoaded(self)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\workflows\pixelClassification\pixelClassificationWorkflow.py", line 382, in onProjectLoaded
[ERROR]     self.batchProcessingApplet.run_export_from_parsed_args(self._batch_input_args)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\applets\batchProcessing\batchProcessingApplet.py", line 64, in run_export_from_parsed_args
[ERROR]     return self.run_export(role_path_dict, parsed_args.input_axes, sequence_axis=parsed_args.stack_along)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\applets\batchProcessing\batchProcessingApplet.py", line 118, in run_export
[ERROR]     progress_callback=partial(lerpProgressSignal, global_progress_start, global_progress_end),
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\applets\batchProcessing\batchProcessingApplet.py", line 180, in export_dataset
[ERROR]     logger.info(f"Exporting to {opDataExport.ExportPath.value}")
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\lazyflow\lazyflow\slot.py", line 1015, in value
[ERROR]     temp = self[:].wait()
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\lazyflow\lazyflow\slot.py", line 958, in __getitem__
[ERROR]     raise Slot.SlotNotReadyError(slotInfoMsg)
[ERROR] lazyflow.slot.Slot.SlotNotReadyError: Can't get data from slot <class 'ilastik.utility.opMultiLaneWrapper.OpMultiLaneWrapper'>.ExportPath yet. It isn't ready.First upstream problem slot is: OpExportSlot/OpExportSlot.Input []: 	{_ready : False, shape : None, has_mask : None, _dirty : True}
[ERROR] 
[ERROR] ERROR 2020-04-16 01:54:45,111 log_exception 6356 12868 Project could not be loaded due to the exception shown above.
[ERROR] Aborting Project Open Action
[ERROR] ERROR 2020-04-16 01:54:45,122 excepthooks 6356 12868 Unhandled exception in thread: 'MainThread'
[ERROR] ERROR 2020-04-16 01:54:45,124 excepthooks 6356 12868 Traceback (most recent call last):
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik.py", line 134, in <module>
[ERROR]     main()
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik.py", line 128, in main
[ERROR]     hShell = ilastik_main.main(parsed_args, workflow_cmdline_args)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik_main.py", line 165, in main
[ERROR]     f(shell)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik_main.py", line 338, in loadProject
[ERROR]     shell.openProjectFile(path, parsed_args.readonly)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\shell\headless\headlessShell.py", line 125, in openProjectFile
[ERROR]     self.projectManager._loadProject(hdf5File, projectFilePath, readOnly)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\lazyflow\lazyflow\utility\timer.py", line 153, in wrapper
[ERROR]     return func(*args, **kwargs)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\shell\projectManager.py", line 467, in _loadProject
[ERROR]     self.workflow.onProjectLoaded(self)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\workflows\pixelClassification\pixelClassificationWorkflow.py", line 382, in onProjectLoaded
[ERROR]     self.batchProcessingApplet.run_export_from_parsed_args(self._batch_input_args)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\applets\batchProcessing\batchProcessingApplet.py", line 64, in run_export_from_parsed_args
[ERROR]     return self.run_export(role_path_dict, parsed_args.input_axes, sequence_axis=parsed_args.stack_along)
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\applets\batchProcessing\batchProcessingApplet.py", line 118, in run_export
[ERROR]     progress_callback=partial(lerpProgressSignal, global_progress_start, global_progress_end),
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\ilastik\ilastik\applets\batchProcessing\batchProcessingApplet.py", line 180, in export_dataset
[ERROR]     logger.info(f"Exporting to {opDataExport.ExportPath.value}")
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\lazyflow\lazyflow\slot.py", line 1015, in value
[ERROR]     temp = self[:].wait()
[ERROR]   File "C:\Program Files\ilastik-1.3.3post2\ilastik-meta\lazyflow\lazyflow\slot.py", line 958, in __getitem__
[ERROR]     raise Slot.SlotNotReadyError(slotInfoMsg)
[ERROR] lazyflow.slot.Slot.SlotNotReadyError: Can't get data from slot <class 'ilastik.utility.opMultiLaneWrapper.OpMultiLaneWrapper'>.ExportPath yet. It isn't ready.First upstream problem slot is: OpExportSlot/OpExportSlot.Input []: 	{_ready : False, shape : None, has_mask : None, _dirty : True}
[ERROR] 
[ERROR] ilastik error: 
[ERROR] The operation completed successfully.
[ERROR] 
[ERROR] 
[INFO] ilastik execution finished successfully!
[INFO] Deleted tmp file: C:\Users\jackh\AppData\Local\Temp\ilastik4j6827207259125517097_in_raw.h5
[ERROR] Module threw exception
ncsa.hdf.hdf5lib.exceptions.HDF5FileNotFoundException: Path does not exit. (C:\Users\jackh\AppData\Local\Temp\ilastik4j4547291321227966472_out.h5)
	at ch.systemsx.cisd.hdf5.HDF5BaseReader.openFile(HDF5BaseReader.java:194)
	at ch.systemsx.cisd.hdf5.HDF5BaseReader.<init>(HDF5BaseReader.java:147)
	at ch.systemsx.cisd.hdf5.HDF5BaseReader.<init>(HDF5BaseReader.java:126)
	at ch.systemsx.cisd.hdf5.HDF5ReaderConfigurator.reader(HDF5ReaderConfigurator.java:86)
	at ch.systemsx.cisd.hdf5.HDF5FactoryProvider$HDF5Factory.openForReading(HDF5FactoryProvider.java:54)
	at ch.systemsx.cisd.hdf5.HDF5Factory.openForReading(HDF5Factory.java:64)
	at org.ilastik.ilastik4ij.hdf5.Hdf5DataSetReader.read(Hdf5DataSetReader.java:51)
	at org.ilastik.ilastik4ij.executors.AbstractIlastikExecutor.executeIlastik(AbstractIlastikExecutor.java:64)
	at org.ilastik.ilastik4ij.executors.PixelClassification.classifyPixels(PixelClassification.java:24)
	at org.ilastik.ilastik4ij.ui.IlastikPixelClassificationCommand.runClassification(IlastikPixelClassificationCommand.java:72)
	at org.ilastik.ilastik4ij.ui.IlastikPixelClassificationCommand.run(IlastikPixelClassificationCommand.java:60)
	at org.scijava.command.CommandModule.run(CommandModule.java:199)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

I’ve made sure to train the model using a .hdf5 file and converted all my data for input to the plugin on fiji to the same filetype as had some issues with dimensionality as all saved as .czi files initially. Has anyone else had this problem?

Many thanks,

Jack

Hi @Jmartin,

welcome to the Forum!!

I haven’t seen this particular problem yet. I have tried to reproduce this in various ways (project without a classifier, without annotations), but it will still work for me. Can you open the project once more in ilastik and confirm that you can export from there? (And be sure to safe the project after you have trained it)?

Hey,

Thank you for the help managed to find the solution, it was a case of the batch input file having a different dimensionality as was using a file generated that hadn’t needed denoising. Hence, it had been directly converted to hdf5 format and not split into tifs and reodered on the regeneration of the stack.
Thank you again and sorry for the late reply.