Giter Club home page Giter Club logo

models's Introduction

models's People

Contributors

lennyn95 avatar silvandeleemput avatar miriam-groeneveld avatar ccosmin97 avatar denbonte avatar vanossj avatar surajpaib avatar fedorov avatar

Stargazers

Phil Chlap avatar Deepa Krishnaswamy avatar Moein Shariatnia avatar Keno avatar  avatar  avatar  avatar

Watchers

 avatar

models's Issues

Update model description to include pointers to suitable images in IDC

As discussed earlier, I think this should be added to model.json and also propagate into the web page of the model. I suggest the most straightforward would be to include SeriesInstanceUID(s) for the suitable DICOM series that were confirmed to produce acceptable results with the model.

Add Prostate158 model

@LennyN95 @denbonte - we would like to add Prostate158 zonal segmentation model. @ccosmin97 is happy to work on this, although he would definitely appreciate help from the original developer @kbressem (perhaps this is anyway consistent with @hugoaerts desire to have more AIM-Harvard models in MHub).

Can we discuss steps/timeline/missing features (hopefully none!) here?

MHub / GC - gc_lunglobes > 1 GPU crash

  • The model is currently crashing when more than one GPU is available and this requires explicit GPU selection on machines with >1 GPUs installed on the host machine. This needs to be addressed, as all MHub models are expected to run with the --gpus all option.

Originally posted by @LennyN95 in #42 (comment)

The issue

When running the MHub docker container with the lobe segmentation code from this repository with the --gpus all flags enabled and having 2 or more GPUs we run into the following error:

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.8/logging/__init__.py", line 1085, in emit
    msg = self.format(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 929, in format
    return fmt.format(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 668, in format
    record.message = record.getMessage()
  File "/usr/lib/python3.8/logging/__init__.py", line 373, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/app/models/gc_lunglobes/utils/LobeSegmentationRunner.py", line 50, in task
    handle = segment_lobe_init()
  File "/app/src/test.py", line 1830, in segment_lobe_init
    lobe_seg_instance = LobeSegmentationTSTestCOVID(settings)
  File "/app/src/test.py", line 1524, in __init__
    self.init()
  File "/app/src/test.py", line 700, in init
    self.logger.info("Let's use", torch.cuda.device_count(), "GPUs!")
Message: "Let's use"
Arguments: (2, 'GPUs!')

This error appears to be related to incorrect formatting of the logger.info call. Furthermore, if the logging line is removed we get the following error:

  File "/app/models/gc_lunglobes/utils/LobeSegmentationRunner.py", line 51, in task
    seg_result_np = segment_lobe(handle, img_np, meta_dict)
  File "/app/src/test.py", line 1861, in segment_lobe
    pred = handle.run(transformed_data_dict)
  File "/app/src/test.py", line 1572, in run
    scan_level_inf = self.model.scan_level_inference(pad_scan).cpu().squeeze(0)
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1614, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'DataParallel' object has no attribute 'scan_level_inference'

Upon inspecting the latter issue it appears that getting the multi-GPU feature to work properly isn't as simple as wrapping the model with torch.nn.DataParallel because the wrapped model uses custom methods (i.e. scan_level_inference) for inference, which are not picked up by the DataParallel mechanism of PyTorch.

Suggested fix

As fixing the multi-GPU feature properly would be quite some work, the broken multi-GPU feature could be disabled entirely by removal of the following lines:

https://github.com/DIAGNijmegen/bodyct-pulmonary-lobe-segmentation/blob/5a64b70504d46c042c30851a69cec370f1202e67/test.py#L699-L702

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.