https://github.com/derronqi/yolov8-face
解决办法:
1. 导出前
1 报错内容
- (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, tuple of ints padding, tuple of ints dilation, int groups)
didn't match because some of the arguments have invalid types: (Tensor, Parameter, NoneType, tuple, tuple, tuple, int)
解决办法:
pip install torch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 -i https://pypi.doubanio.com/simple
解决办法来自于:https://github.com/we0091234/yolov8-plate/issues/2
2. 指定版本
pip install ultralytics==8.0.134 -i https://pypi.tuna.tsinghua.edu.cn/simple
版本来自于 :xxx/yolov8-face/ultralytics/__init__.py
3. 报错内容: AttributeError: Can't get attribute 'StemBlock' on <module 'ultralytics.nn.modules.......
copy :
xxx\yolov8-face\ultralytics\nn\modules\block.py
xxx\yolov8-face\ultralytics\nn\modules\__init__.py
to :
xxx\anaconda\envs\yolov8\Lib\site-packages\ultralytics\nn\modules\block.py
xxx\anaconda\envs\yolov8\Lib\site-packages\ultralytics\nn\modules\__init__.py