Skip to content

Commit 4f398eb

Browse files
author
JeGa
committed
Added normalization.
1 parent 975837d commit 4f398eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

binseg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ def __init__(self, img, unaries):
174174

175175
self.nodegrid = Nodegrid(img.shape[0], img.shape[1])
176176

177-
self.l = 0.0005
178-
self.w = 10
177+
self.l = 0.5
178+
self.w = 3.5
179179

180180
def edge(self, node_i, node_j, graph):
181181
"""
@@ -255,7 +255,7 @@ def main():
255255

256256
logging.info("Read image.")
257257
img = misc.imread("banana3.png")
258-
img = np.array(img, dtype=np.float64)
258+
img = np.array(img, dtype=np.float64) / 255
259259

260260
if not os.path.exists("unary.npy"):
261261
generateunaries(img)

0 commit comments

Comments
 (0)