I have a dataset with multiple objects in each image. The objects are bright spots. I have already used blobs_dog to detect the bright spots.
image = io.imread(image_file)
blobs_dog = blob_dog(image, min_sigma=min_sigma,
max_sigma=max_sigma, threshold=threshold)
blobs_dog[:, 2] = blobs_dog[:, 2] * np.sqrt(2)
num_objects = blobs_dog.shape[0]
print(f"{num_objects} identified.")
fig, (ax1, ax2) = plt.subplots(1,2)
ax1.imshow(image, cmap=DEFAULT_CMAP, interpolation='none')
for blob in blobs_dog:
y, x, r = blob
c = plt.Circle((x, y), r, color='lime', linewidth=2, fill=False)
ax1.add_patch(c)
ax1.set_axis_off()
ax2.imshow(equalize_adapthist(image), cmap=DEFAULT_CMAP, interpolation='none')
ax2.set_axis_off()
I now want to make masks of these images to pass them to a U-net.