Merge pull request #77 from darshats/main
use model.device when calling legacy predict
This commit is contained in:
@@ -153,7 +153,8 @@ class Model:
|
|||||||
image=processed_image,
|
image=processed_image,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
box_threshold=box_threshold,
|
box_threshold=box_threshold,
|
||||||
text_threshold=text_threshold)
|
text_threshold=text_threshold,
|
||||||
|
device=self.model.device)
|
||||||
source_h, source_w, _ = image.shape
|
source_h, source_w, _ = image.shape
|
||||||
detections = Model.post_process_result(
|
detections = Model.post_process_result(
|
||||||
source_h=source_h,
|
source_h=source_h,
|
||||||
@@ -195,7 +196,8 @@ class Model:
|
|||||||
image=processed_image,
|
image=processed_image,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
box_threshold=box_threshold,
|
box_threshold=box_threshold,
|
||||||
text_threshold=text_threshold)
|
text_threshold=text_threshold,
|
||||||
|
device=self.model.device)
|
||||||
source_h, source_w, _ = image.shape
|
source_h, source_w, _ = image.shape
|
||||||
detections = Model.post_process_result(
|
detections = Model.post_process_result(
|
||||||
source_h=source_h,
|
source_h=source_h,
|
||||||
|
Reference in New Issue
Block a user