ultralytics 8.2.50 new Streamlit live inference Solution (#14210)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Muhammad Rizwan Munawar <muhammadrizwanmunawar123@gmail.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: RizwanMunawar <chr043416@gmail.com> Co-authored-by: Kayzwer <68285002+Kayzwer@users.noreply.github.com>
This commit is contained in:
parent
5f0fd710a4
commit
26a664f636
20 changed files with 350 additions and 22 deletions
|
|
@ -286,7 +286,7 @@ class FastSAMPrompt:
|
|||
def box_prompt(self, bbox):
|
||||
"""Modifies the bounding box properties and calculates IoU between masks and bounding box."""
|
||||
if self.results[0].masks is not None:
|
||||
assert bbox[2] != 0 and bbox[3] != 0
|
||||
assert bbox[2] != 0 and bbox[3] != 0, "Bounding box width and height should not be zero"
|
||||
masks = self.results[0].masks.data
|
||||
target_height, target_width = self.results[0].orig_shape
|
||||
h = masks.shape[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue