Skip to content

Commit 0eda94c

Browse files
authored
Update app.py
1 parent 7653f89 commit 0eda94c

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

app.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@
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
2010
def detect_objects(model, image):
2111
# Example options (adjust as needed)
@@ -40,10 +30,10 @@ def save_image(image, directory='captures'):
4030
# Main function
4131
def 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:

0 commit comments

Comments
 (0)