Merge pull request #77 from darshats/main

use model.device when calling legacy predict
pull/87/head
Ren Tianhe 2023-05-02 17:36:30 +08:00 committed by GitHub
commit 55d5f31b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

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,