Skip to content

Commit 2e1452e

Browse files
authored
fix thickness of font and bbox
1 parent 448d8d1 commit 2e1452e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tracker/track_yolov5.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ def plot_img(img, frame_id, results, save_dir):
249249
# convert tlwh to tlbr
250250
tlbr = tuple([int(tlwh[0]), int(tlwh[1]), int(tlwh[0] + tlwh[2]), int(tlwh[1] + tlwh[3])])
251251
# draw a rect
252-
cv2.rectangle(img_, tlbr[:2], tlbr[2:], get_color(id), thickness=1, )
252+
cv2.rectangle(img_, tlbr[:2], tlbr[2:], get_color(id), thickness=3, )
253253
# note the id and cls
254254
text = f'{CATEGORY_DICT[cls]}-{id}'
255255
cv2.putText(img_, text, (tlbr[0], tlbr[1]), fontFace=cv2.FONT_HERSHEY_PLAIN, fontScale=1,
256-
color=(255, 164, 0), thickness=1)
256+
color=(255, 164, 0), thickness=2)
257257

258258
cv2.imwrite(os.path.join(save_dir, f'{frame_id:05d}.jpg'), img_)
259259

@@ -337,4 +337,4 @@ def get_color(idx):
337337
# for debug
338338
# evaluate(sorted(os.listdir('./tracker/results/deepmot_17_08_02_38')),
339339
# sorted(os.listdir('./tracker/results/deepmot_17_08_02_38')), data_type='visdrone', result_folder='deepmot_17_08_02_38')
340-
main(opts)
340+
main(opts)

0 commit comments

Comments
 (0)