from vod.configuration import KittiLocations
from vod.frame import FrameDataLoader
kitti_locations = KittiLocations(root_dir="example_set",
output_dir="example_output")
frame_data = FrameDataLoader(kitti_locations=kitti_locations,
frame_number="01201")
The Visualization2D
class allows the projection of the lidar, radar data, and the 3D-boxes of the annotation to the camera picture. The example below shows the instantiation of the class, and applies the draw_plot()
to plot the picture.
from vod.visualization import Visualization2D
vis2d = Visualization2D(frame_data)
vis2d.draw_plot()
By changing the arguments of the draw_plot()
method, plotting lidar points is also possible.
vis2d.draw_plot(show_lidar=True)
Similar to Lidar, provided show_radar=True
argument, the radar pcl can be also plotted over the picture.
vis2d.draw_plot(show_radar=True)
Similar to point-cloud data, the 3D bounding boxes can be also plotted over the picture.
vis2d.draw_plot(show_gt=True)
Plotting the point-clouds and the annotations in a single plot is also possible. It is also possible to set filters for distance, which limits the number of plotted instances. Using the save_figure
argument, it is possible to save the image to a file as well.
vis2d.draw_plot(show_lidar=True,
show_radar=True,
show_gt=True,
min_distance_threshold=5,
max_distance_threshold=20,
save_figure=True)