当前位置:网站首页>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
边栏推荐
- 测试--面试题总结
- Blender多鏡頭(多機比特)切換
- Notes de base sur les plans illusoires d'IA (triés en 10 000 mots)
- Brief analysis of edgedb architecture
- Career planning and development
- [200 Shengxin literatures] 95 multiomics exploration TNBC
- Project practice, redis cluster technology learning (11)
- Introduction and Principle notes of UE4 material
- Remember a simple Oracle offline data migration to tidb process
- 【Unity3D】制作进度条——让Image同时具有Filled和Sliced的功能
猜你喜欢

2837xd code generation module learning (3) -- IIC, ECAN, SCI, watchdog, ECAP modules

Blender多镜头(多机位)切换

Pytest-- test report allure configuration

2021-10-04

Configuration programmée du générateur de plantes du moteur illusoire UE - - Comment générer rapidement une grande forêt

Feature (5): how to organize information

Determine whether there are duplicate elements in the array

Mock Server基本使用方法

Understand the composition of building energy-saving system

Commutateur Multi - lentilles Blender
随机推荐
[IDL] Research
2837xd code generation module learning (1) -- GPIO module
Operator exercises
This monitoring system makes workers tremble: turnover intention and fishing can be monitored. After the dispute, the product page has 404
Configuration programmée du générateur de plantes du moteur illusoire UE - - Comment générer rapidement une grande forêt
Blender camera surround motion, animation rendering, video synthesis
Vscode set JSON file to format automatically after saving
【避坑指南】使用UGUI遇到的坑:Text组件无法首行缩进两格
Delivery mode design of Spartacus UI of SAP e-commerce cloud
This article takes you to learn in detail what is fiber to home FTTH
flink 提交程序
Eslint reports an error
[Fantasy 4] the transformation from U3D to UE4
2021-10-02
ue虚幻引擎程序化植物生成器设置——如何快速生成大片森林
【虚幻】武器插槽:拾取武器
Sum the two numbers to find the target value
2021-09-12
Spatial interpretation | comprehensive analysis of spatial structure of primary liver cancer
How to judge the quality of primary market projects when the market is depressed?