Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions imageai/Detection/__init__.py
Original file line number Diff line number Diff line change
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