From a6d93bfe6c0770000c3913f0b9c335fe2d741d03 Mon Sep 17 00:00:00 2001 From: whyekit-aptiv Date: Fri, 26 Jun 2020 14:50:07 +0800 Subject: [PATCH 1/2] Remove render_if_no_points arg and section --- .../nuscenes_lidarseg_tutorial.ipynb | 34 ++----------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb b/python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb index 99a5b6a5..d2d74aa9 100644 --- a/python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb +++ b/python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb @@ -189,37 +189,6 @@ " verbose=True)" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Say you happen to choose a camera channel where there are no points to show after filtering; you can set ```render_if_no_points=False``` so that nothing is displayed / saved in this case. For example, if we filter to see bicycles and objects which are pushable or pullable, and there are no points belonging to those classes, then:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "nusc.render_pointcloud_in_image(my_sample['token'],\n", - " pointsensor_channel='LIDAR_TOP',\n", - " camera_channel='CAM_BACK',\n", - " render_intensity=False,\n", - " show_lidarseg=True,\n", - " filter_lidarseg_labels=[21, 11],\n", - " show_lidarseg_legend=True,\n", - " verbose=True,\n", - " render_if_no_points=False)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This might be useful when you want to render a bunch of sample tokens, but only for those which contain useful information (i.e. points belonging to certain classes) in them." - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -315,7 +284,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "When `render_mode='image', only frames which contain points (after the filter has been applied) will be saved as images." + "When `render_mode='image'`, only frames which contain points (after the filter has been applied) will be saved as images." ] }, { @@ -336,6 +305,7 @@ "source": [ "# nusc.render_scene_lidarseg(my_scene['token'], \n", "# filter_lidarseg_labels=[26, 9],\n", + "# dpi=100,\n", "# out_path=os.path.expanduser('~/Desktop/my_rendered_scene.avi'))" ] }, From 73bc63cf8e58443f3083f8be6ac38f13b062b854 Mon Sep 17 00:00:00 2001 From: whyekit-aptiv Date: Fri, 26 Jun 2020 15:00:36 +0800 Subject: [PATCH 2/2] Rephrasing --- python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb b/python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb index d2d74aa9..e477a6f2 100644 --- a/python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb +++ b/python-sdk/tutorials/nuscenes_lidarseg_tutorial.ipynb @@ -214,7 +214,7 @@ "metadata": {}, "source": [ "## Render a scene for a given camera sensor with lidarseg labels\n", - "You can also render an entire scene with the lidarseg labels for a camera of your choosing (the ```filter_lidarseg_labels``` and ```render_if_no_points``` arguments are present here as well)." + "You can also render an entire scene with the lidarseg labels for a camera of your choosing (the ```filter_lidarseg_labels``` argument can be used here as well)." ] }, {