mmdet/datasets/pipelines/transforms.py
def _get_border(self, border, size):
        """Get final border for the target size.

        This function generates a `final_border` according to image's shape.
        The area between `final_border` and `size - final_border` is the
        `center range`. We randomly choose center from the `center range`
        to avoid our random center is too close to original image's border.

        Args:
            border (int): The initial border, default is 128.
            size (int): The width or height of original image.
        Returns:
            int: The final border.
        """
        i = pow(2, np.ceil(np.log2(np.ceil(2 * border / size))))
        return border // i
Get final border for the target size.

        This function generates a `final_border` according to image's shape.
        The area between `final_border` and `size - final_border` is the
        `center range`. We randomly choose center from the `center range`
        to avoid our random center is too close to original image's border.

        Args:
            border (int): The initial border, default is 128.
            size (int): The width or height of original image.
        Returns:
            int: The final border.
        
Get final border for the target size.
This function generates a `final_border` according to image's shape.
Get final border for the target size . This function generates a ` final_border ` according to image ' s shape .
def _get_border(self, border, size):
        i = pow(2, np.ceil(np.log2(np.ceil(2 * border / size))))
        return border // i
def _get_border ( self , border , size ) : i = pow ( 2 , np . ceil ( np . log2 ( np . ceil ( 2 * border / size ) ) ) ) return border // i
Get final border for the target size.
Get final border for the target size .
"""Get final border for the target size.

        This function generates a `final_border` according to image's shape.
        The area between `final_border` and `size - final_border` is the
        `center range`. We randomly choose center from the `center range`
        to avoid our random center is too close to original image's border.

        Args:
            border (int): The initial border, default is 128.
            size (int): The width or height of original image.
        Returns:
            int: The final border.
        """
The final border.
The final border .
int
self
border
The initial border, default is 128.
The initial border default is 128 .
size
The width or height of original image.
The width or height of original image .