# ultralytics+
Extra features for [ultralytics/ultralytics](https://github.com/ultralytics/ultralytics).
## installation
```bash
pip install ultralyticsplus
```
## push to 🤗 hub
```bash
ultralyticsplus --exp_dir runs/detect/train --hf_model_id HF_USERNAME/MODELNAME
```
## load from 🤗 hub
```python
from ultralyticsplus import YOLO, render_result
# load model
model = YOLO('HF_USERNAME/MODELNAME')
# set model parameters
model.overrides['conf'] = 0.25 # NMS confidence threshold
model.overrides['iou'] = 0.45 # NMS IoU threshold
model.overrides['agnostic_nms'] = False # NMS class-agnostic
model.overrides['max_det'] = 1000 # maximum number of detections per image
# set image
image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
# perform inference
results = model.predict(image, imgsz=640)
# parse results
result = results[0]
boxes = result.boxes.xyxy # x1, y1, x2, y2
scores = result.boxes.conf
categories = result.boxes.cls
scores = result.probs # for classification models
masks = result.masks # for segmentation models
# show results on image
render = render_result(model=model, image=image, result=result)
render.show()
```
Raw data
{
"_id": null,
"home_page": "",
"name": "ultralyticsplus",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "machine-learning,deep-learning,ml,vision,yolov8,object-detection,huggingface,datasets",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/3f/bb/87c1c17ddc930fe1adbea4720b197e5230ce38d0d3f3bf6d0ce6f9e70ad7/ultralyticsplus-0.1.0.tar.gz",
"platform": null,
"description": "# ultralytics+\n\nExtra features for [ultralytics/ultralytics](https://github.com/ultralytics/ultralytics).\n\n## installation\n\n```bash\npip install ultralyticsplus\n```\n\n## push to \ud83e\udd17 hub\n\n```bash\nultralyticsplus --exp_dir runs/detect/train --hf_model_id HF_USERNAME/MODELNAME\n```\n\n## load from \ud83e\udd17 hub\n\n```python\nfrom ultralyticsplus import YOLO, render_result\n\n# load model\nmodel = YOLO('HF_USERNAME/MODELNAME')\n\n# set model parameters\nmodel.overrides['conf'] = 0.25 # NMS confidence threshold\nmodel.overrides['iou'] = 0.45 # NMS IoU threshold\nmodel.overrides['agnostic_nms'] = False # NMS class-agnostic\nmodel.overrides['max_det'] = 1000 # maximum number of detections per image\n\n# set image\nimage = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'\n\n# perform inference\nresults = model.predict(image, imgsz=640)\n\n# parse results\nresult = results[0]\nboxes = result.boxes.xyxy # x1, y1, x2, y2\nscores = result.boxes.conf\ncategories = result.boxes.cls\nscores = result.probs # for classification models\nmasks = result.masks # for segmentation models\n\n# show results on image\nrender = render_result(model=model, image=image, result=result)\nrender.show()\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "HuggingFace utilities for Ultralytics/YOLOv8.",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [
"machine-learning",
"deep-learning",
"ml",
"vision",
"yolov8",
"object-detection",
"huggingface",
"datasets"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "276cff87519141c81e7a4b47c0fa8831e5e4100cf4f3c2db940f159219e30e59",
"md5": "16709699367db82e953f329ba69a1605",
"sha256": "26275c16ba638d9fc5357b2dcf508e4477bd0031ed096d9892670717326e2f92"
},
"downloads": -1,
"filename": "ultralyticsplus-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "16709699367db82e953f329ba69a1605",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 23925,
"upload_time": "2024-02-03T20:02:12",
"upload_time_iso_8601": "2024-02-03T20:02:12.238174Z",
"url": "https://files.pythonhosted.org/packages/27/6c/ff87519141c81e7a4b47c0fa8831e5e4100cf4f3c2db940f159219e30e59/ultralyticsplus-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3fbb87c1c17ddc930fe1adbea4720b197e5230ce38d0d3f3bf6d0ce6f9e70ad7",
"md5": "5f049deb99b631a51e1377b4c4105da7",
"sha256": "c3e0fdff06bd331a92ccb774ee709da80d4f040caf7c1fa2b4d994918e9b0418"
},
"downloads": -1,
"filename": "ultralyticsplus-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "5f049deb99b631a51e1377b4c4105da7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 25449,
"upload_time": "2024-02-03T20:02:13",
"upload_time_iso_8601": "2024-02-03T20:02:13.564958Z",
"url": "https://files.pythonhosted.org/packages/3f/bb/87c1c17ddc930fe1adbea4720b197e5230ce38d0d3f3bf6d0ce6f9e70ad7/ultralyticsplus-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-03 20:02:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ultralyticsplus"
}