Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test issue 1 #1

Open
AyushExel opened this issue Jun 5, 2023 · 1 comment
Open

test issue 1 #1

AyushExel opened this issue Jun 5, 2023 · 1 comment

Comments

@AyushExel
Copy link
Owner

I'm trying Yolov8 with screen capture but it doesn't seem to work. I'm using the win32gui.GetDesktopWindow() to get the screenshot

Here my code

   self.model = YOLO('yolov8n.pt')
    frame = wincap.getScreenshot(detection_box)
    results = self.model(frame)
    print(results)

Here is what the output looks like.

[Ultralytics YOLO <class 'ultralytics.yolo.engine.results.Results'> instance
Ultralytics YOLO <class 'ultralytics.yolo.engine.results.Boxes'> masks
type: <class 'torch.Tensor'>
shape: torch.Size([0, 6])
dtype: torch.float32
original size: (270, 480)
]
When I try

print(results.boxes) or print(results.masks)
I get this error

AttributeError: 'list' object has no attribute 'boxes'

@AyushExel
Copy link
Owner Author

Results is a list with one object per frame.
Do results [0].boxes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant