def build_all_layer_point_grids(n_per_side: int,
                                n_layers: int,
                                scale_per_layer: int) -> List[np.ndarray]:
    """Generates point grids for all crop layers."""
    points_by_layer = []
    for i in range(n_layers + 1):
        n_points = int(n_per_side / (scale_per_layer**i))
        points_by_layer.append(build_point_grid(n_points))
    return points_by_layer
Generates point grids for all crop layers.
contrib/SegmentAnything/segment_anything/utils/amg.py