Comments (6)
Have you ever tried this tutorial?
https://github.com/scaleapi/pandaset-devkit/blob/master/tutorials/projection/projection.ipynb
from pandaset-devkit.
My code:
Is there any bug?
import pandaset
from pandaset import geometry
import numpy as np
import cv2
dataset = pandaset.DataSet("/data/PandaSet")
seq002 = dataset["002"]
seq002.load()
camera_keys = seq002.camera.keys()
print("Available cameras: ", camera_keys)
seq_idx = 0
cuboids0 = seq002.cuboids[seq_idx]
box = [cuboids0["position.x"][seq_idx], cuboids0["position.y"][seq_idx], cuboids0["position.z"][seq_idx],
cuboids0["dimensions.x"][seq_idx], cuboids0["dimensions.y"][seq_idx], cuboids0["dimensions.y"][seq_idx],
cuboids0["yaw"][seq_idx]]
corners = geometry.center_box_to_corners(box)
camera_used = cuboids0["camera_used"][seq_idx]
camera_name = "front_right_camera"
choosen_camera = seq002.camera[camera_name]
ori_image = seq002.camera[camera_name][seq_idx]
img = cv2.cvtColor(np.array(ori_image), cv2.COLOR_RGB2BGR)
projected_points2d, camera_points_3d, inner_indices = geometry.projection(lidar_points=corners,
camera_data=choosen_camera[seq_idx],
camera_pose=choosen_camera.poses[seq_idx],
camera_intrinsics=choosen_camera.intrinsics,
filter_outliers=False)
box1 = projected_points2d[(0, 3, 7, 4), :]
box2 = projected_points2d[(1, 2, 6, 5), :]
box1 = np.rint(box1).astype(np.int32)
box2 = np.rint(box2).astype(np.int32)
box1 = box1.reshape((-1, 1, 2))
box2 = box2.reshape((-1, 1, 2))
cv2.polylines(img, [box1], True, (0, 0, 255), 5)
cv2.polylines(img, [box2], True, (255, 0, 0), 5)
cv2.imshow('boxed', img)
cv2.waitKey()
cv2.destroyAllWindows()
from pandaset-devkit.
The box you try to show on the image is not in front of the camera, it's out of field of vision, maybe at back of the camera.
from pandaset-devkit.
I have tried every camera. It doesn't work well
from pandaset-devkit.
I have tried every camera. It doesn't work well
There is a mistake in visualization code,
cuboids0["dimensions.x"][seq_idx], cuboids0["dimensions.y"][seq_idx], cuboids0["dimensions.y"] ->
cuboids0["dimensions.x"][seq_idx], cuboids0["dimensions.y"][seq_idx], cuboids0["dimensions.z"]
from pandaset-devkit.
Thanks a lot.
from pandaset-devkit.
Related Issues (20)
- Cannot download the dataset HOT 2
- Unable to download the dataset
- Questions about color of camera data
- How to visualise point cloud data with bounding boxes HOT 1
- How to evaluating results? HOT 7
- Questions about the coordinate axis HOT 2
- rotation order ZYX or ZXYďź HOT 1
- Label Mapping for lidar segmentation
- semseg class labels
- No email received with download link
- Lidar file ext wrong HOT 1
- 3D Bounding box quality in camera view is poor. HOT 5
- How to convert 3dbox to ego? HOT 1
- how to convert ego point or lidar point each point to in map Latitude and longitude
- projection of GT on to the image. too many negatives. HOT 2
- Any plan to held a competition or maintain a benchmark?
- Intensity/Range spherical image from Pandar64 point cloud HOT 2
- How many object per class are label ?
- About sematic segmentation data class. HOT 1
- Raw data from Pandar GT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandaset-devkit.