pyradiomics特征提取报错‘Image/Mask geometry mismatch. ‘

编程知识 更新时间:2023-05-01 23:47:06

报错详情

ValueError: Image/Mask geometry mismatch. Potential fix: increase tolerance using geometryTolerance, see Documentation:Usage:Customizing the Extraction:Settings:geometryTolerance for more information

Traceback (most recent call last):
  File "D:\project\mri_svm\4_feature_extraction.py", line 29, in <module>
    result = extractor.execute(mri_path, label_path)  # 提取特征
  File "D:\Anaconda\envs\jspt\lib\site-packages\pyradiomics-3.0.1.post15+g2791e23-py3.9-win-amd64.egg\radiomics\featureextractor.py", line 276, in execute
    boundingBox, correctedMask = imageoperations.checkMask(image, mask, **_settings)
  File "D:\Anaconda\envs\jspt\lib\site-packages\pyradiomics-3.0.1.post15+g2791e23-py3.9-win-amd64.egg\radiomics\imageoperations.py", line 243, in checkMask
    raise ValueError('Image/Mask geometry mismatch. Potential fix: increase tolerance using geometryTolerance, '
ValueError: Image/Mask geometry mismatch. Potential fix: increase tolerance using geometryTolerance, see Documentation:Usage:Customizing the Extraction:Settings:geometryTolerance for more information

解决方法

参考官方文档中关于setting的介绍:Customizing the Extraction

 在参数文件 Params.yaml 中的 setting: 部分添加 geometryTolerance 参数,见代码段最后一行。

setting:
  binWidth: 25
  label: 1
  interpolator: 'sitkBSpline'
  resampledPixelSpacing: 
  weightingNorm: 
  geometryTolerance: 1e-5

geometryTolerance参数默认为1e-16, 根据需要改大一些。

更多推荐

pyradiomics特征提取报错‘Image/Mask geometry mismatch. ‘

本文发布于:2023-04-24 14:49:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/69026f8cbd01016726271a989d88a267.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   特征   pyradiomics   Image   mismatch

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 100831文章数
  • 26067阅读数
  • 0评论数