Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the number in detection_details must be greater than or equal to 0 #436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions imageai/Detection/__init__.py
Expand Up @@ -368,6 +368,7 @@ def detectObjectsFromImage(self, input_image="", output_image_path="", input_typ
color = label_color(label)

detection_details = detections[0, index, :4].astype(int)
detection_details = np.maximum(detection_details, 0)
draw_box(detected_copy, detection_details, color=color)

if (display_object_name == True and display_percentage_probability == True):
Expand Down Expand Up @@ -743,6 +744,7 @@ def detectCustomObjectsFromImage(self, custom_objects=None, input_image="", outp
color = label_color(label)

detection_details = detections[0, index, :4].astype(int)
detection_details = np.maximum(detection_details, 0)
draw_box(detected_copy, detection_details, color=color)

if (display_object_name == True and display_percentage_probability == True):
Expand Down