Giter Site home page Giter Site logo

Comments (4)

iwuqing avatar iwuqing commented on July 29, 2024

我们采用了ANTsPyNet (https://github.com/ANTsX/ANTsPyNet) 这个第三方库进行自动分割。具体我们调用了其antspynet.utilities.deep_atropos。关于这个function的说明可以在这里找:https://antsx.github.io/ANTsPyNet/docs/build/html/utilities.html#applications

from arssr.

FreshmanMa avatar FreshmanMa commented on July 29, 2024

吴博士,你好,我尝试去用了antspynet,但是没弄出来,能否提供详细的脚本 和 以及这两个Dice and IoU指标该怎么整?刚读研不太懂,一直学习这篇文章。感谢谢!264x264x264目前我没跑动。我用的下面的代码,我不知道对不对。我用的下采样后的132x132x132的MRI.nii.gz,然后再3Dslicer上查看是这样,颜色跟你论文中的也不一样。
import ants import antspynet file_path = './671855.nii.gz'
image = ants.image_read(file_path)
segmentation_result = antspynet.utilities.deep_atropos(image, do_preprocessing=True)['segmentation_image']
ants.image_write(segmentation_result, "./segmentation_671855.nii.gz")

image

from arssr.

iwuqing avatar iwuqing commented on July 29, 2024

我们论文里面的图像是采用itk-snap进行显示的。从你的结果来看,应该是对的。另外关于IOU和dice指标的计算网上有比较多的实现,以下是一个参考代码

import numpy as np

def iou(mask1, mask2):
    intersection = np.logical_and(mask1, mask2).sum()
    union = np.logical_or(mask1, mask2).sum()

    iou_score = intersection / union
    return iou_score

def dice_coefficient(mask1, mask2):
    intersection = np.logical_and(mask1, mask2).sum()
    total = mask1.sum() + mask2.sum()

    dice = (2.0 * intersection) / total
    return dice

from arssr.

FreshmanMa avatar FreshmanMa commented on July 29, 2024

from arssr.

Related Issues (13)

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.