A toolkit for reading, visualizing the TAB, a travelable area boundary dataset, and evaluating the detectors.
Run the following command in the tab_kit/
:
pip install .
- Read the TAB.
from kaitorch.pcd import PointCloudXYZIR
from tab import TAB
tab = TAB('path/to/TAB', 'train')
# Iterate the TAB frame by frame.
for f in tab:
# Read the point cloud.
pcd: PointCloudXYZIR = tab.get_pcd(f)
# Clip the point cloud.
# It is not needed to do so because the point cloud has already been clipped before.
pcd = TAB.filter_pcd_(pcd)
print(pcd.xyz)
print(pcd.i)
print(pcd.r)
# Read labels.
bounds = tab.get_bound(f)
for bound in bounds:
print(bound.keys())
More examples are available.
- Do visualization.
from tab import BEV, TAB, Visualizer
vis = Visualizer(
BEV(mode=BEV.Mode.CONSTANT),
width=2,
save=True,
dst='results'
)
tab = TAB('path/to/TAB', 'train')
for f in tqdm(tab):
vis(f.seq, f.id, tab.get_pcd(f), tab.get_bound(f))
More examples are available.
- Do evaluation.
from tab import Evaluator
evaluator = Evaluator('path/to/TAB', 'test')
# Get prediction results.
# preds = ...
print(Evaluator.tabulate(*evaluator(preds)))
The example in detail is ./test/eval.py
. More examples are available.