79492290

Date: 2025-03-07 12:18:59
Score: 1.5
Natty:
Report link

from ultralytics import YOLO
import pyautogui
import cv2,time
import numpy as np
time.sleep(5)

# Load the model
model = YOLO('yolo11n.pt', task='detect')

# Set the confidence threshold
conf_threshold = 0.4

# Capture the entire screen
screen_image = pyautogui.screenshot()
screen_image = cv2.cvtColor(np.array(screen_image), cv2.COLOR_BGR2RGB)

# Perform object detection on the captured screen image
results = model(screen_image, show=True)
time.sleep(3)

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: zoldaten