salaee / pegbis Goto Github PK
View Code? Open in Web Editor NEWPython implementation of "Efficient Graph-Based Image Segmentation" paper
Python implementation of "Efficient Graph-Based Image Segmentation" paper
Since there are many .py files and main makes reference to these files. How can we run the code?. It is showing undefined name reference in main for all the references made to other .py files.
Please help
Why is there no minimum spanning tree part in the code ?
IN main.py the 47 line if (x < width - 1) and (y < height - 2):
I think it should be " if (x < width - 1) and (y < height - 1):"
So I've tried running the main.py file with all the images in the data folder, but it only displays an empty plot.
I'm using python 3.6.5.
Please let me know if any additional details are required.
Anyway, it works fine for tested images, but some codes are confusing
mask
in the normalization is wrong.Original C++ version:
/* normalize mask so it integrates to one */
static void normalize(std::vector<float> &mask) {
int len = mask.size();
float sum = 0;
for (int i = 1; i < len; i++) {
sum += fabs(mask[i]);
}
sum = 2*sum + fabs(mask[0]);
for (int i = 0; i < len; i++) {
mask[i] /= sum;
}
}```
> This version in filter.py#L30 :
```python
2 * np.sum(np.absolute(mask)) + abs(mask[0])
maybe the +
before abs(mask[0])
should be -
.
The convolve_even(src, mask)
actually does not flip the output.
In make_fgauss: mask[i] = math.exp(-0.5 * math.pow(i / sigma, i / sigma))
, the math.pow
is not correctly used.
At main.py#L47
, if (x < width - 1) and (y < height - 2):
, here y < height - 1
.
In my workplace, the git connection is banned, so I can't directly pull a request. ๐
mask[i] = math.exp(-0.5 * math.pow(i / sigma, i / sigma))
shouldn't mask[i] = math.exp(-0.5 * math.pow(i / sigma, 2))
ModuleNotFoundError: No module named 'segment_graph'
unable to install segment_graph
using google colab
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.