Git Product home page Git Product logo

Comments (18)

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

我看到你的NMS里面有提供高斯核滤波,请问这个有没有用到,还是说只用默认参数就好了?

from ncrf.

yil8 avatar yil8 commented on September 27, 2024

@Ryanrenqian 你好,请问你使用的是repo自带的ckpt吗?目前其他用户重写结果层面没有出现问题。

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

没错,我使用的是repo提供的ckpt。

from ncrf.

yil8 avatar yil8 commented on September 27, 2024

@Ryanrenqian 那就比较奇怪了,在你这边能提供更多信息之前,我也没办法进一步定位可能的问题了。

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

我具体是这样做的先根据README提供命令生成了Heatmap然后NMS提取坐标, 最后用的FROC计算,我发现用ASPP生成的Mask.tif文件有问题,就换成直接根据xml注释的坐标进行了计算,得出的结果和之前有个issue的结果是一样的0.39。 所以我想确认的是 提供的ckpt是论文给出的最佳结果吗,如果是的话,那就可能CAMELYON16现在的提供的XML和之前比赛的tif之间是存在差异的。

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024
def judgeinpoly(x, y, coord):
    """
    Judge whether (x,y) is in coord
    """
    HittedLabel = 0
    for i, annotation in enumerate(coord['positive']):
        name = annotation['name']
        vertices = np.array(annotation['vertices'])
        In_poly = points_in_poly([(x, y)], vertices)
        # In_poly = points_in_poly([(y,x)],vertices)
        if In_poly:
            HittedLabel = i + 1
            return HittedLabel
    return HittedLabel


def computeITC(mask, resolution, level):
    """Compute the list of labels containing Isolated Tumor Cells (ITC)
    Description:
        A region is considered ITC if its longest diameter is below 200µm.
        As we expanded the annotations by 75µm, the major axis of the object
        should be less than 275µm to be considered as ITC (Each pixel is
        0.243µm*0.243µm in level 0). Therefore the major axis of the object
        in level 5 should be less than 275/(2^5*0.243) = 35.36 pixels.
    Args:
        evaluation_mask:    The evaluation mask
        resolution:         Pixel resolution of the image at level 0
        level:              The level at which the evaluation mask was made
    Returns:
        Isolated_Tumor_Cells: list of labels containing Isolated Tumor Cells
    """
    max_label = len(mask['positive'])
    Isolated_Tumor_Cells = []
    threshold = 275 / (resolution * pow(2, level))
    for i, annotation in enumerate(mask['positive']):
        name = annotation['name']
        vertices = np.array(annotation['vertices'])
        rect = cv2.minAreaRect(vertices)
        x, y = rect[1]
        length = math.sqrt(pow(x, 2) + pow(y, 2))
        if length < threshold:
            Isolated_Tumor_Cells.append(i + 1)
    return Isolated_Tumor_Cells

主要替换FROC部分的代码如上

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

说错了 是将xml用代码转化成json,然后计算FROC

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

您能不能提供你用NMS生成的坐标,我拿来和我生成的坐标对比一下? 我想确认一下是不是官方提供xml的左右和比赛用的不一样。。

from ncrf.

yil8 avatar yil8 commented on September 27, 2024

@Ryanrenqian ASPP生成的坐标跟我之前用的原始的不太一样。。。你看你生成的Test_026_tissue_mask.npy at level 6 跟我在repo里提供的一样吗?https://drive.google.com/file/d/1BdOJGeag7kq8_p1NqU_v-EQcV_OxHgcW/view

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

这是我生成的结果, 看起来是一样的除了颜色。 另外你保留的test026的mask文件能否发我一下,我的邮箱是[email protected] , 我想看看到底是哪里不一样, 十分感谢你的帮助~~

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

我检查一下tissue mask发现确实存在一些差异。。。。

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

难道我们的原图也不一样吗, 我比较了一下矩阵尺寸,是一样大的, 但是生成的tissue mask确实存在差异...但是我看Prob热力图是非常接近的.

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

我检查了openslide的版本是3.4.1,应该会生成一样的tissue mask啊. 我主要是发现test026的标注和转化成Mask有一些问题, Test026肿瘤区域里会有一部分正常区域,而这个正常区域又有肿瘤区域. 所以想问问Test026的Mask长啥样?
image

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

image
不过tissue确实有问题.我发现 tissue mask变成了Probs了..

from ncrf.

Ryanrenqian avatar Ryanrenqian commented on September 27, 2024

image
这个是生成的组织图 是一样的。。

from ncrf.

yil8 avatar yil8 commented on September 27, 2024

@Ryanrenqian 我给你email发了一份原始的test_026.tif ground truth mask,你要不试试?

from ncrf.

yil8 avatar yil8 commented on September 27, 2024

@Ryanrenqian 如果你这边没有新的问题的话可以关掉这个issue吗?

from ncrf.

Doloresru avatar Doloresru commented on September 27, 2024

您好,我也同样遇到了这个问题,您后来这个问题解决了吗?

from ncrf.

Related Issues (20)

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.