Skip to content

Commit

Permalink
[#51386] nodes: yolact_kenning.py: Limit predictions by score and amount
Browse files Browse the repository at this point in the history
Signed-off-by: Illia Vysochyn <[email protected]>
  • Loading branch information
ivysochyn authored and glatosinski committed Apr 16, 2024
1 parent d8f4a19 commit a891354
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cvnode_base/nodes/yolact_kenning.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def prepare(self) -> bool:
if not model_path.exists():
self.node.get_logger().error(f"File {model_path} does not exist")
return False
self.model = YOLACT(model_path, None)
self.model = YOLACT(model_path, None, top_k=100, score_threshold=0.3)

device = self.node.get_parameter("device").value
if not device:
Expand Down Expand Up @@ -108,7 +108,7 @@ def prepare(self) -> bool:
"Please specify device for TVM runtime"
)
return False
self.model = YOLACT(model_path, None)
self.model = YOLACT(model_path, None, top_k=100, score_threshold=0.3)
self.runtime = TVMRuntime(
model_path,
contextname=device,
Expand Down Expand Up @@ -146,7 +146,7 @@ def prepare(self) -> bool:
if not model_path.exists():
self.node.get_logger().error(f"File {model_path} does not exist")
return False
self.model = YOLACT(model_path, None)
self.model = YOLACT(model_path, None, top_k=100, score_threshold=0.3)
self.runtime = TFLiteRuntime(
model_path, disable_performance_measurements=True
)
Expand Down

0 comments on commit a891354

Please sign in to comment.