Merge pull request #77 from darshats/main

use model.device when calling legacy predict
This commit is contained in:
Ren Tianhe
2023-05-02 17:36:30 +08:00
committed by GitHub

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,