Skip to content

Sampling texture with nearest interpolation #805

@justanhduc

Description

@justanhduc

🚀 Feature

Currently, texture sampling is done with bilinear interpolation. It's great if there is an option to choose which interpolation to be done too.

Motivation

In some case, for e.g. when the texture image is segmentation labels, users may prefer nearest to prevent class labels from being interpolated into nonsense values.

Pitch

textures = TexturesUV(texture_img, face_uvs, verts_uv, interp_mode='nearest')

I can make a PR if this request is approved. Thanks!

Metadata

Metadata

Assignees

Labels

how toHow to use PyTorch3D in my project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions