PrarthanaTS commited on
Commit
8f537bc
·
1 Parent(s): ca858e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -80,7 +80,7 @@ def process_image_and_plot(image,iou_threshold=0.5, threshold=0.4):
80
  bboxes[0], iou_threshold=iou_threshold, threshold=threshold, box_format="midpoint",
81
  )
82
  fig = plot_image(transformed_image[0].permute(1, 2, 0), nms_boxes)
83
- cam = YoloCAM(model=model, target_layers=model.model.layers[-2], use_cuda=False)
84
 
85
  grayscale_cam = cam(transformed_image, scaled_anchors)[0, :, :]
86
  img = cv2.resize(image, (416, 416))
 
80
  bboxes[0], iou_threshold=iou_threshold, threshold=threshold, box_format="midpoint",
81
  )
82
  fig = plot_image(transformed_image[0].permute(1, 2, 0), nms_boxes)
83
+ cam = YoloCAM(model=model, target_layers=[model.model.layers[-2]], use_cuda=False)
84
 
85
  grayscale_cam = cam(transformed_image, scaled_anchors)[0, :, :]
86
  img = cv2.resize(image, (416, 416))