pyinstaller 打包openvino2022.1
·
最近也是在使用openvino 2022.1,其最大的优点就是即插即用,在打包的时候遇到的最大的问题就是:
Please check that model format :xml is supported and the model is correct .Available frontends:xml
解决方法如下:
在安装的目录下找到如下两个文件:
1.openvino_ir_frontend.dll
2.openvino_intel_cpu_plugin.dll
将该文件的路径保存下来,在pyinstaller打包时使用–add-data
或者在spec文件中的data字段中加入
我的使用的spec文件如下:
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['predict.py'],
pathex=[],
binaries=[],
datas=[('C:\\Users\\1\\Desktop\\yolov5-master\\dist\\add\\*', '.')],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='predict',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='predict')
我选择的是第二种方法:
使用的打包命令如下:
pyinstaller -D --onedir --clean …py
更多推荐
所有评论(0)