Update stamp_processing/detector.py
Browse files
stamp_processing/detector.py
CHANGED
@@ -24,7 +24,7 @@ class StampDetector:
|
|
24 |
) -> None:
|
25 |
"""Create an object for stamp detection"""
|
26 |
# assert device == "cpu", "Currently only support cpu inference"
|
27 |
-
|
28 |
checkpoint = hf.download_file(model_path)
|
29 |
print(model_path)
|
30 |
print(checkpoint)
|
@@ -36,7 +36,7 @@ class StampDetector:
|
|
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
|
|
|
24 |
) -> None:
|
25 |
"""Create an object for stamp detection"""
|
26 |
# assert device == "cpu", "Currently only support cpu inference"
|
27 |
+
|
28 |
checkpoint = hf.download_file(model_path)
|
29 |
print(model_path)
|
30 |
print(checkpoint)
|
|
|
36 |
self.conf_thres = conf_thres
|
37 |
self.iou_thres = iou_thres
|
38 |
|
39 |
+
self.process_func_ = partial(process_image, device="cpu")
|
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
|