def __get_intersection_over_union(self, box_1, # type: numpy.ndarray
                                            box_2  # type: numpy.ndarray
                                     ):
        # type: (...) -> float
        """
        Evaluate the intersection-over-union for two boxes.
        The intersection-over-union metric determines how close
        two boxes are to being the same box.  The closer the boxes
        are to being the same, the closer the metric will be to 1.0
        
        box_1 and box_2 are arrays of 4 numbers which are the (x, y)
        points that define the center of the box and the length and width of
        the box.
        Returns the intersection-over-union (between 0.0 and 1.0)
        for the two boxes specified.
        """
        print type(box_1)
        # one diminsion of the intersecting box
        intersection_dim_1 = min(box_1[0]+0.5*box_1[2],box_2[0]+0.5*box_2[2])-\
                             max(box_1[0]-0.5*box_1[2],box_2[0]-0.5*box_2[2])

        # the other dimension of the intersecting box
        intersection_dim_2 = min(box_1[1]+0.5*box_1[3],box_2[1]+0.5*box_2[3])-\
                             max(box_1[1]-0.5*box_1[3],box_2[1]-0.5*box_2[3])

        if intersection_dim_1 < 0 or intersection_dim_2 < 0 :
            # no intersection area
            intersection_area = 0
        else :
            # intersection area is product of intersection dimensions
            intersection_area =  intersection_dim_1*intersection_dim_2

        # calculate the union area which is the area of each box added
        # and then we need to subtract out the intersection area since
        # it is counted twice (by definition it is in each box)
        union_area = box_1[2]*box_1[3] + box_2[2]*box_2[3] - intersection_area;

        # now we can return the intersection over union
        iou = intersection_area / union_area
        #print("iou: ", iou)
        return iou

        Evaluate the intersection-over-union for two boxes.
        The intersection-over-union metric determines how close
        two boxes are to being the same box.  The closer the boxes
        are to being the same, the closer the metric will be to 1.0
        
        box_1 and box_2 are arrays of 4 numbers which are the (x, y)
        points that define the center of the box and the length and width of
        the box.
        Returns the intersection-over-union (between 0.0 and 1.0)
        for the two boxes specified.
        
networks/tiny_yolo_v3/Tiny_yolo_v3_object_detector.py