Package: ultralytics
中文|한국어|日本語|Русский|Deutsch|Français|Español|Português|हिन्दी|العربيةUltralyticsYOLOv8is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks.We hope that the resources here will help you get the most out of YOLOv8. Please browse the YOLOv8Docsfor details, raise an issue onGitHubfor support, and join ourDiscordcommunity for questions and discussions!To request an Enterprise License please complete the form atUltralytics Licensing.DocumentationSee below for a quickstart installation and usage example, and see theYOLOv8 Docsfor full documentation on training, validation, prediction and deployment.InstallPip install the ultralytics package including allrequirementsin aPython>=3.8environment withPyTorch>=1.8.pipinstallultralyticsFor alternative installation methods includingConda,Docker, and Git, please refer to theQuickstart Guide.UsageCLIYOLOv8 may be used directly in the Command Line Interface (CLI) with ayolocommand:yolopredictmodel=yolov8n.ptsource='https://ultralytics.com/images/bus.jpg'yolocan be used for a variety of tasks and modes and accepts additional arguments, i.e.imgsz=640. See the YOLOv8CLI Docsfor examples.PythonYOLOv8 may also be used directly in a Python environment, and accepts the sameargumentsas in the CLI example above:fromultralyticsimportYOLO# Load a modelmodel=YOLO("yolov8n.yaml")# build a new model from scratchmodel=YOLO("yolov8n.pt")# load a pretrained model (recommended for training)# Use the modelmodel.train(data="coco128.yaml",epochs=3)# train the modelmetrics=model.val()# evaluate model performance on the validation setresults=model("https://ultralytics.com/images/bus.jpg")# predict on an imagepath=model.export(format="onnx")# export the model to ONNX formatSee YOLOv8Python Docsfor more examples.NotebooksUltralytics provides interactive notebooks for YOLOv8, covering training, validation, tracking, and more. Each notebook is paired with aYouTubetutorial, making it easy to learn and implement advanced YOLOv8 features.DocsNotebookYouTubeYOLOv8 Train, Val, Predict and Export ModesUltralytics HUB QuickStartYOLOv8 Multi-Object Tracking in VideosYOLOv8 Object Counting in VideosYOLOv8 Heatmaps in VideosUltralytics Datasets Explorer with SQL and OpenAI Integration 🚀 NewModelsYOLOv8Detect,SegmentandPosemodels pretrained on theCOCOdataset are available here, as well as YOLOv8Classifymodels pretrained on theImageNetdataset.Trackmode is available for all Detect, Segment and Pose models.AllModelsdownload automatically from the latest Ultralyticsreleaseon first use.Detection (COCO)SeeDetection Docsfor usage examples with these models trained onCOCO, which include 80 pre-trained classes.Modelsize(pixels)mAPval50-95SpeedCPU ONNX(ms)SpeedA100 TensorRT(ms)params(M)FLOPs(B)YOLOv8n64037.380.40.993.28.7YOLOv8s64044.9128.41.2011.228.6YOLOv8m64050.2234.71.8325.978.9YOLOv8l64052.9375.22.3943.7165.2YOLOv8x64053.9479.13.5368.2257.8mAPvalvalues are for single-model single-scale onCOCO val2017dataset.Reproduce byyolo val detect data=coco.yaml device=0Speedaveraged over COCO val images using anAmazon EC2 P4dinstance.Reproduce byyolo val detect data=coco.yaml batch=1 device=0|cpuDetection (Open Image V7)SeeDetection Docsfor usage examples with these models trained onOpen Image V7, which include 600 pre-trained classes.Modelsize(pixels)mAPval50-95SpeedCPU ONNX(ms)SpeedA100 TensorRT(ms)params(M)FLOPs(B)YOLOv8n64018.4142.41.213.510.5YOLOv8s64027.7183.11.4011.429.7YOLOv8m64033.6408.52.2626.280.6YOLOv8l64034.9596.92.4344.1167.4YOLOv8x64036.3860.63.5668.7260.6mAPvalvalues are for single-model single-scale onOpen Image V7dataset.Reproduce byyolo val detect data=open-images-v7.yaml device=0Speedaveraged over Open Image V7 val images using anAmazon EC2 P4dinstance.Reproduce byyolo val detect data=open-images-v7.yaml batch=1 device=0|cpuSegmentation (COCO)SeeSegmentation Docsfor usage examples with these models trained onCOCO-Seg, which include 80 pre-trained classes.Modelsize(pixels)mAPbox50-95mAPmask50-95SpeedCPU ONNX(ms)SpeedA100 TensorRT(ms)params(M)FLOPs(B)YOLOv8n-seg64036.730.596.11.213.412.6YOLOv8s-seg64044.636.8155.71.4711.842.6YOLOv8m-seg64049.940.8317.02.1827.3110.2YOLOv8l-seg64052.342.6572.42.7946.0220.5YOLOv8x-seg64053.443.4712.14.0271.8344.1mAPvalvalues are for single-model single-scale onCOCO val2017dataset.Reproduce byyolo val segment data=coco-seg.yaml device=0Speedaveraged over COCO val images using anAmazon EC2 P4dinstance.Reproduce byyolo val segment data=coco-seg.yaml batch=1 device=0|cpuPose (COCO)SeePose Docsfor usage examples with these models trained onCOCO-Pose, which include 1 pre-trained class, person.Modelsize(pixels)mAPpose50-95mAPpose50SpeedCPU ONNX(ms)SpeedA100 TensorRT(ms)params(M)FLOPs(B)YOLOv8n-pose64050.480.1131.81.183.39.2YOLOv8s-pose64060.086.2233.21.4211.630.2YOLOv8m-pose64065.088.8456.32.0026.481.0YOLOv8l-pose64067.690.0784.52.5944.4168.6YOLOv8x-pose64069.290.21607.13.7369.4263.2YOLOv8x-pose-p6128071.691.24088.710.0499.11066.4mAPvalvalues are for single-model single-scale onCOCO Keypoints val2017dataset.Reproduce byyolo val pose data=coco-pose.yaml device=0Speedaveraged over COCO val images using anAmazon EC2 P4dinstance.Reproduce byyolo val pose data=coco-pose.yaml batch=1 device=0|cpuOBB (DOTAv1)SeeOBB Docsfor usage examples with these models trained onDOTAv1, which include 15 pre-trained classes.Modelsize(pixels)mAPtest50SpeedCPU ONNX(ms)SpeedA100 TensorRT(ms)params(M)FLOPs(B)YOLOv8n-obb102478.0204.773.573.123.3YOLOv8s-obb102479.5424.884.0711.476.3YOLOv8m-obb102480.5763.487.6126.4208.6YOLOv8l-obb102480.71278.4211.8344.5433.8YOLOv8x-obb102481.361759.1013.2369.5676.7mAPtestvalues are for single-model multi-scale onDOTAv1dataset.Reproduce byyolo val obb data=DOTAv1.yaml device=0 split=testand submit merged results toDOTA evaluation.Speedaveraged over DOTAv1 val images using anAmazon EC2 P4dinstance.Reproduce byyolo val obb data=DOTAv1.yaml batch=1 device=0|cpuClassification (ImageNet)SeeClassification Docsfor usage examples with these models trained onImageNet, which include 1000 pretrained classes.Modelsize(pixels)acctop1acctop5SpeedCPU ONNX(ms)SpeedA100 TensorRT(ms)params(M)FLOPs(B) at 640YOLOv8n-cls22469.088.312.90.312.74.3YOLOv8s-cls22473.891.723.40.356.413.5YOLOv8m-cls22476.893.585.40.6217.042.7YOLOv8l-cls22476.893.5163.00.8737.599.7YOLOv8x-cls22479.094.6232.01.0157.4154.8accvalues are model accuracies on theImageNetdataset validation set.Reproduce byyolo val classify data=path/to/ImageNet device=0Speedaveraged over ImageNet val images using anAmazon EC2 P4dinstance.Reproduce byyolo val classify data=path/to/ImageNet batch=1 device=0|cpuIntegrationsOur key integrations with leading AI platforms extend the functionality of Ultralytics' offerings, enhancing tasks like dataset labeling, training, visualization, and model management. Discover how Ultralytics, in collaboration withRoboflow, ClearML,Comet, Neural Magic andOpenVINO, can optimize your AI workflow.RoboflowClearML ⭐ NEWComet ⭐ NEWNeural Magic ⭐ NEWLabel and export your custom datasets directly to YOLOv8 for training withRoboflowAutomatically track, visualize and even remotely train YOLOv8 usingClearML(open-source!)Free forever,Cometlets you save YOLOv8 models, resume training, and interactively visualize and debug predictionsRun YOLOv8 inference up to 6x faster withNeural Magic DeepSparseUltralytics HUBExperience seamless AI withUltralytics HUB⭐, the all-in-one solution for data visualization, YOLOv5 and YOLOv8 🚀 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendlyUltralytics App. Start your journey forFreenow!ContributeWe love your input! YOLOv5 and YOLOv8 would not be possible without help from our community. Please see ourContributing Guideto get started, and fill out ourSurveyto send us feedback on your experience. Thank you 🙏 to all our contributors!LicenseUltralytics offers two licensing options to accommodate diverse use cases:AGPL-3.0 License: ThisOSI-approvedopen-source license is ideal for students and enthusiasts, promoting open collaboration and knowledge sharing. See theLICENSEfile for more details.Enterprise License: Designed for commercial use, this license permits seamless integration of Ultralytics software and AI models into commercial goods and services, bypassing the open-source requirements of AGPL-3.0. If your scenario involves embedding our solutions into a commercial offering, reach out throughUltralytics Licensing.ContactFor Ultralytics bug reports and feature requests please visitGitHub Issues, and join ourDiscordcommunity for questions and discussions!