nguyenp99 commited on
Commit
d749e18
·
verified ·
1 Parent(s): 34412b0

Update stamp_processing/detector.py

Browse files
Files changed (1) hide show
  1. stamp_processing/detector.py +2 -2
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="cuda:1")
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="cuda:1")
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