datawhalechina / thorough-pytorch

PyTorch入门教程,在线阅读地址:https://datawhalechina.github.io/thorough-pytorch/
https://datawhalechina.github.io/thorough-pytorch/
Other
2.55k stars 417 forks source link

Issue on page /第六章/6.5 数据增强-imgaug.html #87

Open sanbuphy opened 10 months ago

sanbuphy commented 10 months ago

imgaug 年久失修,若imshow需要修改源码:

python3.10/site-packages/imgaug/imgaug.py

        fig, ax = plt.subplots(figsize=(w, h), dpi=dpi)
        fig.canvas.set_window_title("imgaug.imshow(%s)" % (image.shape,))
        # cmap=gray is automatically only activate for grayscale images
        ax.imshow(image, cmap="gray")

其中需要把 fig.canvas.set_window_title 修改为 fig.canvas.manager.set_window_title