Introduction
YOLO helps computers find and recognize many objects in a picture quickly and all at once.
model = YOLO(input_image) predictions = model.detect_objects()
model = YOLOv3() predictions = model.detect(image)
model = YOLOv5() predictions = model.detect(image)
import torch from PIL import Image # Load a pre-trained YOLOv5s model from torch hub model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True) # Run detection on example image from URL results = model('https://ultralytics.com/images/zidane.jpg') # Print detected objects print(results.pandas().xyxy[0][['name', 'confidence']])
Pass the test and this pattern moves unknown