All Projects → hailanyi → 3D-Detection-Tracking-Viewer

hailanyi / 3D-Detection-Tracking-Viewer

Licence: other
3D detection and tracking viewer (visualization) for kitti & waymo dataset

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to 3D-Detection-Tracking-Viewer

EgoNet
Official project website for the CVPR 2021 paper "Exploring intermediate representation for monocular vehicle pose estimation"
Stars: ✭ 111 (-26%)
Mutual labels:  kitti, 3d-object-detection
ViP
A New 3D Detector. Code Will be made public.
Stars: ✭ 29 (-80.67%)
Mutual labels:  kitti, 3d-object-detection
imvoxelnet
[WACV2022] ImVoxelNet: Image to Voxels Projection for Monocular and Multi-View General-Purpose 3D Object Detection
Stars: ✭ 179 (+19.33%)
Mutual labels:  kitti, 3d-object-detection
cubiomes-viewer
An efficient graphical Minecraft seed finder and map viewer.
Stars: ✭ 346 (+130.67%)
Mutual labels:  viewer
ai-unchive
AIA Viewer for Kodular
Stars: ✭ 18 (-88%)
Mutual labels:  viewer
Tools Merge Image PointCloud
Project the PointCloud to the image & Generate the LiDAR PointCloud with color.
Stars: ✭ 39 (-74%)
Mutual labels:  kitti
kitti-A-LOAM
Easy description to run and evaluate A-LOAM with KITTI-data
Stars: ✭ 28 (-81.33%)
Mutual labels:  kitti
GbxDump
A Microsoft Windows application that displays the contents of the file header of *.Gbx files used by the Nadeo game engine GameBox.
Stars: ✭ 19 (-87.33%)
Mutual labels:  viewer
ccViewer
CryptCloudViewer source codes
Stars: ✭ 66 (-56%)
Mutual labels:  viewer
saccade
A sophisticated scientific image viewer for Linux with OpenGL support and synchronized viewports
Stars: ✭ 38 (-74.67%)
Mutual labels:  viewer
stl-gcode-viewer
STL/OBJ/GCode Viewer in Qt
Stars: ✭ 49 (-67.33%)
Mutual labels:  viewer
Viewer
Viewer is a configurable application template that enables you to display an ArcGIS web map using a variety of tools.
Stars: ✭ 56 (-62.67%)
Mutual labels:  viewer
icosa-viewer
3D Viewer component for Tilt Brush / Open Brush, Google Blocks files and their derivatives
Stars: ✭ 24 (-84%)
Mutual labels:  viewer
Vudit
A file viewer for Android
Stars: ✭ 40 (-73.33%)
Mutual labels:  viewer
go-spice
SPICE proxy library, written in go
Stars: ✭ 23 (-84.67%)
Mutual labels:  viewer
cyan
Cyan Color Converter
Stars: ✭ 68 (-54.67%)
Mutual labels:  viewer
frustum-convnet
The PyTorch Implementation of F-ConvNet for 3D Object Detection
Stars: ✭ 228 (+52%)
Mutual labels:  3d-object-detection
efficient online learning
Efficient Online Transfer Learning for 3D Object Detection in Autonomous Driving
Stars: ✭ 20 (-86.67%)
Mutual labels:  3d-object-detection
StlVault
3D object viewer and organizer
Stars: ✭ 104 (-30.67%)
Mutual labels:  viewer
gemini-viewer
WebGL BIM Viewer based on xeoKit-sdk, written with TypeScript.
Stars: ✭ 24 (-84%)
Mutual labels:  viewer

3D Detection & Tracking Viewer

This project was developed for view 3D object detection and tracking results. It supports rendering 3D bounding boxes as car models and rendering boxes on images.

Features

  • Rendering boxes as cars
  • Captioning box ids(infos) in 3D scene
  • Projecting 3D box or points on 2D image

Design pattern

This code includes two parts, one for data loading, other one for visualization of 3D detection and tracking results. The overall framework of design is shown below:

Change log

  • (2021.11.2) update 'Requirements'; update viewer/box_op.py to adapt 'vedo'.

Prepare data

  • Kitti detection dataset
# For Kitti Detection Dataset         
└── kitti_detection
       ├── testing 
       |      ├──calib
       |      ├──image_2
       |      ├──label_2
       |      └──velodyne      
       └── training
              ├──calib
              ├──image_2
              ├──label_2
              └──velodyne 
  • Kitti tracking dataset
