Package: ultralytics-custom
English|简体中文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.7environment withPyTorch>=1.7.pipinstallultralyticsUsageCLIYOLOv8 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 formatModelsdownload automatically from the latest Ultralyticsrelease. See YOLOv8Python Docsfor more examples.ModelsAll YOLOv8 pretrained models are available here. Detect, Segment and Pose models are pretrained on theCOCOdataset, while Classify models are pretrained on theImageNetdataset.Modelsdownload automatically from the latest Ultralyticsreleaseon first use.DetectionSeeDetection Docsfor usage examples with these models.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=coco128.yaml batch=1 device=0|cpuSegmentationSeeSegmentation Docsfor usage examples with these models.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.yaml device=0Speedaveraged over COCO val images using anAmazon EC2 P4dinstance.Reproduce byyolo val segment data=coco128-seg.yaml batch=1 device=0|cpuClassificationSeeClassification Docsfor usage examples with these models.Modelsize(pixels)acctop1acctop5SpeedCPU ONNX(ms)SpeedA100 TensorRT(ms)params(M)FLOPs(B) at 640YOLOv8n-cls22466.687.012.90.312.74.3YOLOv8s-cls22472.391.123.40.356.413.5YOLOv8m-cls22476.493.285.40.6217.042.7YOLOv8l-cls22478.094.1163.00.8737.599.7YOLOv8x-cls22478.494.3232.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|cpuPoseSeePose Docsfor usage examples with these models.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=coco8-pose.yaml batch=1 device=0|cpuIntegrationsRoboflowClearML ⭐ 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!LicenseYOLOv8 is available under two different licenses:AGPL-3.0 License: SeeLICENSEfile for details.Enterprise License: Provides greater flexibility for commercial product development without the open-source requirements of AGPL-3.0. Typical use cases are embedding Ultralytics software and AI models in commercial products and applications. Request an Enterprise License atUltralytics Licensing.ContactFor YOLOv8 bug reports and feature requests please visitGitHub Issues, and join ourDiscordcommunity for questions and discussions!