use model.device when calling legacy predict

This commit is contained in:
Darshat Shah
2023-04-27 12:15:11 +05:30
parent 498048b1b2
commit ff94310921

View File

@@ -153,7 +153,8 @@ class Model:
image=processed_image,
caption=caption,
box_threshold=box_threshold,
text_threshold=text_threshold)
text_threshold=text_threshold,
device=self.model.device)
source_h, source_w, _ = image.shape
detections = Model.post_process_result(
source_h=source_h,
@@ -195,7 +196,8 @@ class Model:
image=processed_image,
caption=caption,
box_threshold=box_threshold,
text_threshold=text_threshold)
text_threshold=text_threshold,
device=self.model.device)
source_h, source_w, _ = image.shape
detections = Model.post_process_result(
source_h=source_h,