manikandan18ramalingam commited on
Commit
3f9bd64
·
verified ·
1 Parent(s): 6228fcf

Update object_detection.py

Browse files
Files changed (1) hide show
  1. object_detection.py +1 -1
object_detection.py CHANGED
@@ -43,7 +43,7 @@ def detectObjects(imageFile, confidence_score):
43
  if not matches:
44
  raise FileNotFoundError(f"No output image found for {stem} in {pred_dir}")
45
  # Load and display the image
46
- img = mpimg.imread(image_path)
47
  return img
48
  #plt.figure(figsize=(8, 8))
49
  #plt.imshow(img)
 
43
  if not matches:
44
  raise FileNotFoundError(f"No output image found for {stem} in {pred_dir}")
45
  # Load and display the image
46
+ img = mpimg.imread(str(matches[0]))
47
  return img
48
  #plt.figure(figsize=(8, 8))
49
  #plt.imshow(img)