I have a 2d numpy array of size 768 x 1024 which contains all the class values of a segmented image. I have detected pedestrians/vehicles within this array and have got the