1. 04 May, 2021 3 commits
    • Jeremy Reizenstein's avatar
      PLY load normals · 6fa66f55
      Jeremy Reizenstein authored
      Summary: Add ability to load normals when they are present in a PLY file.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D26458971
      
      fbshipit-source-id: 658270b611f7624eab4f5f62ff438038e1d25723
      6fa66f55
    • Jeremy Reizenstein's avatar
      PLY color scaling · e9f4e0d0
      Jeremy Reizenstein authored
      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
      e9f4e0d0
    • Jeremy Reizenstein's avatar
      PLY TexturesVertex loading · 6c3fe952
      Jeremy Reizenstein authored
      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
      6c3fe952
  2. 09 Apr, 2021 1 commit
    • Jeremy Reizenstein's avatar
      spelling · 124bb5e3
      Jeremy Reizenstein authored
      Summary: Collection of spelling things, mostly in docs / tutorials.
      
      Reviewed By: gkioxari
      
      Differential Revision: D26101323
      
      fbshipit-source-id: 652f62bc9d71a4ff872efa21141225e43191353a
      124bb5e3
  3. 23 Mar, 2021 1 commit
    • Jeremy Reizenstein's avatar
      CI fixes · cc08c6b2
      Jeremy Reizenstein authored
      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
      cc08c6b2
  4. 12 Feb, 2021 1 commit
  5. 07 Jan, 2021 3 commits
    • Jeremy Reizenstein's avatar
      PLY pointcloud loading · 95707fba
      Jeremy Reizenstein authored
      Summary:
      Allow PLY files to not contain faces. Allow loading pointclouds with color, at least encoded according to the way of some cloudcompare examples.
      
      TODO: Allow vertex normals to be read, and allow vertex colors to be written. Make the return type of load_ply something more user friendly, like a dict.
      
      Noticed in https://github.com/facebookresearch/pytorch3d/issues/209
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D22573314
      
      fbshipit-source-id: 72ba1f7c6417f5dfc83f2ebf359eff017057635c
      95707fba
    • Jeremy Reizenstein's avatar
      Read heterogenous nonlist PLY properties as arrays · 3b9fbfc0
      Jeremy Reizenstein authored
      Summary:
      In the original implementation, I had considered PLY properties where there are mixed types of elements in a property to be rare and basically unimportant, so the implementation is very naive.
      
      If we want to support pointcloud PLY files, we need to handle at least the subcase where there are no lists efficiently because this seems to be very common there.
      
      Reviewed By: nikhilaravi, gkioxari
      
      Differential Revision: D22573315
      
      fbshipit-source-id: db6f29446d4e555a2e2b37d38c8e4450d061465b
      3b9fbfc0
    • Jeremy Reizenstein's avatar
      add existing mesh formats to pluggable · 89532a87
      Jeremy Reizenstein authored
      Summary: We already have code for obj and ply formats. Here we actually make it available in `IO.load_mesh` and `IO.save_mesh`.
      
      Reviewed By: theschnitz, nikhilaravi
      
      Differential Revision: D25400650
      
      fbshipit-source-id: f26d6d7fc46c48634a948eea4d255afad13b807b
      89532a87
  6. 24 Dec, 2020 1 commit
    • Jeremy Reizenstein's avatar
      PathManager passing · 25c065e9
      Jeremy Reizenstein authored
      Summary:
      Make no internal functions inside pytorch3d/io interpret str paths except using a PathManager from iopath which they have been given. This means we no longer use any global PathManager object and we no longer use fvcore's deprecated file_io.
      
      To preserve the APIs, various top level functions create their own default-initialized PathManager object if they are not provided one.
      
      Reviewed By: theschnitz
      
      Differential Revision: D25372969
      
      fbshipit-source-id: c176ee31439645fa54a157d6f1aef18b09501569
      25c065e9
  7. 21 Sep, 2020 1 commit
    • Jeremy Reizenstein's avatar
      save_ply binary · 197f1d62
      Jeremy Reizenstein authored
      Summary:
      Make save_ply save to binary instead of ascii. An option makes the previous functionality available. save_ply's API accepts a stream, but this is undocumented; that stream must now be a binary stream not a text stream.
      
      Avoiding warnings about making tensors from immutable numpy arrays.
      
      Possible performance improvement when reading binary files.
      
      Fix reading zero-length binary lists.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D22333118
      
      fbshipit-source-id: b423dfd3da46e047bead200255f47a7707306811
      197f1d62
  8. 20 May, 2020 1 commit
    • Jeremy Reizenstein's avatar
      Alternative type names in PLY #205 · f2d1d2db
      Jeremy Reizenstein authored
      Summary: Add ability to decode ply files which use types like int32.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D21639208
      
      fbshipit-source-id: 0ede7d4aa353a6e940446680a18e7ac0c48fafee
      f2d1d2db
  9. 17 Apr, 2020 1 commit
    • David Novotny's avatar
      Pointcloud normals estimation. · 365945b1
      David Novotny authored
      Summary: Estimates normals of a point cloud.
      
      Reviewed By: gkioxari
      
      Differential Revision: D20860182
      
      fbshipit-source-id: 652ec2743fa645e02c01ffa37c2971bf27b89cef
      365945b1
  10. 01 Apr, 2020 1 commit
    • Patrick Labatut's avatar
      Fix saving / loading empty PLY meshes · 83feed56
      Patrick Labatut authored
      Summary:
      Similar to D20392526, PLY files without vertices or faces should be allowed:
      - a PLY with only vertices can represent a point cloud
      - a PLY without any vertex or face is just empty
      - a PLY with faces referencing inexistent vertices has invalid data
      
      Reviewed By: gkioxari
      
      Differential Revision: D20400330
      
      fbshipit-source-id: 35a5f072603fd221f382c7faad5f37c3e0b49bb1
      83feed56
  11. 29 Mar, 2020 1 commit
    • Patrick Labatut's avatar
      Address black + isort fbsource linter warnings · d57daa6f
      Patrick Labatut authored
      Summary: Address black + isort fbsource linter warnings from D20558374 (previous diff)
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20558373
      
      fbshipit-source-id: d3607de4a01fb24c0d5269634563a7914bddf1c8
      d57daa6f
  12. 13 Mar, 2020 1 commit
    • Patrick Labatut's avatar
      Add more complex mesh I/O benchmarks · d91c1d36
      Patrick Labatut authored
      Summary: Add more complex mesh I/O benchmarks: simple yet non-trivial procedural donut mesh
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20390726
      
      fbshipit-source-id: b28b7e3a7f1720823c6bd24faabf688bb0127b7d
      d91c1d36
  13. 12 Mar, 2020 3 commits
    • Patrick Labatut's avatar
      Simplify mesh I/O benchmarking methods · 94fc862f
      Patrick Labatut authored
      Summary: Rename mesh I/O benchmarking methods: always (re-)create file-like object and directly return a lambda
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20390723
      
      fbshipit-source-id: b45236360869cccdf3d5458a0aafb3ebe269babe
      94fc862f
    • Patrick Labatut's avatar
      Rename mesh I/O benchmarks and associated methods · 797e468e
      Patrick Labatut authored
      Summary:
      Rename mesh I/O benchmarks and associated methods:
      - add `simple` qualifier (benchmark on more realistic mesh data to be added later)
      - align naming between OBJ and PLY
      - prefix with `bm_` to make the benchmarking purpose clear(er)
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20390764
      
      fbshipit-source-id: 7714520abfcfe1125067f3c52f7ce19bca359574
      797e468e
    • Patrick Labatut's avatar
      Remove shebang line when not strictly required · 3c71ab64
      Patrick Labatut authored
      Summary: The shebang line `#!<path to interpreter>` is only required for Python scripts, so remove it on source files for class or function definitions. Additionally explicitly mark as executable the actual Python scripts in the codebase.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20095778
      
      fbshipit-source-id: d312599fba485e978a243292f88a180d71e1b55a
      3c71ab64
  14. 23 Jan, 2020 1 commit