https://github.com/jina-ai/executor-trimesh-loader
An executor that wraps trimesh for loading and using triangular meshes
https://github.com/jina-ai/executor-trimesh-loader
Last synced: 7 months ago
JSON representation
An executor that wraps trimesh for loading and using triangular meshes
- Host: GitHub
- URL: https://github.com/jina-ai/executor-trimesh-loader
- Owner: jina-ai
- Created: 2022-02-08T02:24:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-06T07:33:17.000Z (over 3 years ago)
- Last Synced: 2025-03-07T03:46:29.390Z (7 months ago)
- Language: Python
- Size: 18.5 MB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TrimeshLoader
An executor that wraps trimesh for loading triangular meshes, and extract cloud points.
Documents can either have
- a `uri`: that represents
- the path (e.g., `local disk`, `http(s)` path) to the mesh data file or
- the `base64` content, and the file format is specified in document tags, i.e., `doc.tags["file_format"]`.
- a `blob` obtained after converting the uri to buffer, and the format is specified in document tags, e.g., `doc.tags["file_format"]="glb"`.`TrimeshLoader` samples points from the 3D mesh object to create a point cloud and puts them in the tensor attribute of the Document.
## Usage
#### via Docker image (recommended)
```python
from jina import Flowf = Flow().add(uses='jinahub+docker://TrimeshLoader')
```#### via source code
```python
from jina import Flowf = Flow().add(uses='jinahub://TrimeshLoader')
```- To override `__init__` args & kwargs, use `.add(..., uses_with: {'key': 'value'})`
- To override class metas, use `.add(..., uses_metas: {'key': 'value})`