rockchip-linux / rknn-toolkit

BSD 3-Clause "New" or "Revised" License
830 stars 175 forks source link

from acuitylib.optimize.optimizer import Optimizer #438

Open 666echo opened 9 months ago

666echo commented 9 months ago

我再使用https://github.com/rockchip-linux/rknn-toolkit/releases项目进行rv1126的pt模型转rknn模型的时候。运行指令

python ../../../../../common/rknn_converter/rknn_convert.py --yml_path ./yolov5_6_7_backup.yml --python_api_test --capi_test

我已经使用了1.7.5 1.7.3 1.7.1 1.6都是会报错

报错如下 W rknn-toolkit version: 1.7.5 W Verbose file path is invalid, debug info will not dump to file. ---> Seting RKNN config ---> Loading onnx model Traceback (most recent call last): File "../../../../../common/rknn_converter/rknn_convert.py", line 99, in convert(config_dict, args) File "../../../../../common/rknn_converter/rknn_convert.py", line 19, in convert rknn = cp.convert() File "/home/echo/rknn/rknn_model_zoo-1.5.0/common/rknn_converter/phase.py", line 124, in convert load_function(**model_config_dict['load']) File "/home/echo/anaconda3/envs/rknn_1.7/lib/python3.8/site-packages/rknn/api/rknn.py", line 160, in load_onnx ret = self.rknn_base.load_onnx(model, inputs, input_size_list, outputs) File "rknn/api/rknn_base.py", line 308, in rknn.api.rknn_base.RKNNBase.load_onnx File "/home/echo/anaconda3/envs/rknn_1.7/lib/python3.8/site-packages/rknn/base/acuitylib/init.py", line 1, in from acuitylib.optimize.optimizer import Optimizer File "rknn/base/acuitylib/optimize/optimizer.py", line 9, in init rknn.base.acuitylib.optimize.optimizer File "/home/echo/anaconda3/envs/rknn_1.7/lib/python3.8/site-packages/rknn/base/acuitylib/init.py", line 1, in from acuitylib.optimize.optimizer import Optimizer ImportError: cannot import name 'Optimizer' from partially initialized module 'acuitylib.optimize.optimizer' (most likely due to a circular import) (/home/echo/anaconda3/envs/rknn_1.7/lib/python3.8/site-packages/rknn/base/acuitylib/optimize/optimizer.cpython-38-x86_64-linux-gnu.so) (rknn_1.7) echo@echo-desktop:~/rknn/rknn_model_zoo-1.5.0/models/CV/object_detection/yolo/RKNN_model_convert$

kaisawind commented 8 months ago
pip install tensorflow==2.2.0
eRaul commented 8 months ago

使用pip list > installed_libraries.txt看下你装的依赖库版本信息,可能是依赖库版本不对导致的问题。