Open slowkow opened 4 years ago
Is this how we're supposed to run the function?
In [90]: d = np.sort(d)
In [91]: res = GHT(d)
In [96]: d[int(res[0])]
Out[96]: 3.45438746714696
Does this mean that GHT() is suggesting to place a threshold at 3.45?
It looks like you're running GHT on a list of points. Try running it on a histogram (or on a sorted list of points provided as input as "x", where "n" is a vector of 1s).
On Sun, Jul 26, 2020 at 2:22 PM Kamil Slowikowski notifications@github.com wrote:
Is this how we're supposed to run the function?
In [90]: d = np.sort(d)
In [91]: res = GHT(d)
In [96]: d[int(res[0])] Out[96]: 3.45438746714696
Does this mean that GHT() is suggesting to place a threshold at 3.45?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jonbarron/hist_thresh/issues/1#issuecomment-664042177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGZFNQMSGNEPUVX6XDDQBDR5SNBDANCNFSM4PIFH3IA .
Here you go: https://drive.google.com/file/d/1IevRDSI3bYGVhcZuDU9IZ81insF3w0XO/view?usp=sharing. I tuned the knobs a bit to give me 2.6.
On Sun, Jul 26, 2020 at 2:42 PM Jon Barron jonbarron@gmail.com wrote:
It looks like you're running GHT on a list of points. Try running it on a histogram (or on a sorted list of points provided as input as "x", where "n" is a vector of 1s).
On Sun, Jul 26, 2020 at 2:22 PM Kamil Slowikowski < notifications@github.com> wrote:
Is this how we're supposed to run the function?
In [90]: d = np.sort(d)
In [91]: res = GHT(d)
In [96]: d[int(res[0])] Out[96]: 3.45438746714696
Does this mean that GHT() is suggesting to place a threshold at 3.45?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jonbarron/hist_thresh/issues/1#issuecomment-664042177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGZFNQMSGNEPUVX6XDDQBDR5SNBDANCNFSM4PIFH3IA .
Thanks!
For anyone visiting this issue, here is the code. The d
array holds a bunch of data points from n.txt
In [17]: print(GHT(np.ones_like(d), np.sort(d), 100000, .1, 0)[0])
Out[17]: 2.62013605497376
Could I ask if there's any intuitive way to describe the parameters nu
and tau
?
They're the hyperparameters of a scaled inverse chi-squared distribution, if you find that intuitive. The paper goes into much more detail on this but they kinda serve to let you interpolate between MET and Otsu's method, and also kinda control how much the histogram is pre-filtered with a Gaussian blur.
On Sun, Jul 26, 2020 at 4:20 PM Kamil Slowikowski notifications@github.com wrote:
Thanks!
For anyone visiting this issue, here is the code. The d array holds a bunch of data points from n.txt https://github.com/jonbarron/hist_thresh/files/4978528/n.txt
In [17]: print(GHT(np.ones_like(d), np.sort(d), 100000, .1, 0)[0]) Out[17]: 2.62013605497376
Could I ask if there's any intuitive way to describe the parameters nu and tau?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jonbarron/hist_thresh/issues/1#issuecomment-664053463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGZFNTHE27KREQZRCY6KWDR5S23DANCNFSM4PIFH3IA .
Hi Jon,
Thanks for the great code and youtube video! I decided to try it out on my own data, and I am a bit confused with the result.
I would expect that GHT() should return 2.6 or so, but I don't understand the output. Could I please ask if you might be able to help me understand how to use this function and how to interpret the output? Is there a way to call GHT() to get the threshold of 2.6?
Here is my data: n.txt