Code Monkey home page Code Monkey logo

graphcut's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

graphcut's Issues

为什么前景背景都设置为0,而不是灰度直方图?

在构建graph的时候,所有的节点跟S/T点相连的边,如果不是种子点,那么应该是构建灰度直方图,这样来给定权重的吧?为什么代码中全给0了?

                '''d_f = np.power(self.image[y, x] - self.foreground_average, 2)
                d_b = np.power(self.image[y, x] - self.background_average, 2)
                d_f = np.sum(d_f)
                d_b = np.sum(d_b)
                e_f = d_f / (d_f + d_b)
                e_b = d_b / (d_f + d_b)'''
                self.nodes.append((self.get_node_num(x, y, self.image.shape), 0, 0))

connect失败

这个真的可以运行出结果吗,为什么总是connect失败

一个小bug

g = 1 / (1 + np.sum(np.power(self.image[y, x] - self.image[y, x+1], 2)))

这个地方因为读取的图片是uint8的np.arrry, 如果是[1, 1, 1] - [2, 2, 2]会负溢成[255, 255, 255]与期望的不符,需要转化为np.int32。

How to use graph cut for multi-label task?

Hello, thanks of your contribution about such good work.
I am using graph neural network to parcel brain region, however the result is not good, I want to use graph cut as post process.
The inputs of my current model are: adjacency matrix (10242, 10242), feature matrix (10242, 6), label matrix (10242). The output is the probability y that each node belongs to a label, and its dimension is (10242, 36)
I want to use graph cut to update y for better performance.

I have a few questions about your code:
First, most of graph cut is only for two categories. Can you do multi label tasks?
Second, if I want to do post-processing, what should my input be?

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.