Skip to content

feat: add 3d data handling of mesh vertices and faces#709

Merged
hanxiao merged 15 commits intomainfrom
feat-3d-data-handling-of-meshes-708
Nov 2, 2022
Merged

feat: add 3d data handling of mesh vertices and faces#709
hanxiao merged 15 commits intomainfrom
feat-3d-data-handling-of-meshes-708

Conversation

@anna-charlotte
Copy link
Copy Markdown
Contributor

@anna-charlotte anna-charlotte commented Oct 31, 2022

Goals:

  • Currently, DocArray only supports point clouds for 3d data representation.
  • We want to add functions to additionally support 3d data representation of meshes, which include more information about a 3d object than a point cloud, and seem to be more commonly used. Meshes basically consist of a vertices tensor and a faces tensor, which I plan to load to load to chunks, i.e.:
from docarray import Document

doc = Document(uri='some/uri')
doc.load_uri_to_vertices_and_faces_tensors()

# resulting in:
# doc = Document(
#     uri='some/uri', 
#     chunks=[
#         Document(name='vertices', tensor=sometensor), 
#         Document(name='faces', tensor=sometensor)
#     ]
# )
  • add load_uri_to_vertices_and_faces_chunk_tensors + tests
  • load vertices+faces to point cloud
  • check and update documentation, if required. See guide

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 31, 2022

Codecov Report

Merging #709 (8aff159) into main (4bd9651) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #709      +/-   ##
==========================================
+ Coverage   88.15%   88.20%   +0.04%     
==========================================
  Files         134      134              
  Lines        6552     6578      +26     
==========================================
+ Hits         5776     5802      +26     
  Misses        776      776              
Flag Coverage Δ
docarray 88.20% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
docarray/document/mixins/mesh.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@anna-charlotte anna-charlotte marked this pull request as ready for review November 1, 2022 11:04
Copy link
Copy Markdown
Member

@alaeddine-13 alaeddine-13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add documentation here
https://docarray.jina.ai/datatypes/mesh/

:width: 50%
```

## Mesh
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the section title is 3D Mesh above, and then we explain point cloud and go back to mesh.
It feels a bit weird to me, maybe we should name this one Vertices and Faces representation and the other one point cloud representation ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, and maybe also move the mesh representation (vertices and faces) up, so that first vertices and faces are introduced, and than point cloud, since the point cloud contains less information than the vertices-faces-representation. What do u think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I agree

Copy link
Copy Markdown
Member

@alaeddine-13 alaeddine-13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, let's wait for @NicholasDunham's feedback

Copy link
Copy Markdown
Member

@samsja samsja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm to me as well. @JohannesMessner what do u think about the naming of the function ?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 2, 2022

📝 Docs are deployed on https://ft-feat-3d-data-handling-of-meshes-708--jina-docs.netlify.app 🎉

@hanxiao hanxiao merged commit 9a3e570 into main Nov 2, 2022
@hanxiao hanxiao deleted the feat-3d-data-handling-of-meshes-708 branch November 2, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 3d data handling of meshes consisting of vertices and faces to DocArray

6 participants