Package: imagedetect
English|简体中文Ultralytics YOLOv8, developed byUltralytics,
is 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, image segmentation and image
classification tasks.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
allrequirements.txtin 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 imagesuccess=model.export(format="onnx")# export the model to ONNX formatModelsdownload automatically from the latest
Ultralyticsrelease. See
YOLOv8Python Docsfor more examples.Model Architectures⭐NEWYOLOv5u anchor free models are now available.All supported model architectures can be found in theModelssection.Known Issues / TODOsWe are still working on several parts of YOLOv8! We aim to have these completed soon to bring the YOLOv8 feature set up
to par with YOLOv5, including export and inference to all the same formats. We are also writing a YOLOv8 paper which we
will submit toarxiv.orgonce complete.TensorFlow exportsDDP resumearxiv.orgpaperModelsAll YOLOv8 pretrained models are available here. Detection and Segmentation models are pretrained on the COCO dataset,
while Classification models are pretrained on the ImageNet dataset.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/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 (coming soon) 🚀 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:GPL-3.0 License: SeeLICENSEfile for details.Enterprise License: Provides greater flexibility for commercial product development without the open-source
requirements of GPL-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 Issuesor
theUltralytics Community Forum.