Cats are infested #7210
Replies: 1 comment
-
@M1ngM1ngQQY to achieve this, you can use the YOLOv8 model in predict mode to detect objects in the video stream from your camera. Once the model identifies a cat, you can send a signal to your UI to display the "cat infested" message. Here's a simplified example of how you might set this up in Python: from ultralytics import YOLO
# Load your trained model
model = YOLO('path/to/your/model.pt')
# Predict in real-time from your camera (assuming camera index is 0)
results = model.predict(source=0, stream=True)
for result in results:
# Check if 'cat' is detected in the prediction
for label, confidence, bbox in zip(result.labels, result.confidences, result.boxes):
if label == 'cat':
# Code to update your UI with "cat infested"
update_ui_with_cat_alert()
break # Stop after the first cat is found In this example, Remember to replace |
Beta Was this translation helpful? Give feedback.
-
I would like to ask, let's say my model can recognize these three categories (people, cats, dogs), I use a camera to monitor at my door, I detect a cat appearing, how do I get this information. I want to make a cat that appears, and then my UI pops up with "cat infested", how should I do it?
Beta Was this translation helpful? Give feedback.
All reactions