Patrick Labatut
d57daa6f85
Address black + isort fbsource linter warnings
...
Summary: Address black + isort fbsource linter warnings from D20558374 (previous diff)
Reviewed By: nikhilaravi
Differential Revision: D20558373
fbshipit-source-id: d3607de4a01fb24c0d5269634563a7914bddf1c8
2020-03-29 14:51:02 -07:00
Nikhila Ravi
5d3cc3569a
Rendering texturing fixes
...
Summary:
Fix errors raised by issue on GitHub - extending mesh textures + rendering with Gourad and Phong shaders.
https://github.com/facebookresearch/pytorch3d/issues/97
Reviewed By: gkioxari
Differential Revision: D20319610
fbshipit-source-id: d1c692ff0b9397a77a9b829c5c731790de70c09f
2020-03-17 08:58:40 -07:00
Patrick Labatut
3c71ab64cc
Remove shebang line when not strictly required
...
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
2020-03-12 10:39:44 -07:00
Jeremy Reizenstein
fb97ab104e
getitem for textures
...
Summary: Make Meshes.__getitem__ carry texture information to the new mesh.
Reviewed By: gkioxari
Differential Revision: D20283976
fbshipit-source-id: d9ee0580c11ac5b4384df9d8158a07e6eb8d00fe
2020-03-11 07:45:44 -07:00
Georgia Gkioxari
a3baa367e3
face areas backward
...
Summary:
Added backward for mesh face areas & normals. Exposed it as a layer. Replaced the computation with the new op in Meshes and in Sample Points.
Current issue: Circular imports. I moved the import of the op in meshes inside the function scope.
Reviewed By: jcjohnson
Differential Revision: D19920082
fbshipit-source-id: d213226d5e1d19a0c8452f4d32771d07e8b91c0a
2020-02-20 11:11:33 -08:00
Georgia Gkioxari
29cd181a83
CPU implem for face areas normals
...
Summary:
Added cpu implementation for face areas normals. Moved test and bm to separate functions.
```
Benchmark Avg Time(μs) Peak Time(μs) Iterations
--------------------------------------------------------------------------------
FACE_AREAS_NORMALS_2_100_300_False 196 268 2550
FACE_AREAS_NORMALS_2_100_300_True 106 179 4733
FACE_AREAS_NORMALS_2_100_3000_False 1447 1630 346
FACE_AREAS_NORMALS_2_100_3000_True 107 178 4674
FACE_AREAS_NORMALS_2_1000_300_False 201 309 2486
FACE_AREAS_NORMALS_2_1000_300_True 107 186 4673
FACE_AREAS_NORMALS_2_1000_3000_False 1451 1636 345
FACE_AREAS_NORMALS_2_1000_3000_True 107 186 4655
FACE_AREAS_NORMALS_10_100_300_False 767 918 653
FACE_AREAS_NORMALS_10_100_300_True 106 167 4712
FACE_AREAS_NORMALS_10_100_3000_False 7036 7754 72
FACE_AREAS_NORMALS_10_100_3000_True 113 164 4445
FACE_AREAS_NORMALS_10_1000_300_False 748 947 669
FACE_AREAS_NORMALS_10_1000_300_True 108 169 4638
FACE_AREAS_NORMALS_10_1000_3000_False 7069 7783 71
FACE_AREAS_NORMALS_10_1000_3000_True 108 172 4646
FACE_AREAS_NORMALS_32_100_300_False 2286 2496 219
FACE_AREAS_NORMALS_32_100_300_True 108 180 4631
FACE_AREAS_NORMALS_32_100_3000_False 23184 24369 22
FACE_AREAS_NORMALS_32_100_3000_True 159 213 3147
FACE_AREAS_NORMALS_32_1000_300_False 2414 2645 208
FACE_AREAS_NORMALS_32_1000_300_True 112 197 4480
FACE_AREAS_NORMALS_32_1000_3000_False 21687 22964 24
FACE_AREAS_NORMALS_32_1000_3000_True 141 211 3540
--------------------------------------------------------------------------------
Benchmark Avg Time(μs) Peak Time(μs) Iterations
--------------------------------------------------------------------------------
FACE_AREAS_NORMALS_TORCH_2_100_300_False 5465 5782 92
FACE_AREAS_NORMALS_TORCH_2_100_300_True 1198 1351 418
FACE_AREAS_NORMALS_TORCH_2_100_3000_False 48228 48869 11
FACE_AREAS_NORMALS_TORCH_2_100_3000_True 1186 1304 422
FACE_AREAS_NORMALS_TORCH_2_1000_300_False 5556 6097 90
FACE_AREAS_NORMALS_TORCH_2_1000_300_True 1200 1328 417
FACE_AREAS_NORMALS_TORCH_2_1000_3000_False 48683 50016 11
FACE_AREAS_NORMALS_TORCH_2_1000_3000_True 1185 1306 422
FACE_AREAS_NORMALS_TORCH_10_100_300_False 24215 25097 21
FACE_AREAS_NORMALS_TORCH_10_100_300_True 1150 1314 435
FACE_AREAS_NORMALS_TORCH_10_100_3000_False 232605 234952 3
FACE_AREAS_NORMALS_TORCH_10_100_3000_True 1193 1314 420
FACE_AREAS_NORMALS_TORCH_10_1000_300_False 24912 25343 21
FACE_AREAS_NORMALS_TORCH_10_1000_300_True 1216 1330 412
FACE_AREAS_NORMALS_TORCH_10_1000_3000_False 239907 241253 3
FACE_AREAS_NORMALS_TORCH_10_1000_3000_True 1226 1333 408
FACE_AREAS_NORMALS_TORCH_32_100_300_False 73991 75776 7
FACE_AREAS_NORMALS_TORCH_32_100_300_True 1193 1339 420
FACE_AREAS_NORMALS_TORCH_32_100_3000_False 728932 728932 1
FACE_AREAS_NORMALS_TORCH_32_100_3000_True 1186 1359 422
FACE_AREAS_NORMALS_TORCH_32_1000_300_False 76385 79129 7
FACE_AREAS_NORMALS_TORCH_32_1000_300_True 1165 1310 430
FACE_AREAS_NORMALS_TORCH_32_1000_3000_False 753276 753276 1
FACE_AREAS_NORMALS_TORCH_32_1000_3000_True 1205 1340 415
--------------------------------------------------------------------------------
```
Reviewed By: bottler, jcjohnson
Differential Revision: D19864385
fbshipit-source-id: 3a87ae41a8e3ab5560febcb94961798f2e09dfb8
2020-02-13 11:42:48 -08:00
Jeremy Reizenstein
8fe65d5f56
Single function to load meshes from OBJs. join_meshes.
...
Summary:
Create the textures and the Meshes object from OBJ files in a single call.
There is functionality in OBJ files (like normals) which is ignored by this function.
Reviewed By: gkioxari
Differential Revision: D19691699
fbshipit-source-id: e26442ed80ff231b65b17d6c54c9d41e22b4e4a3
2020-02-13 03:38:07 -08:00
facebook-github-bot
dbf06b504b
Initial commit
...
fbshipit-source-id: ad58e416e3ceeca85fae0583308968d04e78fe0d
2020-01-23 11:53:46 -08:00