The table also indicates whether each source can be used in streaming mode with the argument stream=True ✅. The sources include static images, video streams, and various data formats. YOLOv8 can process different types of input sources for inference, as shown in the table below. save ( filename = 'result.jpg' ) # save to disk Inference Sources probs # Probs object for classification outputs result. keypoints # Keypoints object for pose outputs probs = result. masks # Masks object for segmentation masks outputs keypoints = result. boxes # Boxes object for bounding box outputs masks = result. Ultralytics YOLO models return either a Python list of Results objects, or a memory-efficient Python generator of Results objects when stream=True is passed to the model during inference:įrom ultralytics import YOLO # Load a model model = YOLO ( 'yolov8n.pt' ) # pretrained YOLOv8n model # Run batched inference on a list of images results = model (, stream = True ) # return a generator of Results objects # Process results generator for result in results : boxes = result. Integration Friendly: Easily integrate with existing data pipelines and other software components, thanks to its flexible API.Batch Processing: The ability to process multiple images or video frames in a single batch, further speeding up inference time.Enable this by setting stream=True in the predictor's call method. Streaming Mode: Use the streaming feature to generate a memory-efficient generator of Results objects.Multiple Data Source Compatibility: Whether your data is in the form of individual images, a collection of images, video files, or real-time video streams, predict mode has you covered.YOLOv8's predict mode is designed to be robust and versatile, featuring: Highly Customizable: Various settings and parameters to tune the model's inference behavior according to your specific requirements.Ease of Use: Intuitive Python and CLI interfaces for rapid deployment and testing.Performance: Engineered for real-time, high-speed processing without sacrificing accuracy.Versatility: Capable of making inferences on images, videos, and even live streams.Here's why you should consider YOLOv8's predict mode for your various inference needs: Watch: How to Extract the Outputs from Ultralytics YOLOv8 Model for Custom Projects. Ultralytics YOLOv8 offers a powerful feature known as predict mode that is tailored for high-performance, real-time inference on a wide range of data sources. In the world of machine learning and computer vision, the process of making sense out of visual data is called 'inference' or 'prediction'.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |