pycocotools报错,NameError: name ‘unicode’ is not defined

        在深度学习训练过程中的评估阶段使用pycocotools时出现错误:

if type(resFile) == str or type(resFile) == unicode:

NameError: name ‘unicode’ is not defined

        据网上说应该是python2和3版本的问题,Python2 的unicode函数在 Python3 中不再使用。

        解决方法是重新安装pycocotools:

pip uninstall pycocotools
pip install pycocotools


————————————————
参考:https://blog.csdn.net/weixin_43788752/article/details/130087686

你可能感兴趣的:(Python,python,深度学习,开发语言)