Benchmarking

Tools for measuring whether an algorithm is doing a good job

Classes:

ColoredPointcloudMatching(fn, fp, ...)

Information about correspondences between two colored point-clouds.

Functions:

df_to_locs_and_j(df)

Take a dataframe representing a pointcloud and turn it into an array of locations and an array of colors.

locs_and_j_to_df(locs, j)

Take a set of positions and colors, and turn it into a dataframe which represents a colored pointcloud.

match_colored_pointclouds(gt, df, radius)

Match two colored pointclouds in 3d space.

class bardensr.benchmarks.ColoredPointcloudMatching(fn: int, fp: int, fn_indices: numpy.array, fp_indices: numpy.array, fn_df: pandas.core.frame.DataFrame, fp_df: pandas.core.frame.DataFrame, agreement_df: pandas.core.frame.DataFrame, radius: float)

Information about correspondences between two colored point-clouds. Attributes…

  • fn – number of points in pointcloud A which can’t be found in pointcloud B

  • fp – number of points in pointcloud B which can’t be found in pointcloud A

  • fn_indices – indices of points in pointcloud A which can’t be found in pointcloud B

  • fp_indices – indices of points in pointcloud B which can’t be found in pointcloud A

  • fn_df – a dataframe of points in pointcloud A which can’t be found in pointcloud B

  • fp_df – a dataframe of points in pointcloud B which can’t be found in pointcloud A

  • agreement_df – a dataframe of points in pointcloud B which have a nearby guy in pointcloud A

  • radius – the distance threshold used to determine if a two points with the same color are “matched”

bardensr.benchmarks.df_to_locs_and_j(df)

Take a dataframe representing a pointcloud and turn it into an array of locations and an array of colors.

Input is a dataframe with columns m0,m1,m2,j

Output:

  • locs (N x 3 float array)

  • j (N integer array)

bardensr.benchmarks.locs_and_j_to_df(locs, j)

Take a set of positions and colors, and turn it into a dataframe which represents a colored pointcloud.

Input:

  • locs (N x 3 float array)

  • j (N integer array)

Output is a dataframe with columns m0,m1,m2,j

bardensr.benchmarks.match_colored_pointclouds(gt, df, radius)

Match two colored pointclouds in 3d space. Colored pointclouds should be represented a dataframes with 3 spatial columns (named m0,m1,m2) and a coloring column (named j).

Input

  • gt, a pandas.dataframe (with columns m0,m1,m2, and j)

  • df, a pandas.dataframe (with columns m0,m1,m2, and j)

  • radius, a scalar

Output is a ColoredPointcloudMatching indicating correspondences between the dataframes.

See also bardensr.benchmarks.locs_and_j_to_df, which takes a collection of n points in space and n colors and creates a dataframe of the kind used as input for this function.