Closed ha-daiy closed 1 year ago
You can edit the plotting code with a quick predicate which checks whether yours preds are equal to the class you care about. Heres a quick idea (you might nd to edit this a bit to get it to work)
import matplotlib.pyplot as plt
from utils import unnorm, remove_axes
fig, ax = plt.subplots(1,3, figsize=(5*3,5))
ax[0].imshow(unnorm(img)[0].permute(1,2,0).cpu())
ax[0].set_title("Image")
ax[1].imshow(cluster_pred == MY_CLUSTER_CLASS)
ax[1].set_title("Cluster Predictions")
ax[2].imshow(linear_pred == MY_LINEAR_CLASS)
ax[2].set_title("Linear Probe Predictions")
remove_axes(ax)
Hi, After using provided google Colab demo, I just wanted to know if this could be possible to show only a desired cluster on the final resulted image?(Not all the detected ones.) I saw Issue 18 but did not understand how to this task. As an example this is an image I tried to segment:
As you can see there are almost 4 clusters on the image for each method. How could I only segment/plot the animal(s) cluster on the final image for each method?
Thanks