@@ -90,7 +90,7 @@ def imsave(images, size, path):
9090# for object detection
9191def draw_boxes_and_labels_to_image (image , classes = [], coords = [],
9292 scores = [], classes_list = [],
93- box_centroid_to_upleft_butright = True , is_rescale = True , save_name = None ):
93+ is_center = True , is_rescale = True , save_name = None ):
9494 """ Draw bboxes and class labels on image. Return or save the image with bboxes, example in the docs of ``tl.prepro``.
9595
9696 Parameters
@@ -99,10 +99,10 @@ def draw_boxes_and_labels_to_image(image, classes=[], coords=[],
9999 classes : a list of class ID (int).
100100 coords : a list of list for coordinates.
101101 - Should be [x, y, x2, y2] (up-left and botton-right format)
102- - If [x_center, y_center, w, h] (set box_centroid_to_upleft_butright to True).
102+ - If [x_center, y_center, w, h] (set is_center to True).
103103 scores : a list of score (float). (Optional)
104104 classes_list : list of string, for converting ID to string on image.
105- box_centroid_to_upleft_butright : boolean, defalt is True.
105+ is_center : boolean, defalt is True.
106106 If coords is [x_center, y_center, w, h], set it to True for converting [x_center, y_center, w, h] to [x, y, x2, y2] (up-left and botton-right).
107107 If coords is [x1, x2, y1, y2], set it to False.
108108 is_rescale : boolean, defalt is True.
@@ -129,7 +129,7 @@ def draw_boxes_and_labels_to_image(image, classes=[], coords=[],
129129 thick = int ((imh + imw ) // 430 )
130130
131131 for i in range (len (coords )):
132- if box_centroid_to_upleft_butright :
132+ if is_center :
133133 x , y , x2 , y2 = prepro .obj_box_coord_centroid_to_upleft_butright (coords [i ])
134134 else :
135135 x , y , x2 , y2 = coords [i ]
0 commit comments