当前位置:网站首页>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
边栏推荐
- 【避坑指南】Unity3D项目接入腾讯Bugly工具时遇到的坑
- [unity3d] production progress bar - make image have the functions of filled and sliced at the same time
- What wires are suitable for wiring on bread board?
- Sil/pil test of matlab code generation
- Ctrip starts mixed office. How can small and medium-sized enterprises achieve mixed office?
- Large neural networks may be beginning to realize: the chief scientist of openai leads to controversy, and everyone quarrels
- Postman--使用
- Following nym, the new project Galaxy token announced by coinlist is gal
- 【MySQL】连接MySQL时出现异常:Connection must be valid and open
- Project practice, redis cluster technology learning (6)
猜你喜欢

2837xd code generation module learning (2) -- ADC, epwm module, timer0

Blender model import UE, collision settings

This monitoring system makes workers tremble: turnover intention and fishing can be monitored. After the dispute, the product page has 404

MPLS experiment

Blender体积雾

Blender stone carving

UE4 night lighting notes
![[illusory] automatic door blueprint notes](/img/7a/14a66e5b623c7740dc91a15a328b10.png)
[illusory] automatic door blueprint notes
![[unreal] key to open the door blueprint notes](/img/28/f2b00d84dc05183ce93e2a8ee3555f.png)
[unreal] key to open the door blueprint notes

Aiphacode is not a substitute for programmers, but a tool for developers
随机推荐
07数据导入Sqoop
Matlab generates DSP program -- official routine learning (6)
判断数组中是否存在重复元素
Pytest-- test report allure configuration
Network communication learning
Zlib download and use
Pytest learning --base
2021-09-12
Edge computing accelerates live video scenes: clearer, smoother, and more real-time
Eslint reports an error
Project practice, redis cluster technology learning (10)
Determine whether there are duplicate elements in the array
webUI自动化学习
How to judge the quality of primary market projects when the market is depressed?
Blender volume fog
Blender体积雾
AutoCAD - layer Linetype
What is the relationship between realizing page watermarking and mutationobserver?
Junit5 supports suite methods
Webui automated learning