Update stamp_processing/detector.py
Browse files
stamp_processing/detector.py
CHANGED
@@ -30,13 +30,13 @@ class StampDetector:
|
|
30 |
print(checkpoint)
|
31 |
|
32 |
self.device = device
|
33 |
-
self.model, self.stride = load_yolo_model(checkpoint, device=
|
34 |
|
35 |
self.img_size = 640
|
36 |
self.conf_thres = conf_thres
|
37 |
self.iou_thres = iou_thres
|
38 |
|
39 |
-
self.process_func_ = partial(process_image, device=
|
40 |
|
41 |
def __call__(self, image_list: Union[List[npt.NDArray], npt.NDArray]) -> List[npt.NDArray]:
|
42 |
"""Returns a list of bounding boxes [xmin, ymin, xmax, ymax] for each image in image_list
|
|
|
30 |
print(checkpoint)
|
31 |
|
32 |
self.device = device
|
33 |
+
self.model, self.stride = load_yolo_model(checkpoint, device=device)
|
34 |
|
35 |
self.img_size = 640
|
36 |
self.conf_thres = conf_thres
|
37 |
self.iou_thres = iou_thres
|
38 |
|
39 |
+
self.process_func_ = partial(process_image, device=device)
|
40 |
|
41 |
def __call__(self, image_list: Union[List[npt.NDArray], npt.NDArray]) -> List[npt.NDArray]:
|
42 |
"""Returns a list of bounding boxes [xmin, ymin, xmax, ymax] for each image in image_list
|