From 9ce1bd8c8bb59d26ff2b12460d3985ea8e6d8991 Mon Sep 17 00:00:00 2001 From: gyani-sunkara <52619288+gyani-sunkara@users.noreply.github.com> Date: Wed, 27 Oct 2021 15:31:13 +0530 Subject: [PATCH] Display unique id of the tracked object Having generated unique ID of the tracked object along with the bounding box helps better visualize the tracking. --- sort.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sort.py b/sort.py index 4b2ca8a..d87d58a 100644 --- a/sort.py +++ b/sort.py @@ -317,6 +317,7 @@ def parse_args(): print('%d,%d,%.2f,%.2f,%.2f,%.2f,1,-1,-1,-1'%(frame,d[4],d[0],d[1],d[2]-d[0],d[3]-d[1]),file=out_file) if(display): d = d.astype(np.int32) + ax1.text(d[0],d[1],str(d[4]),c="white",bbox=dict(facecolor="green")) ax1.add_patch(patches.Rectangle((d[0],d[1]),d[2]-d[0],d[3]-d[1],fill=False,lw=3,ec=colours[d[4]%32,:])) if(display):