def imscatter(x, y, ax, imageData, zoom=1):
images = []
for i in range(len(x)):
x0, y0 = x[i], y[i]
# Convert to image
img = imageData[i]*255.
img = img.astype(np.uint8)
# OpenCV uses BGR and plt uses RGB
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
image = OffsetImage(img, zoom=zoom)
ab = AnnotationBbox(image, (x0, y0), xycoords='data', frameon=False)
images.append(ax.add_artist(ab))
ax.update_datalim(np.column_stack([x, y]))
ax.autoscale()
# Show dataset images with T-sne projection of latent space encoding
评论列表
文章目录