15 Commits

Author SHA1 Message Date
Jeremy Reizenstein
83bacda8fb lint
Summary: Fix recent flake complaints

Reviewed By: MichaelRamamonjisoa

Differential Revision: D51811912

fbshipit-source-id: 65183f5bc7058da910e4d5a63b2250ce8637f1cc
2023-12-04 13:43:34 -08:00
YangHai
55638f3bae Support reading uv and uv map for ply format if texture_uv exists in ply file (#1100)
Summary:
When the ply format looks as follows:
  ```
comment TextureFile ***.png
element vertex 892
property double x
property double y
property double z
property double nx
property double ny
property double nz
property double texture_u
property double texture_v
```
`MeshPlyFormat` class will read uv from the ply file and read the uv map as commented as TextureFile.

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1100

Reviewed By: MichaelRamamonjisoa

Differential Revision: D50885176

Pulled By: bottler

fbshipit-source-id: be75b1ec9a17a1ed87dbcf846a9072ea967aec37
2023-11-14 07:44:14 -08:00
Jeremy Reizenstein
34f648ede0 move targets
Summary: Move testing targets from pytorch3d/tests/TARGETS to pytorch3d/TARGETS.

Reviewed By: shapovalov

Differential Revision: D36186940

fbshipit-source-id: a4c52c4d99351f885e2b0bf870532d530324039b
2022-05-25 06:16:03 -07:00
Jeremy Reizenstein
90d00f1b2b PLY heterogenous faces fix
Summary: PLY with mixture of triangle and quadrilateral faces was failing.

Reviewed By: gkioxari

Differential Revision: D36592981

fbshipit-source-id: 5373edb2f38389ac646a75fd2e1fa7300eb8d054
2022-05-24 01:40:22 -07:00
Jeremy Reizenstein
9b5a3ffa6c PLY with uint face data (#1104)
Summary: Fix assumption that face indices are signed in the PLY file, as reported in #1104.

Reviewed By: nikhilaravi

Differential Revision: D34892598

fbshipit-source-id: a8b23bfac1357bdc11bbbf752098319142239804
2022-03-16 05:42:34 -07:00
Jeremy Reizenstein
9eeb456e82 Update license for company name
Summary: Update all FB license strings to the new format.

Reviewed By: patricklabatut

Differential Revision: D33403538

fbshipit-source-id: 97a4596c5c888f3c54f44456dc07e718a387a02c
2022-01-04 11:43:38 -08:00
Jeremy Reizenstein
dd76b41014 save colors as uint8 in PLY
Summary: Allow saving colors as 8bit when writing .ply files.

Reviewed By: patricklabatut, nikitos9000

Differential Revision: D30905312

fbshipit-source-id: 44500982c9ed6d6ee901e04f9623e22792a0e7f7
2021-09-30 00:48:52 -07:00
Patrick Labatut
af93f34834 License lint codebase
Summary: License lint codebase

Reviewed By: theschnitz

Differential Revision: D29001799

fbshipit-source-id: 5c59869911785b0181b1663bbf430bc8b7fb2909
2021-06-22 03:45:27 -07:00
Jeremy Reizenstein
354a1808ff Fix save_ply with noncontiguous faces
Summary: As noted in #710, save_ply was failing with some values of the faces tensor. It was assuming the faces were contiguous in using view() to change them. Here we avoid doing that.

Reviewed By: patricklabatut

Differential Revision: D29159655

fbshipit-source-id: 47214a7ce915bab8d81f109c2b97cde464fd57d8
2021-06-21 06:05:45 -07:00
Jeremy Reizenstein
6fa66f5534 PLY load normals
Summary: Add ability to load normals when they are present in a PLY file.

Reviewed By: nikhilaravi

Differential Revision: D26458971

fbshipit-source-id: 658270b611f7624eab4f5f62ff438038e1d25723
2021-05-04 05:36:51 -07:00
Jeremy Reizenstein
e9f4e0d086 PLY color scaling
Summary: When a PLY file contains colors in byte format, these are now scaled from 0..255 to [0,1], as they should be

Reviewed By: gkioxari

Differential Revision: D27765254

fbshipit-source-id: 526b5f5149d5e8cbffd7412b411be52c935fa4ad
2021-05-04 05:36:51 -07:00
Jeremy Reizenstein
6c3fe952d1 PLY TexturesVertex loading
Summary:
Include TexturesVertex colors when loading and saving Meshes to PLY files.

A couple of other improvements to the internals of ply_io, including using `None` instead of empty tensors for some missing data.

Reviewed By: gkioxari

Differential Revision: D27765260

fbshipit-source-id: b9857dc777c244b9d7d6643b608596d31435ecda
2021-05-04 05:36:51 -07:00
Jeremy Reizenstein
124bb5e391 spelling
Summary: Collection of spelling things, mostly in docs / tutorials.

Reviewed By: gkioxari

Differential Revision: D26101323

fbshipit-source-id: 652f62bc9d71a4ff872efa21141225e43191353a
2021-04-09 09:58:54 -07:00
Jeremy Reizenstein
cc08c6b288 CI fixes
Summary:
Update `main` build to latest CircleCI image - Ubuntu 2020.04.

Avoid torch.logical_or and logical_and for PyTorch 1.4 compatibility.

Also speed up the test run with Pytorch 1.4.0 (which has no ninja) by not setting NVCC_FLAGS for it.

Reviewed By: theschnitz

Differential Revision: D27262327

fbshipit-source-id: ddc359d134b1dc755f8b20bd3f33bb080cb3a0e1
2021-03-23 14:25:25 -07:00
Jeremy Reizenstein
0345f860d4 Loading/saving meshes to OFF files.
Summary: Implements the ascii OFF file format. This was discussed in https://github.com/facebookresearch/pytorch3d/issues/216

Reviewed By: theschnitz

Differential Revision: D25788834

fbshipit-source-id: c141d1f4ba3bad24e3c1f280a20aee782bfd74d6
2021-02-12 07:05:55 -08:00