From c0dc8525a4207f6e8373b2d7a7d849d36a9afc56 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 21:08:20 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/devkit_tutorial.ipynb | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/examples/devkit_tutorial.ipynb b/examples/devkit_tutorial.ipynb index 1906070..15b144f 100644 --- a/examples/devkit_tutorial.ipynb +++ b/examples/devkit_tutorial.ipynb @@ -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", @@ -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", @@ -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", ")" @@ -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",