def METHOD_NAME(self, objects, nms_threshold):
    picked = []
    n = len(objects)
    areas = np.zeros((n,), dtype=np.float32)
    for i in range(n):
        areas[i] = objects[i].rect.area()
    for i in range(n):
        a = objects[i]
        keep = True
        for j in range(len(picked)):
            b = objects[picked[j]]
            # intersection over union
            inter_area = a.rect.intersection_area(b.rect)
            union_area = areas[i] + areas[picked[j]] - inter_area
            # float IoU = inter_area / union_area
            if inter_area / union_area > nms_threshold:
                keep = False
        if keep:
            picked.append(i)
    return picked