RashiAgarwal
commited on
Commit
•
18ff9ad
1
Parent(s):
917ece0
Update display.py
Browse files- display.py +5 -1
display.py
CHANGED
@@ -15,7 +15,11 @@ def inference(image: np.ndarray, iou_thresh: float = 0.5, thresh: float = 0.5,sh
|
|
15 |
# iou_thresh = 0.75
|
16 |
# thresh = 0.75
|
17 |
scaled_anchors = config.SCALED_ANCHORS
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
transforms = A.Compose(
|
20 |
[
|
21 |
A.LongestMaxSize(max_size=config.IMAGE_SIZE),
|
|
|
15 |
# iou_thresh = 0.75
|
16 |
# thresh = 0.75
|
17 |
scaled_anchors = config.SCALED_ANCHORS
|
18 |
+
|
19 |
+
backbone = model
|
20 |
+
target_layer_list = list(backbone.children())[-2:]
|
21 |
+
|
22 |
+
cam = YoloCAM(model=model, target_layers = target_layer_list, use_cuda=False)
|
23 |
transforms = A.Compose(
|
24 |
[
|
25 |
A.LongestMaxSize(max_size=config.IMAGE_SIZE),
|