Skip to main content

YOLOv5 model conversion CLI

Project description

上传步骤

在你的项目根目录(pyproject.toml 所在目录)执行:

python -m build
  • 这个命令会生成一个 dist/ 文件夹。
  • 文件通常是:
    • yolo_convert-0.1.0-py3-none-any.whl
    • yolo_convert-0.1.0.tar.gz

再上传包:

twine upload dist/*

本地开发

pip uninstall yolo-convert      # 卸载 PyPI 版本,避免冲突
pip install -e .                # 安装本地 editable 版本
yolo_convert -i yolov5s.pt

安装测试

安装python环境

pip install yolo-convert

导出Yolov5模型,一个输出

默认分辨率640x640、opset版本12

yolo_convert -i yolov5.pt

修改分辨率为1024x1280(h,w),opset设置13

yolo_convert -i yolov5.pt --img 1024 1280 --opset 13

动态分辨率

yolo_convert -i yolov5.pt --dynamic 

导出Yolov5模型,三个输出

固定分辨率

yolo_convert -i yolov5.pt --hisi3559 --img 1024 1280

动态分辨率

yolo_convert -i yolov5.pt --hisi3559 --dynamic

Atlas

Atlas动态分辨率+后处理算子导出,--class-num指定类别个数,--biases默认不变,如果改变需要重新传anchor,第一个数为float型(带点,如10.0)

yolo_convert -i yolov5.pt --atlas --dynamic --class-num 3 --biases 10.0 13 16 30 33 23 30 61 62 45 59 119 116 90 156 198 373 326

如果训练后的anchor保持不变,可简化为:

yolo_convert -i yolov5.pt --atlas --dynamic --class-num 3

3403

3403后处理算子导出,只支持固定分辨率,加--dynaic会报错,只加入--img h w

yolo_convert -i yolov5.pt --hisi3403 --img 1024 1280

3519

3519后处理算子导出,同3403,只支持固定分辨率,加--dynaic会报错,只加入--img h w

yolo_convert -i yolov5.pt --hisi3519 --img 1024 1280

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yolo_convert-0.1.3.tar.gz (229.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yolo_convert-0.1.3-py3-none-any.whl (263.7 kB view details)

Uploaded Python 3

File details

Details for the file yolo_convert-0.1.3.tar.gz.

File metadata

  • Download URL: yolo_convert-0.1.3.tar.gz
  • Upload date:
  • Size: 229.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for yolo_convert-0.1.3.tar.gz
Algorithm Hash digest
SHA256 586cdc4c05e0255cd7412b9806a947bfef8a9b36ec7486cb81eca2503a6fb02a
MD5 b463132e9799e27081fc006f00c868d9
BLAKE2b-256 a9311c2503cd5b21b981c140fd721931009253529b777ecad53d71c6ed1bf820

See more details on using hashes here.

File details

Details for the file yolo_convert-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: yolo_convert-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 263.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for yolo_convert-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fe57c2cc4b49f310c294064041f445a02bdfc49168850adfb9b2cd2b0a642dc2
MD5 818131128a128d6688a7b304aa6fc282
BLAKE2b-256 934931e1cf4a49e6f34c4f2b74d12686fa5ac84feaa3fb1104e9ed8095aa4a58

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page