Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 18, 2024
1 parent c16109d commit 3023a13
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions examples/devkit_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@
"plt.rcParams[\"figure.figsize\"] = [20, 10]\n",
"\n",
"# import the ZOD DevKit\n",
"from zod import ZodFrames\n",
"from zod import ZodSequences\n",
"\n",
"# import default constants\n",
"import zod.constants as constants\n",
"from zod.constants import Camera, Lidar, Anonymization, AnnotationProject\n",
"from zod import ZodFrames, ZodSequences\n",
"from zod.constants import AnnotationProject, Anonymization, Camera, Lidar\n",
"\n",
"# import useful data classes\n",
"from zod.data_classes import LidarData\n",
Expand Down Expand Up @@ -427,9 +425,7 @@
"# but for this we also need the calibrations of the sensor\n",
"calibrations = zod_frame.calibration\n",
"assert annotation_3d is not None\n",
"image = overlay_object_3d_box_on_image(\n",
" image, annotation_3d, calibrations, color=(255, 0, 0), line_thickness=10\n",
")\n",
"image = overlay_object_3d_box_on_image(image, annotation_3d, calibrations, color=(255, 0, 0), line_thickness=10)\n",
"\n",
"plt.figure()\n",
"plt.axis(\"off\")\n",
Expand Down Expand Up @@ -570,12 +566,8 @@
" np.hstack((pcd.points, pcd.intensity[:, None])),\n",
" (\n",
" np.array([obj.name for obj in object_annotations if obj.box3d]),\n",
" np.concatenate(\n",
" [obj.box3d.center[None, :] for obj in object_annotations if obj.box3d], axis=0\n",
" ),\n",
" np.concatenate(\n",
" [obj.box3d.size[None, :] for obj in object_annotations if obj.box3d], axis=0\n",
" ),\n",
" np.concatenate([obj.box3d.center[None, :] for obj in object_annotations if obj.box3d], axis=0),\n",
" np.concatenate([obj.box3d.size[None, :] for obj in object_annotations if obj.box3d], axis=0),\n",
" np.array([obj.box3d.orientation for obj in object_annotations if obj.box3d]),\n",
" ),\n",
")"
Expand Down Expand Up @@ -612,9 +604,7 @@
"plt.show()\n",
"\n",
"# Plot aggregated Lidar point cloud\n",
"aggregated_lidar = zod_frame.get_aggregated_lidar(\n",
" num_before=10, num_after=0, timestamp=image_timestamp\n",
")\n",
"aggregated_lidar = zod_frame.get_aggregated_lidar(num_before=10, num_after=0, timestamp=image_timestamp)\n",
"lid_image = visualize_lidar_on_image(\n",
" aggregated_lidar,\n",
" zod_frame.calibration,\n",
Expand Down

0 comments on commit 3023a13

Please sign in to comment.