RashiAgarwal
commited on
Commit
·
7b3d454
1
Parent(s):
5e987a7
Update display.py
Browse files- display.py +3 -1
display.py
CHANGED
@@ -6,9 +6,11 @@ import random
|
|
6 |
from albumentations.pytorch import ToTensorV2
|
7 |
from yolov3 import YOLOV3_PL
|
8 |
|
9 |
-
def inference(image: np.ndarray, iou_thresh: float = 0.
|
10 |
model = YOLOV3_PL()
|
11 |
model.load_state_dict(torch.load("model.pth", map_location=torch.device('cpu')), strict=False)
|
|
|
|
|
12 |
transforms = A.Compose(
|
13 |
[
|
14 |
A.LongestMaxSize(max_size=config.IMAGE_SIZE),
|
|
|
6 |
from albumentations.pytorch import ToTensorV2
|
7 |
from yolov3 import YOLOV3_PL
|
8 |
|
9 |
+
def inference(image: np.ndarray, iou_thresh: float = 0.75, thresh: float = 0.75, show_cam: bool = False, transparency: float = 0.5):
|
10 |
model = YOLOV3_PL()
|
11 |
model.load_state_dict(torch.load("model.pth", map_location=torch.device('cpu')), strict=False)
|
12 |
+
|
13 |
+
scaled_anchors = config.SCALED_ANCHORS
|
14 |
transforms = A.Compose(
|
15 |
[
|
16 |
A.LongestMaxSize(max_size=config.IMAGE_SIZE),
|