File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 66
77# Created by Coder Shiyar | https://github.com/codershiyar | https://codershiyar.com
88
9- # Function to initialize webcam
10- def initialize_webcam ():
11- return cv2 .VideoCapture (0 )
12-
13-
14- # Load YOLOv8 model with options
15- def load_model ():
16- return YOLO ('model_buckets_with_handlesv14n.pt' )
17-
18-
199# Function to detect objects using YOLOv8
2010def detect_objects (model , image ):
2111 # Example options (adjust as needed)
@@ -40,10 +30,10 @@ def save_image(image, directory='captures'):
4030# Main function
4131def main ():
4232 # Load YOLOv8 model
43- yolo_model = load_model ( )
33+ yolo_model = return YOLO ( 'selectyourmodelhere.pt' )
4434
4535 # Initialize webcam
46- webcam = initialize_webcam ( )
36+ webcam = cv2 . VideoCapture ( 0 )
4737
4838 # Main loop
4939 while True :
You can’t perform that action at this time.
0 commit comments