FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: adding field descriptions to predefined point cloud 3D document by punndcoder28 · Pull Request #1792 · docarray/docarray · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
25 changes: 21 additions & 4 deletions docarray/documents/point_cloud/point_cloud_3d.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import numpy as np

from pydantic import Field

from docarray.base_doc import BaseDoc
from docarray.documents.point_cloud.points_and_colors import PointsAndColors
from docarray.typing import AnyEmbedding, PointCloud3DUrl
Expand Down Expand Up @@ -107,10 +109,25 @@ class MultiModalDoc(BaseDoc):
```
"""

url: Optional[PointCloud3DUrl] = None
tensors: Optional[PointsAndColors] = None
embedding: Optional[AnyEmbedding] = None
bytes_: Optional[bytes] = None
url: Optional[PointCloud3DUrl] = Field(
description='URL to a file containing point cloud information. Can be remote (web) URL, or a local file path.',
example='https://people.sc.fsu.edu/~jburkardt/data/obj/al.obj',
default=None,
)
tensors: Optional[PointsAndColors] = Field(
description='A tensor object of 3D point cloud of type `PointsAndColors`.',
example=[[0, 0, 1], [1, 0, 1], [0, 1, 1]],
default=None,
)
embedding: Optional[AnyEmbedding] = Field(
description='Store an embedding: a vector representation of 3D point cloud.',
example=[1, 1, 1],
default=None,
)
bytes_: Optional[bytes] = Field(
description='Bytes representation of 3D point cloud.',
default=None,
)

@classmethod
def validate(
Expand Down

Back | FazBrowse Home | New Git URL