pull/313/merge
PierreMarieCurie 2024-08-14 18:03:36 +03:00 committed by GitHub
commit f38dee41a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 5 deletions

View File

@ -154,7 +154,8 @@ class Model:
image: np.ndarray,
caption: str,
box_threshold: float = 0.35,
text_threshold: float = 0.25
text_threshold: float = 0.25,
remove_combined: bool = False
) -> Tuple[sv.Detections, List[str]]:
"""
import cv2
@ -181,7 +182,8 @@ class Model:
caption=caption,
box_threshold=box_threshold,
text_threshold=text_threshold,
device=self.device)
device=self.device,
remove_combined=remove_combined)
source_h, source_w, _ = image.shape
detections = Model.post_process_result(
source_h=source_h,
@ -194,8 +196,9 @@ class Model:
self,
image: np.ndarray,
classes: List[str],
box_threshold: float,
text_threshold: float
box_threshold: float = 0.35,
text_threshold: float = 0.25,
remove_combined: bool = False
) -> sv.Detections:
"""
import cv2
@ -224,7 +227,8 @@ class Model:
caption=caption,
box_threshold=box_threshold,
text_threshold=text_threshold,
device=self.device)
device=self.device,
remove_combined=remove_combined)
source_h, source_w, _ = image.shape
detections = Model.post_process_result(
source_h=source_h,