Open ghost opened 1 year ago
color = color or [random.randint(0, 255) for _ in range(3)] c1, c2 = (int(x[0]), int(x[1])), (int(x[2]), int(x[3])) cv2.rectangle(img, c1, c2, color, thickness=tl, lineType=cv2.LINE_AA)
How can I change this setting?
i dont understand your question. please, be more specific.
Hi, I made yolo v7 model for detecting one class only. Also, i added ocr so when it detects the object, it crops detection from bounding boxes and it send that to ocr for text detection. But, when plotting the results, detected text is too large and it goes beyond image. I tried edditing the
def plot_one_box
function, but with no success.Here is how my function looks now:
def plot_one_box(x, img, color=None, label=None, text=None, line_thickness=3):
Plots one bounding box on image img
Anyway, I want to print detected label above bounding box as it is now, and then the detected text, but when it reaches the width of the bounding box width, it goes into a new line with new filled rectangle. Can somebody help me.