使用yolov8的om模型进行推理,报错AttributeError: 'NoneType' object has no attribute 'infer'
收藏回复举报
使用yolov8的om模型进行推理,报错AttributeError: 'NoneType' object has no attribute 'infer'
t('forum.solved') 已解决
发表于2023-11-05 10:43:08
0 查看

这是我的调用代码

cke_662.png

结果报错(之前一次运行成功,现在运行报错)

Begin to initialize Log. 

WARNING: Logging before InitGoogleLogging() is written to STDERR 

I20231105 18:29:39.328505 45275 FileUtils.cpp:472] Check Owner permission: Current permission is 7, but required no greater than 6. 

I20231105 18:29:39.328567 45275 FileUtils.cpp:472] Check Owner group permission: Current permission is 5, but required no greater than 4. 

I20231105 18:29:39.328583 45275 FileUtils.cpp:472] Check Other group permission: Current permission is 5, but required no greater than 0. 

The output directory of logs file exist. 

I20231105 18:29:39.328838 45275 FileUtils.cpp:330] The input file is empty 

I20231105 18:29:39.328866 45275 FileUtils.cpp:472] Check Other group permission: Current permission is 4, but required no greater than 0. 

Save logs information to specified directory. 

E20231105 18:29:39.331200 45275 FileUtils.cpp:468] Check Owner permission failed: Current permission is 7, but required no greater than 6. 

E20231105 18:29:39.331817 45275 LogManager.hpp:136] Invalid logging.conf file! 

E20231105 18:29:39.331868 45275 GlobalInit.cpp:41] [100000][Parameter verification failed] Init log rotate thread failed. 

E20231105 18:29:39.335505 45275 FileUtils.cpp:423] realpath parsing failed. 

E20231105 18:29:39.335634 45275 MxModelDesc.cpp:123] Failed to get model, the model path is invalidate. 

E20231105 18:29:39.335911 45275 PyModel.cpp:31] Failed to create model_ object. 

None 

模型初始化成功 

Traceback (most recent call last): 

  File "/home/HwHiAiUser/samples/notebooks/homework01-yolov8n-pose/predict.py", line 301, in <module> 

    main() 

  File "/home/HwHiAiUser/samples/notebooks/homework01-yolov8n-pose/predict.py", line 194, in main 

    pred = model.infer([input_tensor])[0] 

AttributeError: 'NoneType' object has no attribute 'infer' 

本帖最后由 匿名用户2023/11/05 10:44:04 编辑

我要发帖子