首页 / 浏览问题 / 桌面GIS / 问题详情
idesktopx 10i报错不能导入'ImageCompression'
2EXP 2020年10月27日

idesktopx 10i2020版,操作系统windows 10 专业版。试用机器学习时,安装指定的python环境后运行依然报错ImportError: cannot import name 'ImageCompression'。

conda版本:按官网路径下载的supermap-iobjectspy-env-gpu-10.0.1-20200102-win64下的conda环境;

python配置:按官网教程和帮助中的步骤配置的环境。

模型训练:采用官网提供的supermap-iobjectspy-resources_ml-10.0.0-20190926\resources_ml中的示例数据运行二分类训练,报错;

报错信息如下:

PyDev console: starting.

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] 
[iObjectsPy]: Connection gateway-service successful, Python callback port bind 52871

Traceback (most recent call last):
  File "<input>", line 9, in <module>
  File "E:\BaiduNetdiskDownload\supermap-idesktopx-10.1.0-0929-4835-82307-win64-bin-zip-chs\resources\python-helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "D:\BuildAgent\work\test/iobjectspy/ml\vision\__init__.py", line 1, in <module>
  File "E:\BaiduNetdiskDownload\supermap-idesktopx-10.1.0-0929-4835-82307-win64-bin-zip-chs\resources\python-helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "D:\BuildAgent\work\test/iobjectspy/ml\vision\_datapreparation.py", line 6, in <module>
  File "E:\BaiduNetdiskDownload\supermap-idesktopx-10.1.0-0929-4835-82307-win64-bin-zip-chs\resources\python-helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "D:\BuildAgent\work\test/iobjectspy/ml\vision\_dataprepare_collector\__init__.py", line 1, in <module>
  File "E:\BaiduNetdiskDownload\supermap-idesktopx-10.1.0-0929-4835-82307-win64-bin-zip-chs\resources\python-helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "D:\BuildAgent\work\test/iobjectspy/ml\vision\_dataprepare_collector\object_detection_training_data.py", line 1, in <module>
  File "E:\BaiduNetdiskDownload\supermap-idesktopx-10.1.0-0929-4835-82307-win64-bin-zip-chs\resources\python-helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "D:\BuildAgent\work\test/iobjectspy/ml\vision\_sample\create_object_detection_data_mask.py", line 16, in <module>
  File "E:\BaiduNetdiskDownload\supermap-idesktopx-10.1.0-0929-4835-82307-win64-bin-zip-chs\resources\python-helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "D:\BuildAgent\work\test/iobjectspy/ml\toolkit\_toolkit.py", line 24, in <module>
ImportError: cannot import name 'ImageCompression'
 

1个回答

从错误来看,无法导入ImageCompression模块,属于缺少库或版本不一致问题。从反馈信息来看,IDesktopx为10.1.0,env-gpu-10.0.1,resources_ml-10.0.0三者版本不完全相同,可能存在一些兼容性问题。建议采用咱们的最新版2020new 的10.1.0正式版。ai这块有很多改善,故需要各个产品间的版本一致。
1,565EXP 2020年10月29日

您好, 感谢回复!从您的回复看,我的桌面是已经是最新的idesktop 10.1.0,而深度学习环境是不对的,深度学习环境我是根据桌面软件帮助中提供的地址,在你们官网上下载的,地址如下:http://support.supermap.com.cn/DownloadCenter/DownloadPage.aspx?id=1232,

请问哪里能下载到最新版的AI环境和resources资源?

最新的桌面帮助中提供的机器学习环境下载地址

...