티스토리 뷰
https://logicatcore.github.io/scratchpad/lidar/sensor-fusion/jupyter/2021/04/20/2D-Oriented-Bounding-Box.html
http://www.open3d.org/docs/latest/python_api/open3d.geometry.OrientedBoundingBox.html
open3d.geometry.OrientedBoundingBox — Open3D master (684d7cd) documentation
__init__(self: open3d.cpu.pybind.geometry.OrientedBoundingBox, center: numpy.ndarray[numpy.float64[3, 1]], R: numpy.ndarray[numpy.float64[3, 3]], extent: numpy.ndarray[numpy.float64[3, 1]]) -> None
www.open3d.org
https://github.com/google-research-datasets/Objectron
GitHub - google-research-datasets/Objectron: Objectron is a dataset of short, object-centric video clips. In addition, the video
Objectron is a dataset of short, object-centric video clips. In addition, the videos also contain AR session metadata including camera poses, sparse point-clouds and planes. In each video, the came...
github.com
GitHub - google-research-datasets/Objectron: Objectron is a dataset of short, object-centric video clips. In addition, the video
Objectron is a dataset of short, object-centric video clips. In addition, the videos also contain AR session metadata including camera poses, sparse point-clouds and planes. In each video, the came...
github.com
# for 3d iou
# reorder the corners from open3d definition to objectron box
open3d2objectron = [0, 1, 2, 4, 7, 3, 8, 6, 5]
# return center + corners of oriented bounding box from a point cloud
def get_oriented_3d_bbox(point_cloud: np.ndarray) -> np.ndarray:
"""
point_cloud: (N, 3) np.ndarray
Return
vertices: (9, 3); 1 center + 8 corners
"""
o3d_points = o3d.utility.Vector3dVector(point_cloud)
oriented_3d_bbox = o3d.geometry.OrientedBoundingBox.create_from_points(o3d_points)
center = oriented_3d_bbox.get_center() # (3,)
corners = oriented_3d_bbox.get_box_points() # (8, 3)
vertices = np.concatenate([np.asarray(center)[None, :], np.asarray(corners)])
# reorder
vertices = vertices[open3d2objectron]
return vertices
# return 3d bounding box iou of two meshes (pointclouds)
def calc_3d_iou(mesh_a: np.ndarray, mesh_b: np.ndarray):
""""
mesh_a: (N1, 3)
mesh_b: (N2, 3)
Return
iou: scalar 0~1
"""
bbox_points_a = get_oriented_3d_bbox(mesh_a) # (9, 3) center + 8 corners
bbox_points_b = get_oriented_3d_bbox(mesh_b) # (9, 3) center + 8 corners
objectron_box_a = Box(bbox_points_a)
objectron_box_b = Box(bbox_points_b)
IoU_calculator = IoU(objectron_box_a, objectron_box_b)
iou = IoU_calculator.iou()
return iou
'Research (연구 관련)' 카테고리의 다른 글
DensePose rendering (0) | 2023.10.20 |
---|---|
Sparse Multi camera calibration (0) | 2023.08.23 |
Python multiprocessing (0) | 2023.06.21 |
Mask, Polygon, Simplify (0) | 2023.06.16 |
Open3D (0) | 2023.05.03 |
- Total
- Today
- Yesterday
- Virtual Camera
- 헬스
- 비전
- camera coordinate
- 인터뷰
- 머신러닝
- nerf
- Interview
- demo
- pytorch
- 피트니스
- nohup
- 2d pose
- Docker
- Pose2Mesh
- 컴퓨터비전
- 문경식
- Generative model
- focal length
- pyrender
- 컴퓨터비젼
- VAE
- Machine Learning
- part segmentation
- Transformation
- deep learning
- densepose
- 에디톨로지
- spin
- world coordinate
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |