Hamza011 commited on
Commit
a6398cf
·
verified ·
1 Parent(s): 26a2955

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,8 +2,8 @@ import cv2
2
  import numpy as np
3
 
4
  # Load the SSD model and configuration
5
- model_path = 'saved_model.pb' # Path to the pre-trained SSD model
6
- config_path = 'pipeline.config' # Path to the deploy prototxt file
7
 
8
  # Load the class labels from the COCO dataset
9
  CLASSES = [
@@ -21,7 +21,7 @@ CLASSES = [
21
  ]
22
 
23
  # Initialize the OpenCV DNN network
24
- net = cv2.dnn.readNetFromTensorflow(config_path,model_path)
25
 
26
  # Function to process the video frame and detect objects
27
  def detect_objects_in_frame(frame):
 
2
  import numpy as np
3
 
4
  # Load the SSD model and configuration
5
+ model_path = 'MobileNetSSD_deploy.caffemodel' # Path to the pre-trained SSD model
6
+ config_path = 'MobileNetSSD_deploy.prototxt.txt' # Path to the deploy prototxt file
7
 
8
  # Load the class labels from the COCO dataset
9
  CLASSES = [
 
21
  ]
22
 
23
  # Initialize the OpenCV DNN network
24
+ net = cv2.dnn.readNetFromCaffe(config_path,model_path)
25
 
26
  # Function to process the video frame and detect objects
27
  def detect_objects_in_frame(frame):