# EasYoloD
Easy Yolo Detect
用户快速部署yolo的识别程序,支持onnxruntime, opencv(dnn), openvino
仅需简短几行代码即可实现yolo目标检测
## Provider 介绍
1. onnxruntime:
+ cpu: 适配性最高的版本,不需要GPU即可执行
+ gpu: onnxruntime-gpu 需要英伟达GPU,并且安装对应版本cuda,cudnn之后才能使用,速度快
+ onnxdml: onnxruntime-directml 不需要使用特定GPU,核显也可以允许,而且不需要安装任何额外程序,速度一般,而且仅适用与windos系统
1. openvino:
+ cpu: 同onnx的cpu一样
+ gpu: 仅适用于intel的GPU,其他GPU不可用
1. opencv:
+ cpu: 同上
+ gpu: 需要单独编译带有cuda的opencv包,并正确配置路径,并且安装好cuda和cudnn,速度快
## 安装和使用
```bash
pip install EasYoloD
```
Requirements
+ Python 3.8-3.12
+ opencv-python <= 4.10.0.84
+ numpy <= 1.26
使用:
```python
import EasYoloD
EasYoloD.init(provider='onnxruntime',gpu=False) # onnxruntime-directml 则使用onnxdml,openvino使用 openvino
model = EasYoloD.Model()
# conf 置信度
# ious
# namse 可以是文件,也可以是一个list
model.load('modelpath', conf, ious, names)
# or 你使用的是opencv dnn yolov4的weight模型
# model.load('config path', 'weight path', inputsize, names, conf, nms)
result = model.detect(img=image)
# or 你希望自己处理输出
# result = model.detect_only(img=image)
```
输出示例:
detect:
```
{
1: [
{'confidence': 0.89, 'box': [(614, 202), (732, 242)], 'center': (673, 222)},
{'confidence': 0.87, 'box': [(975, 227), (1105, 268)], 'center': (1040, 247)},
{'confidence': 0.87, 'box': [(845, 241), (962, 284)], 'center': (903, 262)},
{'confidence': 0.86, 'box': [(418, 203), (495, 243)], 'center': (456, 223)},
{'confidence': 0.85, 'box': [(713, 233), (822, 273)], 'center': (767, 253)},
{'confidence': 0.83, 'box': [(776, 222), (888, 261)], 'center': (832, 241)}
],
2: [],
3: [
{'confidence': 0.8, 'box': [(664, 265), (687, 289)], 'center': (675, 277)}
],
4: [
{'confidence': 0.86, 'box': [(846, 195), (955, 236)], 'center': (900, 215)},
{'confidence': 0.84, 'box': [(1108, 227), (1208, 273)], 'center': (1158, 250)}
],
5: [],
6: [],
7: []
}
```
detect_only:
```
(array([[ 614.5011 , 202.27354, 732.4082 , 242.74388],
[ 975.4805 , 227.59409, 1105.0723 , 268.69995],
[ 845.77277, 241.3953 , 962.0877 , 284.1887 ],
[ 418.44012, 203.71834, 495.6739 , 243.37538],
[ 846.04956, 195.53143, 955.15515, 236.9972 ],
[ 713.3884 , 233.3027 , 822.95776, 273.27628],
[1108.0188 , 227.39557, 1208.6423 , 273.43536],
[ 776.30786, 222.16605, 888.85815, 261.70145],
[ 664.80615, 265.0358 , 687.7573 , 289.32138]], dtype=float32), array([0.88843024, 0.86892086, 0.8652373 , 0.8610253 , 0.858262 ,
0.84596515, 0.8361889 , 0.83084583, 0.8002863 ], dtype=float32), array([0, 0, 0, 0, 3, 0, 3, 0, 2], dtype=int64))
```
Raw data
{
"_id": null,
"home_page": "https://github.com/zaixia108/easyolo",
"name": "EasYoloD",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.8",
"maintainer_email": null,
"keywords": "yolo, object detection, computer vision",
"author": "zaixia108",
"author_email": "xvbowen2012@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/2f/6d/0ec146ac26e79c502f522c6cca17f9bd036d3a159529cedc38ee8a8941dd/easyolod-0.1.8.tar.gz",
"platform": null,
"description": "# EasYoloD\n\nEasy Yolo Detect\n\n\u7528\u6237\u5feb\u901f\u90e8\u7f72yolo\u7684\u8bc6\u522b\u7a0b\u5e8f\uff0c\u652f\u6301onnxruntime, opencv(dnn), openvino\n\n\u4ec5\u9700\u7b80\u77ed\u51e0\u884c\u4ee3\u7801\u5373\u53ef\u5b9e\u73b0yolo\u76ee\u6807\u68c0\u6d4b\n\n## Provider \u4ecb\u7ecd\n\n1. onnxruntime:\n + cpu: \u9002\u914d\u6027\u6700\u9ad8\u7684\u7248\u672c\uff0c\u4e0d\u9700\u8981GPU\u5373\u53ef\u6267\u884c\n + gpu: onnxruntime-gpu \u9700\u8981\u82f1\u4f1f\u8fbeGPU\uff0c\u5e76\u4e14\u5b89\u88c5\u5bf9\u5e94\u7248\u672ccuda\uff0ccudnn\u4e4b\u540e\u624d\u80fd\u4f7f\u7528\uff0c\u901f\u5ea6\u5feb\n + onnxdml: onnxruntime-directml \u4e0d\u9700\u8981\u4f7f\u7528\u7279\u5b9aGPU\uff0c\u6838\u663e\u4e5f\u53ef\u4ee5\u5141\u8bb8\uff0c\u800c\u4e14\u4e0d\u9700\u8981\u5b89\u88c5\u4efb\u4f55\u989d\u5916\u7a0b\u5e8f\uff0c\u901f\u5ea6\u4e00\u822c\uff0c\u800c\u4e14\u4ec5\u9002\u7528\u4e0ewindos\u7cfb\u7edf\n1. openvino: \n + cpu: \u540connx\u7684cpu\u4e00\u6837\n + gpu: \u4ec5\u9002\u7528\u4e8eintel\u7684GPU\uff0c\u5176\u4ed6GPU\u4e0d\u53ef\u7528\n1. opencv: \n + cpu: \u540c\u4e0a\n + gpu: \u9700\u8981\u5355\u72ec\u7f16\u8bd1\u5e26\u6709cuda\u7684opencv\u5305\uff0c\u5e76\u6b63\u786e\u914d\u7f6e\u8def\u5f84\uff0c\u5e76\u4e14\u5b89\u88c5\u597dcuda\u548ccudnn\uff0c\u901f\u5ea6\u5feb\n\n## \u5b89\u88c5\u548c\u4f7f\u7528\n\n```bash\npip install EasYoloD\n```\n\nRequirements\n+ Python 3.8-3.12\n+ opencv-python <= 4.10.0.84\n+ numpy <= 1.26\n\n\u4f7f\u7528: \n\n```python\nimport EasYoloD\n\nEasYoloD.init(provider='onnxruntime',gpu=False) # onnxruntime-directml \u5219\u4f7f\u7528onnxdml\uff0copenvino\u4f7f\u7528 openvino\nmodel = EasYoloD.Model()\n# conf \u7f6e\u4fe1\u5ea6\n# ious\n# namse \u53ef\u4ee5\u662f\u6587\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2alist\nmodel.load('modelpath', conf, ious, names)\n# or \u4f60\u4f7f\u7528\u7684\u662fopencv dnn yolov4\u7684weight\u6a21\u578b\n# model.load('config path', 'weight path', inputsize, names, conf, nms)\n\nresult = model.detect(img=image)\n# or \u4f60\u5e0c\u671b\u81ea\u5df1\u5904\u7406\u8f93\u51fa\n# result = model.detect_only(img=image)\n```\n\u8f93\u51fa\u793a\u4f8b:\n\ndetect:\n```\n{\n 1: [\n {'confidence': 0.89, 'box': [(614, 202), (732, 242)], 'center': (673, 222)}, \n {'confidence': 0.87, 'box': [(975, 227), (1105, 268)], 'center': (1040, 247)}, \n {'confidence': 0.87, 'box': [(845, 241), (962, 284)], 'center': (903, 262)}, \n {'confidence': 0.86, 'box': [(418, 203), (495, 243)], 'center': (456, 223)}, \n {'confidence': 0.85, 'box': [(713, 233), (822, 273)], 'center': (767, 253)}, \n {'confidence': 0.83, 'box': [(776, 222), (888, 261)], 'center': (832, 241)}\n ], \n 2: [], \n 3: [\n {'confidence': 0.8, 'box': [(664, 265), (687, 289)], 'center': (675, 277)}\n ], \n 4: [\n {'confidence': 0.86, 'box': [(846, 195), (955, 236)], 'center': (900, 215)}, \n {'confidence': 0.84, 'box': [(1108, 227), (1208, 273)], 'center': (1158, 250)}\n ], \n 5: [], \n 6: [], \n 7: []\n}\n```\ndetect_only:\n```\n(array([[ 614.5011 , 202.27354, 732.4082 , 242.74388],\n [ 975.4805 , 227.59409, 1105.0723 , 268.69995],\n [ 845.77277, 241.3953 , 962.0877 , 284.1887 ],\n [ 418.44012, 203.71834, 495.6739 , 243.37538],\n [ 846.04956, 195.53143, 955.15515, 236.9972 ],\n [ 713.3884 , 233.3027 , 822.95776, 273.27628],\n [1108.0188 , 227.39557, 1208.6423 , 273.43536],\n [ 776.30786, 222.16605, 888.85815, 261.70145],\n [ 664.80615, 265.0358 , 687.7573 , 289.32138]], dtype=float32), array([0.88843024, 0.86892086, 0.8652373 , 0.8610253 , 0.858262 ,\n 0.84596515, 0.8361889 , 0.83084583, 0.8002863 ], dtype=float32), array([0, 0, 0, 0, 3, 0, 3, 0, 2], dtype=int64))\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "easyolo python library",
"version": "0.1.8",
"project_urls": {
"Bug Tracker": "https://github.com/zaixia108/easyolo/issues",
"Documentation": "https://github.com/zaixia108/easyolo/wiki",
"Homepage": "https://github.com/zaixia108/easyolo",
"Source Code": "https://github.com/zaixia108/easyolo"
},
"split_keywords": [
"yolo",
" object detection",
" computer vision"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "94e130eadcc56cd3a244a4147edf302c5624a948097c7f2fbc971837480a6c33",
"md5": "b1a84febb26d75afc52d1b2ee06aff0b",
"sha256": "b05603c0e33125ada2ea5be268257216cf4fe2b9714557a13dc8092f1bf55265"
},
"downloads": -1,
"filename": "easyolod-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b1a84febb26d75afc52d1b2ee06aff0b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.8",
"size": 8651,
"upload_time": "2025-07-18T13:54:48",
"upload_time_iso_8601": "2025-07-18T13:54:48.536650Z",
"url": "https://files.pythonhosted.org/packages/94/e1/30eadcc56cd3a244a4147edf302c5624a948097c7f2fbc971837480a6c33/easyolod-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2f6d0ec146ac26e79c502f522c6cca17f9bd036d3a159529cedc38ee8a8941dd",
"md5": "32de8962964ab928a17aa4f2eb4e390f",
"sha256": "c8f1e72b2965158976e115188b375e3303600000ac294c2d92b9274b5f91597b"
},
"downloads": -1,
"filename": "easyolod-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "32de8962964ab928a17aa4f2eb4e390f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.8",
"size": 8526,
"upload_time": "2025-07-18T13:54:49",
"upload_time_iso_8601": "2025-07-18T13:54:49.606698Z",
"url": "https://files.pythonhosted.org/packages/2f/6d/0ec146ac26e79c502f522c6cca17f9bd036d3a159529cedc38ee8a8941dd/easyolod-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-18 13:54:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zaixia108",
"github_project": "easyolo",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "opencv-python",
"specs": [
[
"<=",
"4.10.0.84"
]
]
},
{
"name": "numpy",
"specs": [
[
"<=",
"1.26"
]
]
}
],
"lcname": "easyolod"
}