当前位置:网站首页>AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘
AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘
2022-07-02 06:36:00 【AI浩】
错误描述:
Traceback (most recent call last):
File "D:\OCR\DBNet.pytorch-master\tools\predict.py", line 195, in <module>
img = rec_image(img, boxes_max,model_cls)
File "D:\OCR\DBNet.pytorch-master\tools\predict.py", line 160, in rec_image
img = transform_test(Image.fromarray(dst_img))
AttributeError: type object 'Image' has no attribute 'fromarray'
错误的原因:
导入Image的方法错误!
错误导入: from PIL.Image import Image
正确导入: from PIL import Image
边栏推荐
- [200 Shengxin literatures] 95 multiomics exploration TNBC
- 2021-09-12
- Vscode auto format
- 【虚幻4】UMG组件的简介与使用(更新中...)
- Blender多鏡頭(多機比特)切換
- allure--常用配置项
- Project practice, redis cluster technology learning (12)
- UE illusory engine programmed plant generator setup -- how to quickly generate large forests
- Blender模型导入ue、碰撞设置
- 2021-10-02
猜你喜欢
测试--面试题总结
[ue5] blueprint making simple mine tutorial
Webui automated learning
Matlab generates DSP program -- official routine learning (6)
[visual studio] every time you open a script of unity3d, a new vs2017 will be automatically reopened
Pytest-- test report allure configuration
Postman -- use
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
虛幻AI藍圖基礎筆記(萬字整理)
What is the relationship between realizing page watermarking and mutationobserver?
随机推荐
pytest--之测试报告allure配置
Network real-time video streaming based on OpenCV
传输优化抽象
[MySQL] an exception occurs when connecting to MySQL: connection must be valid and open
Post disaster reconstruction -- Floyd thought
Operator exercises
[ue5] blueprint making simple mine tutorial
Ue5 - AI pursuit (blueprint, behavior tree)
Project practice, redis cluster technology learning (16)
Blender ocean production
[jetbrain rider] an exception occurred in the construction project: the imported project "d:\visualstudio2017\ide\msbuild\15.0\bin\roslyn\microsoft.csh" was not found
Deep understanding of redis cache avalanche / cache breakdown / cache penetration
Ue5 - ai Pursuit (Blueprint, Behavior tree)
MySQL -- time zone / connector / driver type
【Lua】常见知识点汇总(包含常见面试考点)
[illusory] weapon slot: pick up weapons
sqoop创建job出现的一系列问题解决方法
Blender多镜头(多机位)切换
Understand the composition of building energy-saving system
ue虛幻引擎程序化植物生成器設置——如何快速生成大片森林