-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support visualization and browse_dataset on nuScenes Mono-3D dataset #542
Conversation
Codecov Report
@@ Coverage Diff @@
## master #542 +/- ##
==========================================
+ Coverage 50.77% 50.85% +0.07%
==========================================
Files 197 197
Lines 14923 15038 +115
Branches 2426 2445 +19
==========================================
+ Hits 7577 7647 +70
- Misses 6851 6885 +34
- Partials 495 506 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Please solve the conflicts. |
|
||
def mono_cam_box2vis(cam_box): | ||
"""This is a post-processing function on the bboxes from Mono-3D task. If | ||
we want to perform projection visualization, we need to: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mainly because Nus 3D boxes have three rotation angles (yaw, pitch, roll)
, but we assume the later two are \pi / 2
and 0
and only predict yaw
.
@@ -56,46 +56,31 @@ def project_pts_on_img(points, | |||
cv2.waitKey(100) | |||
|
|||
|
|||
def project_bbox3d_on_img(bboxes3d, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remove this function as it is not used in the codebase. Its name is very ambiguous since we already have project_camera/lidar/depth_bbox
now. Also it works almost the same as draw_lidar_bbox3d_on_img
.
return results_dict | ||
|
||
def show(self, results, out_dir): | ||
@staticmethod | ||
def _get_data(results, key): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other 3D datasets, we have these functions to enable data loading from eval_pipeline
. However, as NusMono
inherited from 2D datasets, I have to duplicate these functions here. Kind of ugly I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move it out of a specific class as a single utilized function if most of them in different classes are very similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Will do this in a new PR.
help='Whether to visualize multi-modality data. If True, we will show ' | ||
'both 3D point clouds with 3D bounding boxes and 2D images with ' | ||
'projected bounding boxes.') | ||
'--task', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I let user specify the task here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR is ready for review now @Tai-Wang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we further compress the browse_dataset_mono.png (mainly because the resolution of nuScenes is a little high), which almost has a similar size with demo videos
Done. |
* Add mmrotate regression test * update regression test script
As
NuScenesMonoDataset
inherits from 2DCocoDataset
, to be coherent with the visualization setting in MMDet3D:eval_pipeline
for its config fileNuScenesMonoDataset
to support data loading in visualization (e.g._extract_data
) followingCustom3DDataset
mmdet3d/core/bbox/structures/utils.py
namedmono_cam_box2vis
To support Mono-3D in browse_dataset, I let users specify the task of the dataset instead of inferring from config (which is troublesome).
Since we don't have kitti mono config in the current codebase, I didn't test the code on it. But I believe it will work well as KittiMono inherits from NusMono.