Failed to run Python script with Conda

六月ゝ 毕业季﹏ 提交于 2019-12-05 12:40:07

It seems that visualize_images is meant to be used from ipython-notebook. Calling it in a regular python script does not seem to be intended by the authors.

See also the example in the Visualizing Objects section of the docs:

%matplotlib inline
import menpo.io as mio
from menpo.visualize import visualize_images

# import_images is a generator, so we must exhaust the generator before
# we can visualize the list. This is because the widget allows you to
# jump arbitrarily around the list, which cannot be done with generators.
images = list(mio.import_images('./path/to/images/*.jpg'))
visualize_images(images)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!