def METHOD_NAME(self, img_url):
    image = imread(img_url)[:, :, :3] / 255.
    h, w, _ = image.shape
    image_size = 512
    image_tensor = torch.tensor(
        image.transpose(2, 0, 1), dtype=torch.float32)[None, ...]
    bbox = self.detector.run(image_tensor)
    left = bbox[0]
    right = bbox[2]
    top = bbox[1]
    bottom = bbox[3]
    old_size = max(right - left, bottom - top)
    center = np.array(
        [right - (right - left) / 2.0, bottom - (bottom - top) / 2.0])
    size = int(old_size * 1.1)
    src_pts = np.array([[center[0] - size / 2, center[1] - size / 2],
                        [center[0] - size / 2, center[1] + size / 2],
                        [center[0] + size / 2, center[1] - size / 2]])
    DST_PTS = np.array([[0, 0], [0, image_size - 1], [image_size - 1, 0]])
    tform = estimate_transform('similarity', src_pts, DST_PTS)
    dst_image = warp(
        image, tform.inverse, output_shape=(image_size, image_size))
    dst_image = (dst_image[:, :, ::-1] * 255).astype(np.uint8)
    return dst_image