visuals.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:VariationalAutoEncoder 作者: despoisj 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号