|
60 | 60 | "plt.rcParams[\"figure.figsize\"] = [20, 10]\n", |
61 | 61 | "\n", |
62 | 62 | "# import the ZOD DevKit\n", |
63 | | - "from zod import ZodFrames\n", |
64 | | - "from zod import ZodSequences\n", |
65 | | - "\n", |
66 | 63 | "# import default constants\n", |
67 | 64 | "import zod.constants as constants\n", |
68 | | - "from zod.constants import Camera, Lidar, Anonymization, AnnotationProject\n", |
| 65 | + "from zod import ZodFrames, ZodSequences\n", |
| 66 | + "from zod.constants import AnnotationProject, Anonymization, Camera, Lidar\n", |
69 | 67 | "\n", |
70 | 68 | "# import useful data classes\n", |
71 | 69 | "from zod.data_classes import LidarData\n", |
|
427 | 425 | "# but for this we also need the calibrations of the sensor\n", |
428 | 426 | "calibrations = zod_frame.calibration\n", |
429 | 427 | "assert annotation_3d is not None\n", |
430 | | - "image = overlay_object_3d_box_on_image(\n", |
431 | | - " image, annotation_3d, calibrations, color=(255, 0, 0), line_thickness=10\n", |
432 | | - ")\n", |
| 428 | + "image = overlay_object_3d_box_on_image(image, annotation_3d, calibrations, color=(255, 0, 0), line_thickness=10)\n", |
433 | 429 | "\n", |
434 | 430 | "plt.figure()\n", |
435 | 431 | "plt.axis(\"off\")\n", |
|
570 | 566 | " np.hstack((pcd.points, pcd.intensity[:, None])),\n", |
571 | 567 | " (\n", |
572 | 568 | " np.array([obj.name for obj in object_annotations if obj.box3d]),\n", |
573 | | - " np.concatenate(\n", |
574 | | - " [obj.box3d.center[None, :] for obj in object_annotations if obj.box3d], axis=0\n", |
575 | | - " ),\n", |
576 | | - " np.concatenate(\n", |
577 | | - " [obj.box3d.size[None, :] for obj in object_annotations if obj.box3d], axis=0\n", |
578 | | - " ),\n", |
| 569 | + " np.concatenate([obj.box3d.center[None, :] for obj in object_annotations if obj.box3d], axis=0),\n", |
| 570 | + " np.concatenate([obj.box3d.size[None, :] for obj in object_annotations if obj.box3d], axis=0),\n", |
579 | 571 | " np.array([obj.box3d.orientation for obj in object_annotations if obj.box3d]),\n", |
580 | 572 | " ),\n", |
581 | 573 | ")" |
|
612 | 604 | "plt.show()\n", |
613 | 605 | "\n", |
614 | 606 | "# Plot aggregated Lidar point cloud\n", |
615 | | - "aggregated_lidar = zod_frame.get_aggregated_lidar(\n", |
616 | | - " num_before=10, num_after=0, timestamp=image_timestamp\n", |
617 | | - ")\n", |
| 607 | + "aggregated_lidar = zod_frame.get_aggregated_lidar(num_before=10, num_after=0, timestamp=image_timestamp)\n", |
618 | 608 | "lid_image = visualize_lidar_on_image(\n", |
619 | 609 | " aggregated_lidar,\n", |
620 | 610 | " zod_frame.calibration,\n", |
|
0 commit comments