Aumkeshchy2003 commited on
Commit
7536404
·
verified ·
1 Parent(s): 9ac3666

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ session = onnxruntime.InferenceSession(str(model_path), providers=['CUDAExecutio
29
 
30
  # Generate random colors for each class
31
  np.random.seed(42)
32
- colors = np.random.uniform(0, 255, size=(80, 3)) # COCO dataset has 80 classes
33
 
34
  total_inference_time = 0
35
  inference_count = 0
@@ -43,7 +43,7 @@ def detect_objects(image):
43
  start_time = time.time()
44
 
45
  image = cv2.resize(image, (416, 416))
46
- image = image.astype(np.float32) / 255.0 e
47
  image = np.transpose(image, (2, 0, 1))
48
  image = np.expand_dims(image, axis=0)
49
 
 
29
 
30
  # Generate random colors for each class
31
  np.random.seed(42)
32
+ colors = np.random.uniform(0, 255, size=(80, 3))
33
 
34
  total_inference_time = 0
35
  inference_count = 0
 
43
  start_time = time.time()
44
 
45
  image = cv2.resize(image, (416, 416))
46
+ image = image.astype(np.float32) / 255.0
47
  image = np.transpose(image, (2, 0, 1))
48
  image = np.expand_dims(image, axis=0)
49