DeepInfer issues

I’m trying out DeepInfer and having a few issues. This with a Dec 20 nightly version with a recently downloaded Deepinfer module and I’ve had to make some changes to get it to work at all - First issue was ‘import Queue’ should be ‘import queue’, next issue was with sorting the list of files returned from glob() in populateLocalModels(), next is with running the test button, startswith() is looking for bytes, not a string…

It almost seems like DeepInfer is looking for a different version of Python?

This is on MacOS 10.15.1.

Thanks!

-Hollister

It appears that the DeepInfer extension hasn’t been updated to be compatible with Python 3 which is used in Slicer 4.11 preview while Python 2 is used in Slicer stable 4.10.2.

It appears someone else reported the compatibility issue in a git issue in that extension’s repo. See https://github.com/DeepInfer/Slicer-DeepInfer/issues/13

Follow these instructions for updating the extension https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide#Slicer_5.0:_Python2_to_Python3

@hherhold it would be great if you could submit a pull request with your fixes. Ideally, the changes should be backward compatible with Python2, but if you test in only with Python3 that is useful, too.

Note that we are trying to move towards more generic interfaces for AI-assisted segmentation. We already have NVidia Clara interface in Segment Editor. It would be an option to add Clara interface to DeepInfer models. The advantage of this approach would be that the segmentation tool would be made available very easily to all Slicer users (without requiring docker installation).

Right now I can only test in python 3.

I have it running to the point where the Docker DeepInfer process completes and writes the output nrrd file, but somewhere along the line, the plumbing between docker and slicer isn’t working right. The issue appears to be in thread_doit() - the outputs from self.executeDocker() is just {‘OutputLabel’: None}.

I can submit a pull request for what I’ve fixed thus far, which is just some python 2 to 3 conversions. Any insights on what might be going on in thread_doit()?

This is perhaps a check mark in the “Pro” column for approaches that don’t require Docker, as you’ve noted…

Please send a pull request with your changes and submit an issue in their bugtracker.