# For Kitti Tracking Dataset         
└── kitti_tracking
       ├── testing 
       |      ├──calib
       |      |    ├──0000.txt
       |      |    ├──....txt
       |      |    └──0028.txt
       |      ├──image_02
       |      |    ├──0000
       |      |    ├──....
       |      |    └──0028
       |      ├──label_02
       |      |    ├──0000.txt
       |      |    ├──....txt
       |      |    └──0028.txt
       |      └──velodyne
       |           ├──0000
       |           ├──....
       |           └──0028      
       └── training # the structure is same as testing set
              ├──calib
              ├──image_02
              ├──label_02
              └──velodyne 
  • Waymo dataset

Please refer to the OpenPCDet for Waymo dataset organization.

Requirements (Updated 2021.11.2)

python3
numpy==1.21.3
vedo==2021.0.6
vtk==9.0.3
opencv==4.5.4.58
matplotlib==3.4.3

Usage

1. Set boxes type & viewer background color

Currently this code supports Kitti (h,w,l,x,y,z,yaw) and Waymo OpenPCDet (x,y,z,l,w,h,yaw) box type. You can set the box type and background color when initializing a viewer as

from viewer.viewer import Viewer

vi = Viewer(box_type="Kitti",bg = (255,255,255))

2. Set objects color map

You can set the objects color map for view tracking results, same as matplotlab.pypot color map. The common used color maps are "rainbow", "viridis","brg","gnuplot","hsv" and etc.

vi.set_ob_color_map('rainbow')

3. Add colorized point clouds to 3D scene

The viewer receives a set of points, it must be a array with shape (N,3). If you want to view the scatter filed, you should set the 'scatter_filed' with a shape (N,), and set the 'color_map_name' to specify the colors. If the 'scatter_filed' is None, the points will show in color of 'color' arg.

vi.add_points(points[:,0:3],
               radius = 2,
               color = (150,150,150),
               scatter_filed = points[:,2],
               alpha=1,
               del_after_show = True,
               add_to_3D_scene = True,
               add_to_2D_scene = True,
               color_map_name = "viridis")

4. Add boxes or cars to 3D scene

The viewer receives a set of boxes, it must be a array with shape (N,7). You can set the boxes to meshes or lines only, you can also set the line width, conner points. Besides, you can provide a set of IDs(int) to colorize the boxes, and put a set of additional infos to caption the boxes. Note that, the color will set to the color of "color" arg if the ids is None.

vi.add_3D_boxes(boxes=boxes[:,0:7],
                 ids=ids,
                 box_info=infos,
                 color="blue",
                 add_to_3D_scene=True,
                 mesh_alpha = 0.3,
                 show_corner_spheres = True,
                 corner_spheres_alpha = 1,
                 corner_spheres_radius=0.1,
                 show_heading = True,
                 heading_scale = 1,
                 show_lines = True,
                 line_width = 2,
                 line_alpha = 1,
                 show_ids = True,
                 show_box_info=True,
                 del_after_show=True,
                 add_to_2D_scene=True,
                 caption_size=(0.05,0.05)
                 )

You can also render the boxes as cars, the input format is same as boxes.

vi.add_3D_cars(boxes=boxes[:,0:7],
                 ids=ids,
                 box_info=infos,
                 color="blue",
                 mesh_alpha = 1,
                 show_ids = True,
                 show_box_info=True,
                 del_after_show=True,
                 car_model_path="viewer/car.obj",
                 caption_size = (0.1, 0.1)
                )

5. View boxes or points on image

To view the 3D box and points on image, firstly should set the camera intrinsic, extrinsic mat, and put a image. Besides, when adding the boxes and points, the 'add_to_2D_scene' should be set to True.

vi.add_image(image)
vi.set_extrinsic_mat(V2C)
vi.set_intrinsic_mat(P2)

6. Show 2D and 3D results

To show a single frame, you can directly run vi.show_2D(), vi.show_3D(). The visualization window will not close until you press the "Enter" key. You can change the viewing angle by dragging the mouse within the visualization window.

To show multiple frames, you can use the for loop. While the code is running, please first click on the 3D window and then press the "Enter" key to view a sequence data.

for i in range(len(dataset)):
    V2C, P2, image, boxes = dataset[i]
    vi.add_3D_boxes(boxes)
    vi.add_image(image)
    vi.set_extrinsic_mat(V2C)
    vi.set_intrinsic_mat(P2)
    vi.show_2D()
    vi.show_3D()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].