UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figur
生活随笔
收集整理的這篇文章主要介紹了
UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figur
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
“UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure”在利用mask_rcnn進行物體檢測的時候出現的問題,主要是因為matplotlib的使用格式不對
?
可以檢查者兩個地方:
1、visualize.py中
import matplotlib.pyplot as plt改為:
import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt2、pycocotools.coco.py中
import matplotlib; matplotlib.use('Agg') import matplotlib.pyplot as plt改為:
import matplotlib; matplotlib.use('TkAgg') import matplotlib.pyplot as plt一般第二種方法就已經解決了
總結
以上是生活随笔為你收集整理的UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figur的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CSS 组合选择符
- 下一篇: spring初始化bean时执行某些方法