Skip to content

Commit

Permalink
Tweak segmentation parameters in solution
Browse files Browse the repository at this point in the history
For some reason active_contour and random_walker return different
results now. Earlier dependencies were not tested. The results with
tweaked active_contour and random_walker (as before excpect for fixed
indexing) are similar if slightly worse than before.
  • Loading branch information
lagru committed Aug 28, 2022
1 parent 264f162 commit 4ae63bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lectures/solutions/4_segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
"metadata": {},
"outputs": [],
"source": [
"snake = seg.active_contour(astronaut_gray, points, alpha=0.1, w_edge=1.3)"
"snake = seg.active_contour(astronaut_gray, points, alpha=0.1)"
]
},
{
Expand Down Expand Up @@ -459,7 +459,7 @@
"indices = draw.circle_perimeter(100, 220, 25)\n",
"\n",
"astronaut_labels[indices] = 1\n",
"astronaut_labels[points[:, 1].astype(np.int), points[:, 0].astype(np.int)] = 2\n",
"astronaut_labels[points[:, 0].astype(int), points[:, 1].astype(int)] = 2\n",
"\n",
"image_show(astronaut_labels);"
]
Expand Down

0 comments on commit 4ae63bb

Please sign in to comment.