# SlicerDensityLungSegmentation – using GMM model generated with older scikit-learn

**URL:** <https://discourse.slicer.org/t/slicerdensitylungsegmentation-using-gmm-model-generated-with-older-scikit-learn/24071>\
**Category:** Support\
**Created:** [June 28, 2022, 1:25am UTC](https://discourse.slicer.org/t/slicerdensitylungsegmentation-using-gmm-model-generated-with-older-scikit-learn/24071 "2022-06-28T01:25:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashipde](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ashipde/32/15695_2.png) [@ashipde](https://discourse.slicer.org/u/ashipde)\
**Post date:** [June 28, 2022, 1:25am UTC](https://discourse.slicer.org/t/slicerdensitylungsegmentation-using-gmm-model-generated-with-older-scikit-learn/24071/1 "2022-06-28T01:25:53Z")

</div>

I am testing the DensityLungSegmentation extension, as available in Extension Manager in Slicer 5.0.2 in Python 3.9.10/macOS 12.4 setting. It seems the precomputed GMM model that the extension uses was generated with some older libraries – Python 3.8.5, scikit learn 0.23.2, [etc](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7919807/). – and, as expected, Slicer issues a warning:

```auto
/Users/ashipde/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator GaussianMixture from version 0.23.2 when using version 1.1.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
  warnings.warn(

```

The extension works and generates results, but is the likelihood of inaccuracy high?

---

<div class="post-metadata">

**Author:** ![ashipde](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ashipde/32/15695_2.png) [@ashipde](https://discourse.slicer.org/u/ashipde)\
**Post date:** [June 28, 2022, 7:30am UTC](https://discourse.slicer.org/t/slicerdensitylungsegmentation-using-gmm-model-generated-with-older-scikit-learn/24071/2 "2022-06-28T07:30:49Z")

</div>

May be not too much of an issue? I compared results with the extension (A) against those with LungCTAnalyzer (B) for six CT scans from a 2-yr period and found them to be similar.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/9/99862abff1841167baa0a73336bdda36761e94dd.jpeg)
