BhumikaMak commited on
Commit
01ceba0
·
1 Parent(s): 175164a

Update: display return

Browse files
Files changed (1) hide show
  1. yolov8.py +1 -1
yolov8.py CHANGED
@@ -63,6 +63,6 @@ def xai_yolov8s(image):
63
  tensor = transform(img_float).unsqueeze(0)
64
  target_layers = [model.model.model[-2]] # Adjust to YOLOv8 architecture
65
  cam_image, renormalized_cam_image = generate_cam_image(model.model, target_layers, tensor, image, boxes)
66
- final_image = np.hstack((image, cam_image, renormalized_cam_image))
67
  caption = "Results using YOLOv8"
68
  return Image.fromarray(final_image), caption
 
63
  tensor = transform(img_float).unsqueeze(0)
64
  target_layers = [model.model.model[-2]] # Adjust to YOLOv8 architecture
65
  cam_image, renormalized_cam_image = generate_cam_image(model.model, target_layers, tensor, image, boxes)
66
+ final_image = np.hstack((image, detections_img, renormalized_cam_image))
67
  caption = "Results using YOLOv8"
68
  return Image.fromarray(final_image), caption