Skip to content

Instantly share code, notes, and snippets.

View davidstutz's full-sized avatar

David Stutz davidstutz

View GitHub Profile
@davidstutz
davidstutz / bounding_box.py
Created July 4, 2018 19:37
Utility for reading/writing KITTI 2D and 3D bounding boxes between the Velodyne coordinate system and the camera coordinate system. Also see the KITTI 2D/3D object detection development kit and its README for details.
import os
import math
import numpy as np
class BoundingBox:
"""
Represents a bounding box by center, size and orientation. Note that the input will be
directly read from the KITTI XML files; thus, the z-axis corresponds to height instead
of depth and the y-axis corresponds to depth instead of height.