-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat: add key_line_3d and key_point_3d annotation objects and structures #135
feat: add key_line_3d and key_point_3d annotation objects and structures #135
Conversation
3ae01c5
to
24295e2
Compare
CC: @wadimkehl |
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.
Thanks Nehal! Just some minor things :)
Reviewed 13 of 13 files at r1, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @nehalmamgain)
dgp/annotations/key_line_3d_annotation.py
line 34 at r1 (raw file):
line, KeyLine3D ), f"Can only instantate an annotation from a list of KeyLine3D, not {type(line)}" self.linelist = linelist
Do we intent for users to access this "publicly," as something like 3d_anno_list.linelist
? Similar for pointlist
in KeyPoint3DAnnotationList
.
dgp/annotations/key_line_3d_annotation.py
line 113 at r1 (raw file):
def render(self): """TODO: Batch rendering function for keylines."""
Can we please add attribution to this TODO? Same for the one in they keypoint 3D class. If it's not clear who should do this work, we can just remove the TODO
(but leave the part about batch rendering).
dgp/utils/structures/key_line_3d.py
line 8 at r1 (raw file):
import dgp.proto.annotations_pb2 as annotations_pb2 GENERIC_OBJECT_CLASS = 1
Without seeing how this is used, it's not clear that this is an ID. Could we call it GENERIC_OBJECT_CLASS_ID
please? We could also add docs, but I think extending the name is enough. Same for the constant in the corresponding key point 3d file.
dgp/utils/structures/key_line_3d.py
line 17 at r1 (raw file):
---------- line: np.ndarray[np.float32] Array of N*3 floats describing keyline coordinates [x, y, z].
I don't remember if we use representations like N*3
elsewhere in DGP. Do you mean the equivalent of (N, 3)
? If so, can we please use the latter representation? This would help document the incoming shape.
dgp/utils/structures/key_line_3d.py
line 89 at r1 (raw file):
"""Serialize keyline to proto object. NOTE: Does not serialize class or instance information, just line geometry.
Let's remove NOTE:
please, as docs are notes ;) Same for the docs in the corresponding key point 3d file.
tests/data/dgp/key_line_3d/scene_000000/rgb/lcm_25tm/000000000000000005.png
line 0 at r1 (raw file):
Is there a way to reduce the file size from its current 1.2 MB and still have the image be useful? Basically as small as possible is preferred.
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.
+reviewer:@kuanleetri
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @kuanleetri and @nehalmamgain)
Thanks for your review! Making the changes.
Let me just remove the image. The tests are for checking loading annotation, not loading images (those tests exist on this repo) so the image isn't needed. |
May I also ask reviewers for review on #136 ? @kuanleetri Since PR authors cannot request reviewers on the PR itself (unless they have Write/Admin privileges), could you please also suggest if there is any existing workflow where PR authors can request for review. |
24295e2
to
1919a51
Compare
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.
Reviewable status: 6 of 13 files reviewed, 6 unresolved discussions (waiting on @kuanleetri and @tk-woven)
dgp/annotations/key_line_3d_annotation.py
line 34 at r1 (raw file):
Previously, tk-woven wrote…
Do we intent for users to access this "publicly," as something like
3d_anno_list.linelist
? Similar forpointlist
inKeyPoint3DAnnotationList
.
Done.
dgp/annotations/key_line_3d_annotation.py
line 113 at r1 (raw file):
Previously, tk-woven wrote…
Can we please add attribution to this TODO? Same for the one in they keypoint 3D class. If it's not clear who should do this work, we can just remove the
TODO
(but leave the part about batch rendering).
Done.
dgp/utils/structures/key_line_3d.py
line 8 at r1 (raw file):
Previously, tk-woven wrote…
Without seeing how this is used, it's not clear that this is an ID. Could we call it
GENERIC_OBJECT_CLASS_ID
please? We could also add docs, but I think extending the name is enough. Same for the constant in the corresponding key point 3d file.
Done.
dgp/utils/structures/key_line_3d.py
line 17 at r1 (raw file):
Previously, tk-woven wrote…
I don't remember if we use representations like
N*3
elsewhere in DGP. Do you mean the equivalent of(N, 3)
? If so, can we please use the latter representation? This would help document the incoming shape.
Right, I just wrote it like in Maths. Done.
dgp/utils/structures/key_line_3d.py
line 89 at r1 (raw file):
Previously, tk-woven wrote…
Let's remove
NOTE:
please, as docs are notes ;) Same for the docs in the corresponding key point 3d file.
Done.
tests/data/dgp/key_line_3d/scene_000000/rgb/lcm_25tm/000000000000000005.png
line at r1 (raw file):
Previously, tk-woven wrote…
Is there a way to reduce the file size from its current 1.2 MB and still have the image be useful? Basically as small as possible is preferred.
Done.
I clicked on re-request button for review for tk-woven, and this automatically removed @kuanleetri |
1919a51
to
9b69661
Compare
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.
Thanks Nehal! I've re-added Kuan. Things LGTM here, but as we only require 1 approval before merge, I'll defer to Kuan to approve since this involves a schema update.
Reviewed 6 of 7 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @kuanleetri)
Dismissing my own review to not block merge upon others' approvals
Thanks Tyler! @kuanleetri I would like to merge this by EOD (with comments address ofc) to unblock my experimentation. If any changes are needed later, I would be happy to address them in another PR. |
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.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @kuanleetri)
Thank you kindly! 🙇♀️ |
This PR unblocks the DGP loader for 3D lane detection.
It adds the necesary structures for KeyLine3D and KeyPoint3D, along with tests.
This change is