Add files using upload-large-folder tool
Browse files- msx_assets/object/002_master_chef_can/textured.obj +0 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/.github/ISSUE_TEMPLATE/questions-help.md +21 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/dev/linter.sh +40 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/dev/run_tutorials.sh +56 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/dev/test_list.py +65 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/global_encoder/autodecoder.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/global_encoder/global_encoder.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/global_encoder/index.rst +7 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/implicit_function/utils.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/view_pooler/feature_aggregator.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/renderer/mesh/clip.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/data_basics.rst +29 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/datasets.rst +29 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/evaluation.rst +14 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/index.rst +10 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/models/view_pooler/feature_aggregator.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/models/view_pooler/index.rst +8 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/models/view_pooler/view_pooler.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/models/view_pooler/view_sampler.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/tools.rst +64 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/io.rst +7 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/blending.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/camera_conversions.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/camera_utils.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/cameras.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/compositing.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/harmonic_embedding.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/index.rst +11 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/raymarching.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/raysampling.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/renderer.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/sample_pdf.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/utils.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/index.rst +19 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/lighting.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/materials.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/mesh/index.rst +13 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/mesh/rasterize_meshes.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/mesh/renderer.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/compositor.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/index.rst +10 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/rasterize_points.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/rasterizer.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/renderer.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/splatter_blend.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/utils.rst +9 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/transforms.rst +7 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/projects/__init__.py +5 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/pytorch3d/ops/laplacian_matrices.py +177 -0
- project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/pytorch3d/ops/mesh_face_areas_normals.py +68 -0
msx_assets/object/002_master_chef_can/textured.obj
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/.github/ISSUE_TEMPLATE/questions-help.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: "❓ Questions"
|
| 3 |
+
about: How do I do X with PyTorch3D? How does PyTorch3D do X?
|
| 4 |
+
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
## ❓ Questions on how to use PyTorch3D
|
| 8 |
+
|
| 9 |
+
<!-- A clear and concise description of the question you need help with. -->
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
NOTE: Please look at the existing list of Issues tagged with the label ['question`](https://github.com/facebookresearch/pytorch3d/issues?q=label%3Aquestion) or ['how-to`](https://github.com/facebookresearch/pytorch3d/issues?q=label%3A%22how+to%22). **Only open a new issue if you cannot find an answer there**.
|
| 13 |
+
|
| 14 |
+
Also note the following:
|
| 15 |
+
|
| 16 |
+
1. If you encountered any errors or unexpected issues while using PyTorch3D and need help resolving them,
|
| 17 |
+
please use the "Bugs / Unexpected behaviors" issue template.
|
| 18 |
+
|
| 19 |
+
2. We do not answer general machine learning / computer vision questions that are not specific to
|
| 20 |
+
PyTorch3D, such as how a model works or what algorithm/methods can be
|
| 21 |
+
used to achieve X.
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/dev/linter.sh
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash -e
|
| 2 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 3 |
+
# All rights reserved.
|
| 4 |
+
#
|
| 5 |
+
# This source code is licensed under the BSD-style license found in the
|
| 6 |
+
# LICENSE file in the root directory of this source tree.
|
| 7 |
+
|
| 8 |
+
# Run this script at project root by "./dev/linter.sh" before you commit
|
| 9 |
+
|
| 10 |
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
| 11 |
+
DIR=$(dirname "${DIR}")
|
| 12 |
+
|
| 13 |
+
if [[ -f "${DIR}/TARGETS" ]]
|
| 14 |
+
then
|
| 15 |
+
pyfmt "${DIR}"
|
| 16 |
+
else
|
| 17 |
+
# run usort externally only
|
| 18 |
+
echo "Running usort..."
|
| 19 |
+
usort "${DIR}"
|
| 20 |
+
fi
|
| 21 |
+
|
| 22 |
+
echo "Running black..."
|
| 23 |
+
black "${DIR}"
|
| 24 |
+
|
| 25 |
+
echo "Running flake..."
|
| 26 |
+
flake8 "${DIR}" || true
|
| 27 |
+
|
| 28 |
+
echo "Running clang-format ..."
|
| 29 |
+
clangformat=$(command -v clang-format-8 || echo clang-format)
|
| 30 |
+
find "${DIR}" -regex ".*\.\(cpp\|c\|cc\|cu\|cuh\|cxx\|h\|hh\|hpp\|hxx\|tcc\|mm\|m\)" -print0 | xargs -0 "${clangformat}" -i
|
| 31 |
+
|
| 32 |
+
# Run arc and pyre internally only.
|
| 33 |
+
if [[ -f "${DIR}/TARGETS" ]]
|
| 34 |
+
then
|
| 35 |
+
(cd "${DIR}"; command -v arc > /dev/null && arc lint) || true
|
| 36 |
+
|
| 37 |
+
echo "Running pyre..."
|
| 38 |
+
echo "To restart/kill pyre server, run 'pyre restart' or 'pyre kill' in fbcode/"
|
| 39 |
+
( cd ~/fbsource/fbcode; pyre -l vision/fair/pytorch3d/ )
|
| 40 |
+
fi
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/dev/run_tutorials.sh
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/bash
|
| 2 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 3 |
+
# All rights reserved.
|
| 4 |
+
#
|
| 5 |
+
# This source code is licensed under the BSD-style license found in the
|
| 6 |
+
# LICENSE file in the root directory of this source tree.
|
| 7 |
+
|
| 8 |
+
# This script is for running some of the tutorials using the nightly build in
|
| 9 |
+
# an isolated environment. It is designed to be run in docker.
|
| 10 |
+
|
| 11 |
+
# If you run this script in this directory with
|
| 12 |
+
# sudo docker run --runtime=nvidia -it --rm -v $PWD/../docs/tutorials:/notebooks -v $PWD:/loc pytorch/conda-cuda bash /loc/run_tutorials.sh | tee log.txt
|
| 13 |
+
# it should execute some tutorials with the nightly build and resave them, and
|
| 14 |
+
# save a log in the current directory.
|
| 15 |
+
|
| 16 |
+
# We use nbconvert. runipy would be an alternative but it currently doesn't
|
| 17 |
+
# work well with plotly.
|
| 18 |
+
|
| 19 |
+
set -e
|
| 20 |
+
|
| 21 |
+
conda init bash
|
| 22 |
+
# shellcheck source=/dev/null
|
| 23 |
+
source ~/.bashrc
|
| 24 |
+
conda create -y -n myenv python=3.8 matplotlib ipython ipywidgets nbconvert
|
| 25 |
+
conda activate myenv
|
| 26 |
+
conda install -y -c iopath iopath
|
| 27 |
+
conda install -y -c pytorch pytorch=1.6.0 cudatoolkit=10.1 torchvision
|
| 28 |
+
conda install -y -c pytorch3d-nightly pytorch3d
|
| 29 |
+
pip install plotly scikit-image
|
| 30 |
+
|
| 31 |
+
for notebook in /notebooks/*.ipynb
|
| 32 |
+
do
|
| 33 |
+
name=$(basename "$notebook")
|
| 34 |
+
|
| 35 |
+
if [[ "$name" == "dataloaders_ShapeNetCore_R2N2.ipynb" ]]
|
| 36 |
+
then
|
| 37 |
+
#skip as data not easily available
|
| 38 |
+
continue
|
| 39 |
+
fi
|
| 40 |
+
if [[ "$name" == "render_densepose.ipynb" ]]
|
| 41 |
+
then
|
| 42 |
+
#skip as data not easily available
|
| 43 |
+
continue
|
| 44 |
+
fi
|
| 45 |
+
|
| 46 |
+
#comment the lines which install torch, torchvision and pytorch3d
|
| 47 |
+
sed -Ei '/(torchvision)|(pytorch3d)/ s/!pip/!#pip/' "$notebook"
|
| 48 |
+
#Don't let tqdm use widgets
|
| 49 |
+
sed -i 's/from tqdm.notebook import tqdm/from tqdm import tqdm/' "$notebook"
|
| 50 |
+
|
| 51 |
+
echo
|
| 52 |
+
echo "### ### ###"
|
| 53 |
+
echo "starting $name"
|
| 54 |
+
time jupyter nbconvert --to notebook --inplace --ExecutePreprocessor.kernel_name=python3 --execute "$notebook" || true
|
| 55 |
+
echo "ending $name"
|
| 56 |
+
done
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/dev/test_list.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 2 |
+
# All rights reserved.
|
| 3 |
+
#
|
| 4 |
+
# This source code is licensed under the BSD-style license found in the
|
| 5 |
+
# LICENSE file in the root directory of this source tree.
|
| 6 |
+
|
| 7 |
+
import ast
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
from typing import List
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
"""
|
| 13 |
+
This module outputs a list of tests for completion.
|
| 14 |
+
It has no dependencies.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def get_test_files() -> List[Path]:
|
| 19 |
+
root = Path(__file__).parent.parent
|
| 20 |
+
dirs = ["tests", "projects/implicitron_trainer"]
|
| 21 |
+
return [i for dir in dirs for i in (root / dir).glob("**/test*.py")]
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def tests_from_file(path: Path, base: str) -> List[str]:
|
| 25 |
+
"""
|
| 26 |
+
Returns all the tests in the given file, in format
|
| 27 |
+
expected as arguments when running the tests.
|
| 28 |
+
e.g.
|
| 29 |
+
file_stem
|
| 30 |
+
file_stem.TestFunctionality
|
| 31 |
+
file_stem.TestFunctionality.test_f
|
| 32 |
+
file_stem.TestFunctionality.test_g
|
| 33 |
+
"""
|
| 34 |
+
with open(path) as f:
|
| 35 |
+
node = ast.parse(f.read())
|
| 36 |
+
out = [base]
|
| 37 |
+
for cls in node.body:
|
| 38 |
+
if not isinstance(cls, ast.ClassDef):
|
| 39 |
+
continue
|
| 40 |
+
if not cls.name.startswith("Test"):
|
| 41 |
+
continue
|
| 42 |
+
class_base = base + "." + cls.name
|
| 43 |
+
out.append(class_base)
|
| 44 |
+
for method in cls.body:
|
| 45 |
+
if not isinstance(method, ast.FunctionDef):
|
| 46 |
+
continue
|
| 47 |
+
if not method.name.startswith("test"):
|
| 48 |
+
continue
|
| 49 |
+
out.append(class_base + "." + method.name)
|
| 50 |
+
return out
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
def main() -> None:
|
| 54 |
+
files = get_test_files()
|
| 55 |
+
test_root = Path(__file__).parent.parent
|
| 56 |
+
all_tests = []
|
| 57 |
+
for f in files:
|
| 58 |
+
file_base = str(f.relative_to(test_root))[:-3].replace("/", ".")
|
| 59 |
+
all_tests.extend(tests_from_file(f, file_base))
|
| 60 |
+
for test in sorted(all_tests):
|
| 61 |
+
print(test)
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
if __name__ == "__main__":
|
| 65 |
+
main()
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/global_encoder/autodecoder.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.models.global_encoder.autodecoder
|
| 2 |
+
=======================================================
|
| 3 |
+
|
| 4 |
+
autodecoder
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.models.global_encoder.autodecoder
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/global_encoder/global_encoder.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.models.global_encoder.global_encoder
|
| 2 |
+
==========================================================
|
| 3 |
+
|
| 4 |
+
global_encoder
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.models.global_encoder.global_encoder
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/global_encoder/index.rst
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.models.global_encoder
|
| 2 |
+
===========================================
|
| 3 |
+
|
| 4 |
+
.. toctree::
|
| 5 |
+
|
| 6 |
+
autodecoder
|
| 7 |
+
global_encoder
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/implicit_function/utils.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.models.implicit_function.utils
|
| 2 |
+
====================================================
|
| 3 |
+
|
| 4 |
+
utils
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.models.implicit_function.utils
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/implicitron/models/view_pooler/feature_aggregator.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.models.view_pooler.feature_aggregator
|
| 2 |
+
===========================================================
|
| 3 |
+
|
| 4 |
+
feature_aggregator
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.models.view_pooler.feature_aggregator
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/extern/pytorch3d/docs/modules/renderer/mesh/clip.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.mesh.clip
|
| 2 |
+
============================
|
| 3 |
+
|
| 4 |
+
clip
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.mesh.clip
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/data_basics.rst
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.dataset in general
|
| 2 |
+
========================================
|
| 3 |
+
|
| 4 |
+
Basics of data for implicitron
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.dataset.dataset_base
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
| 10 |
+
|
| 11 |
+
.. automodule:: pytorch3d.implicitron.dataset.dataset_map_provider
|
| 12 |
+
:members:
|
| 13 |
+
:undoc-members:
|
| 14 |
+
:show-inheritance:
|
| 15 |
+
|
| 16 |
+
.. automodule:: pytorch3d.implicitron.dataset.data_loader_map_provider
|
| 17 |
+
:members:
|
| 18 |
+
:undoc-members:
|
| 19 |
+
:show-inheritance:
|
| 20 |
+
|
| 21 |
+
.. automodule:: pytorch3d.implicitron.dataset.data_source
|
| 22 |
+
:members:
|
| 23 |
+
:undoc-members:
|
| 24 |
+
:show-inheritance:
|
| 25 |
+
|
| 26 |
+
.. automodule:: pytorch3d.implicitron.dataset.scene_batch_sampler
|
| 27 |
+
:members:
|
| 28 |
+
:undoc-members:
|
| 29 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/datasets.rst
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.dataset specific datasets
|
| 2 |
+
===============================================
|
| 3 |
+
|
| 4 |
+
specific datasets
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.dataset.blender_dataset_map_provider
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
| 10 |
+
|
| 11 |
+
.. automodule:: pytorch3d.implicitron.dataset.json_index_dataset_map_provider
|
| 12 |
+
:members:
|
| 13 |
+
:undoc-members:
|
| 14 |
+
:show-inheritance:
|
| 15 |
+
|
| 16 |
+
.. automodule:: pytorch3d.implicitron.dataset.json_index_dataset_map_provider_v2
|
| 17 |
+
:members:
|
| 18 |
+
:undoc-members:
|
| 19 |
+
:show-inheritance:
|
| 20 |
+
|
| 21 |
+
.. automodule:: pytorch3d.implicitron.dataset.llff_dataset_map_provider
|
| 22 |
+
:members:
|
| 23 |
+
:undoc-members:
|
| 24 |
+
:show-inheritance:
|
| 25 |
+
|
| 26 |
+
.. automodule:: pytorch3d.implicitron.dataset.rendered_mesh_dataset_map_provider
|
| 27 |
+
:members:
|
| 28 |
+
:undoc-members:
|
| 29 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/evaluation.rst
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.evaluation
|
| 2 |
+
================================
|
| 3 |
+
|
| 4 |
+
evaluation
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.evaluation.evaluate_new_view_synthesis
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
| 10 |
+
|
| 11 |
+
.. automodule:: pytorch3d.implicitron.evaluation.evaluator
|
| 12 |
+
:members:
|
| 13 |
+
:undoc-members:
|
| 14 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/index.rst
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron
|
| 2 |
+
=====================
|
| 3 |
+
|
| 4 |
+
.. toctree::
|
| 5 |
+
|
| 6 |
+
models/index.rst
|
| 7 |
+
data_basics
|
| 8 |
+
datasets
|
| 9 |
+
evaluation
|
| 10 |
+
tools
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/models/view_pooler/feature_aggregator.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.models.view_pooler.feature_aggregator
|
| 2 |
+
===========================================================
|
| 3 |
+
|
| 4 |
+
feature_aggregator
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.models.view_pooler.feature_aggregator
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/models/view_pooler/index.rst
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.models.view_pooler
|
| 2 |
+
========================================
|
| 3 |
+
|
| 4 |
+
.. toctree::
|
| 5 |
+
|
| 6 |
+
feature_aggregator
|
| 7 |
+
view_pooler
|
| 8 |
+
view_sampler
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/models/view_pooler/view_pooler.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.models.view_pooler.view_pooler
|
| 2 |
+
====================================================
|
| 3 |
+
|
| 4 |
+
view_pooler
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.models.view_pooler.view_pooler
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/models/view_pooler/view_sampler.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.models.view_pooler.view_sampler
|
| 2 |
+
=====================================================
|
| 3 |
+
|
| 4 |
+
view_sampler
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.models.view_pooler.view_sampler
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/implicitron/tools.rst
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.implicitron.tools
|
| 2 |
+
===========================
|
| 3 |
+
|
| 4 |
+
Tools for implicitron
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.implicitron.tools.camera_utils
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
| 10 |
+
|
| 11 |
+
.. automodule:: pytorch3d.implicitron.tools.circle_fitting
|
| 12 |
+
:members:
|
| 13 |
+
:undoc-members:
|
| 14 |
+
:show-inheritance:
|
| 15 |
+
|
| 16 |
+
.. automodule:: pytorch3d.implicitron.tools.config
|
| 17 |
+
:members:
|
| 18 |
+
:undoc-members:
|
| 19 |
+
:show-inheritance:
|
| 20 |
+
|
| 21 |
+
.. automodule:: pytorch3d.implicitron.tools.eval_video_trajectory
|
| 22 |
+
:members:
|
| 23 |
+
:undoc-members:
|
| 24 |
+
:show-inheritance:
|
| 25 |
+
|
| 26 |
+
.. automodule:: pytorch3d.implicitron.tools.image_utils
|
| 27 |
+
:members:
|
| 28 |
+
:undoc-members:
|
| 29 |
+
:show-inheritance:
|
| 30 |
+
|
| 31 |
+
.. automodule:: pytorch3d.implicitron.tools.metric_utils
|
| 32 |
+
:members:
|
| 33 |
+
:undoc-members:
|
| 34 |
+
:show-inheritance:
|
| 35 |
+
|
| 36 |
+
.. automodule:: pytorch3d.implicitron.tools.model_io
|
| 37 |
+
:members:
|
| 38 |
+
:undoc-members:
|
| 39 |
+
:show-inheritance:
|
| 40 |
+
|
| 41 |
+
.. automodule:: pytorch3d.implicitron.tools.point_cloud_utils
|
| 42 |
+
:members:
|
| 43 |
+
:undoc-members:
|
| 44 |
+
:show-inheritance:
|
| 45 |
+
|
| 46 |
+
.. automodule:: pytorch3d.implicitron.tools.rasterize_mc
|
| 47 |
+
:members:
|
| 48 |
+
:undoc-members:
|
| 49 |
+
:show-inheritance:
|
| 50 |
+
|
| 51 |
+
.. automodule:: pytorch3d.implicitron.tools.stats
|
| 52 |
+
:members:
|
| 53 |
+
:undoc-members:
|
| 54 |
+
:show-inheritance:
|
| 55 |
+
|
| 56 |
+
.. automodule:: pytorch3d.implicitron.tools.video_writer
|
| 57 |
+
:members:
|
| 58 |
+
:undoc-members:
|
| 59 |
+
:show-inheritance:
|
| 60 |
+
|
| 61 |
+
.. automodule:: pytorch3d.implicitron.tools.vis_utils
|
| 62 |
+
:members:
|
| 63 |
+
:undoc-members:
|
| 64 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/io.rst
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.io
|
| 2 |
+
===========================
|
| 3 |
+
|
| 4 |
+
.. automodule:: pytorch3d.io
|
| 5 |
+
:members:
|
| 6 |
+
:undoc-members:
|
| 7 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/blending.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.blending
|
| 2 |
+
===========================
|
| 3 |
+
|
| 4 |
+
blending
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.blending
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/camera_conversions.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.camera_conversions
|
| 2 |
+
=====================================
|
| 3 |
+
|
| 4 |
+
camera_conversions
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.camera_conversions
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/camera_utils.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.camera_utils
|
| 2 |
+
===============================
|
| 3 |
+
|
| 4 |
+
camera_utils
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.camera_utils
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/cameras.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.cameras
|
| 2 |
+
==========================
|
| 3 |
+
|
| 4 |
+
cameras
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.cameras
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/compositing.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.compositing
|
| 2 |
+
==============================
|
| 3 |
+
|
| 4 |
+
compositing
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.compositing
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/harmonic_embedding.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.implicit.harmonic_embedding
|
| 2 |
+
==============================================
|
| 3 |
+
|
| 4 |
+
harmonic_embedding
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.implicit.harmonic_embedding
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/index.rst
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.implicit
|
| 2 |
+
===========================
|
| 3 |
+
|
| 4 |
+
.. toctree::
|
| 5 |
+
|
| 6 |
+
harmonic_embedding
|
| 7 |
+
raymarching
|
| 8 |
+
raysampling
|
| 9 |
+
renderer
|
| 10 |
+
sample_pdf
|
| 11 |
+
utils
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/raymarching.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.implicit.raymarching
|
| 2 |
+
=======================================
|
| 3 |
+
|
| 4 |
+
raymarching
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.implicit.raymarching
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/raysampling.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.implicit.raysampling
|
| 2 |
+
=======================================
|
| 3 |
+
|
| 4 |
+
raysampling
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.implicit.raysampling
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/renderer.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.implicit.renderer
|
| 2 |
+
====================================
|
| 3 |
+
|
| 4 |
+
renderer
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.implicit.renderer
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/sample_pdf.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.implicit.sample_pdf
|
| 2 |
+
======================================
|
| 3 |
+
|
| 4 |
+
sample_pdf
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.implicit.sample_pdf
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/implicit/utils.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.implicit.utils
|
| 2 |
+
=================================
|
| 3 |
+
|
| 4 |
+
utils
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.implicit.utils
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/index.rst
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer
|
| 2 |
+
==================
|
| 3 |
+
|
| 4 |
+
.. toctree::
|
| 5 |
+
|
| 6 |
+
blending
|
| 7 |
+
camera_conversions
|
| 8 |
+
camera_utils
|
| 9 |
+
cameras
|
| 10 |
+
compositing
|
| 11 |
+
fisheyecameras
|
| 12 |
+
lighting
|
| 13 |
+
materials
|
| 14 |
+
splatter_blend
|
| 15 |
+
utils
|
| 16 |
+
implicit/index
|
| 17 |
+
mesh/index
|
| 18 |
+
opengl/index
|
| 19 |
+
points/index
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/lighting.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.lighting
|
| 2 |
+
===========================
|
| 3 |
+
|
| 4 |
+
lighting
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.lighting
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/materials.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.materials
|
| 2 |
+
============================
|
| 3 |
+
|
| 4 |
+
materials
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.materials
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/mesh/index.rst
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.mesh
|
| 2 |
+
=======================
|
| 3 |
+
|
| 4 |
+
.. toctree::
|
| 5 |
+
|
| 6 |
+
clip
|
| 7 |
+
rasterize_meshes
|
| 8 |
+
rasterizer
|
| 9 |
+
renderer
|
| 10 |
+
shader
|
| 11 |
+
shading
|
| 12 |
+
textures
|
| 13 |
+
utils
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/mesh/rasterize_meshes.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.mesh.rasterize_meshes
|
| 2 |
+
========================================
|
| 3 |
+
|
| 4 |
+
rasterize_meshes
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.mesh.rasterize_meshes
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/mesh/renderer.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.mesh.renderer
|
| 2 |
+
================================
|
| 3 |
+
|
| 4 |
+
renderer
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.mesh.renderer
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/compositor.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.points.compositor
|
| 2 |
+
====================================
|
| 3 |
+
|
| 4 |
+
compositor
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.points.compositor
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/index.rst
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.points
|
| 2 |
+
=========================
|
| 3 |
+
|
| 4 |
+
.. toctree::
|
| 5 |
+
|
| 6 |
+
compositor
|
| 7 |
+
rasterize_points
|
| 8 |
+
rasterizer
|
| 9 |
+
renderer
|
| 10 |
+
pulsar/index
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/rasterize_points.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.points.rasterize_points
|
| 2 |
+
==========================================
|
| 3 |
+
|
| 4 |
+
rasterize_points
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.points.rasterize_points
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/rasterizer.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.points.rasterizer
|
| 2 |
+
====================================
|
| 3 |
+
|
| 4 |
+
rasterizer
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.points.rasterizer
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/points/renderer.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.points.renderer
|
| 2 |
+
==================================
|
| 3 |
+
|
| 4 |
+
renderer
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.points.renderer
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/splatter_blend.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.splatter_blend
|
| 2 |
+
=================================
|
| 3 |
+
|
| 4 |
+
splatter_blend
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.splatter_blend
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/renderer/utils.rst
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.renderer.utils
|
| 2 |
+
========================
|
| 3 |
+
|
| 4 |
+
utils
|
| 5 |
+
|
| 6 |
+
.. automodule:: pytorch3d.renderer.utils
|
| 7 |
+
:members:
|
| 8 |
+
:undoc-members:
|
| 9 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/docs/modules/transforms.rst
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pytorch3d.transforms
|
| 2 |
+
===========================
|
| 3 |
+
|
| 4 |
+
.. automodule:: pytorch3d.transforms
|
| 5 |
+
:members:
|
| 6 |
+
:undoc-members:
|
| 7 |
+
:show-inheritance:
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/projects/__init__.py
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 2 |
+
# All rights reserved.
|
| 3 |
+
#
|
| 4 |
+
# This source code is licensed under the BSD-style license found in the
|
| 5 |
+
# LICENSE file in the root directory of this source tree.
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/pytorch3d/ops/laplacian_matrices.py
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 2 |
+
# All rights reserved.
|
| 3 |
+
#
|
| 4 |
+
# This source code is licensed under the BSD-style license found in the
|
| 5 |
+
# LICENSE file in the root directory of this source tree.
|
| 6 |
+
|
| 7 |
+
# pyre-unsafe
|
| 8 |
+
|
| 9 |
+
from typing import Tuple
|
| 10 |
+
|
| 11 |
+
import torch
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
# ------------------------ Laplacian Matrices ------------------------ #
|
| 15 |
+
# This file contains implementations of differentiable laplacian matrices.
|
| 16 |
+
# These include
|
| 17 |
+
# 1) Standard Laplacian matrix
|
| 18 |
+
# 2) Cotangent Laplacian matrix
|
| 19 |
+
# 3) Norm Laplacian matrix
|
| 20 |
+
# -------------------------------------------------------------------- #
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def laplacian(verts: torch.Tensor, edges: torch.Tensor) -> torch.Tensor:
|
| 24 |
+
"""
|
| 25 |
+
Computes the laplacian matrix.
|
| 26 |
+
The definition of the laplacian is
|
| 27 |
+
L[i, j] = -1 , if i == j
|
| 28 |
+
L[i, j] = 1 / deg(i) , if (i, j) is an edge
|
| 29 |
+
L[i, j] = 0 , otherwise
|
| 30 |
+
where deg(i) is the degree of the i-th vertex in the graph.
|
| 31 |
+
|
| 32 |
+
Args:
|
| 33 |
+
verts: tensor of shape (V, 3) containing the vertices of the graph
|
| 34 |
+
edges: tensor of shape (E, 2) containing the vertex indices of each edge
|
| 35 |
+
Returns:
|
| 36 |
+
L: Sparse FloatTensor of shape (V, V)
|
| 37 |
+
"""
|
| 38 |
+
V = verts.shape[0]
|
| 39 |
+
|
| 40 |
+
e0, e1 = edges.unbind(1)
|
| 41 |
+
|
| 42 |
+
idx01 = torch.stack([e0, e1], dim=1) # (E, 2)
|
| 43 |
+
idx10 = torch.stack([e1, e0], dim=1) # (E, 2)
|
| 44 |
+
idx = torch.cat([idx01, idx10], dim=0).t() # (2, 2*E)
|
| 45 |
+
|
| 46 |
+
# First, we construct the adjacency matrix,
|
| 47 |
+
# i.e. A[i, j] = 1 if (i,j) is an edge, or
|
| 48 |
+
# A[e0, e1] = 1 & A[e1, e0] = 1
|
| 49 |
+
ones = torch.ones(idx.shape[1], dtype=torch.float32, device=verts.device)
|
| 50 |
+
A = torch.sparse_coo_tensor(idx, ones, (V, V), dtype=torch.float32)
|
| 51 |
+
|
| 52 |
+
# the sum of i-th row of A gives the degree of the i-th vertex
|
| 53 |
+
deg = torch.sparse.sum(A, dim=1).to_dense()
|
| 54 |
+
|
| 55 |
+
# We construct the Laplacian matrix by adding the non diagonal values
|
| 56 |
+
# i.e. L[i, j] = 1 ./ deg(i) if (i, j) is an edge
|
| 57 |
+
deg0 = deg[e0]
|
| 58 |
+
# pyre-fixme[58]: `/` is not supported for operand types `float` and `Tensor`.
|
| 59 |
+
deg0 = torch.where(deg0 > 0.0, 1.0 / deg0, deg0)
|
| 60 |
+
deg1 = deg[e1]
|
| 61 |
+
# pyre-fixme[58]: `/` is not supported for operand types `float` and `Tensor`.
|
| 62 |
+
deg1 = torch.where(deg1 > 0.0, 1.0 / deg1, deg1)
|
| 63 |
+
val = torch.cat([deg0, deg1])
|
| 64 |
+
L = torch.sparse_coo_tensor(idx, val, (V, V), dtype=torch.float32)
|
| 65 |
+
|
| 66 |
+
# Then we add the diagonal values L[i, i] = -1.
|
| 67 |
+
idx = torch.arange(V, device=verts.device)
|
| 68 |
+
idx = torch.stack([idx, idx], dim=0)
|
| 69 |
+
ones = torch.ones(idx.shape[1], dtype=torch.float32, device=verts.device)
|
| 70 |
+
L -= torch.sparse_coo_tensor(idx, ones, (V, V), dtype=torch.float32)
|
| 71 |
+
|
| 72 |
+
return L
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def cot_laplacian(
|
| 76 |
+
verts: torch.Tensor, faces: torch.Tensor, eps: float = 1e-12
|
| 77 |
+
) -> Tuple[torch.Tensor, torch.Tensor]:
|
| 78 |
+
"""
|
| 79 |
+
Returns the Laplacian matrix with cotangent weights and the inverse of the
|
| 80 |
+
face areas.
|
| 81 |
+
|
| 82 |
+
Args:
|
| 83 |
+
verts: tensor of shape (V, 3) containing the vertices of the graph
|
| 84 |
+
faces: tensor of shape (F, 3) containing the vertex indices of each face
|
| 85 |
+
Returns:
|
| 86 |
+
2-element tuple containing
|
| 87 |
+
- **L**: Sparse FloatTensor of shape (V,V) for the Laplacian matrix.
|
| 88 |
+
Here, L[i, j] = cot a_ij + cot b_ij iff (i, j) is an edge in meshes.
|
| 89 |
+
See the description above for more clarity.
|
| 90 |
+
- **inv_areas**: FloatTensor of shape (V,) containing the inverse of sum of
|
| 91 |
+
face areas containing each vertex
|
| 92 |
+
"""
|
| 93 |
+
V, F = verts.shape[0], faces.shape[0]
|
| 94 |
+
|
| 95 |
+
face_verts = verts[faces]
|
| 96 |
+
v0, v1, v2 = face_verts[:, 0], face_verts[:, 1], face_verts[:, 2]
|
| 97 |
+
|
| 98 |
+
# Side lengths of each triangle, of shape (sum(F_n),)
|
| 99 |
+
# A is the side opposite v1, B is opposite v2, and C is opposite v3
|
| 100 |
+
A = (v1 - v2).norm(dim=1)
|
| 101 |
+
B = (v0 - v2).norm(dim=1)
|
| 102 |
+
C = (v0 - v1).norm(dim=1)
|
| 103 |
+
|
| 104 |
+
# Area of each triangle (with Heron's formula); shape is (sum(F_n),)
|
| 105 |
+
s = 0.5 * (A + B + C)
|
| 106 |
+
# note that the area can be negative (close to 0) causing nans after sqrt()
|
| 107 |
+
# we clip it to a small positive value
|
| 108 |
+
# pyre-fixme[16]: `float` has no attribute `clamp_`.
|
| 109 |
+
area = (s * (s - A) * (s - B) * (s - C)).clamp_(min=eps).sqrt()
|
| 110 |
+
|
| 111 |
+
# Compute cotangents of angles, of shape (sum(F_n), 3)
|
| 112 |
+
A2, B2, C2 = A * A, B * B, C * C
|
| 113 |
+
cota = (B2 + C2 - A2) / area
|
| 114 |
+
cotb = (A2 + C2 - B2) / area
|
| 115 |
+
cotc = (A2 + B2 - C2) / area
|
| 116 |
+
cot = torch.stack([cota, cotb, cotc], dim=1)
|
| 117 |
+
cot /= 4.0
|
| 118 |
+
|
| 119 |
+
# Construct a sparse matrix by basically doing:
|
| 120 |
+
# L[v1, v2] = cota
|
| 121 |
+
# L[v2, v0] = cotb
|
| 122 |
+
# L[v0, v1] = cotc
|
| 123 |
+
ii = faces[:, [1, 2, 0]]
|
| 124 |
+
jj = faces[:, [2, 0, 1]]
|
| 125 |
+
idx = torch.stack([ii, jj], dim=0).view(2, F * 3)
|
| 126 |
+
L = torch.sparse_coo_tensor(idx, cot.view(-1), (V, V), dtype=torch.float32)
|
| 127 |
+
|
| 128 |
+
# Make it symmetric; this means we are also setting
|
| 129 |
+
# L[v2, v1] = cota
|
| 130 |
+
# L[v0, v2] = cotb
|
| 131 |
+
# L[v1, v0] = cotc
|
| 132 |
+
L += L.t()
|
| 133 |
+
|
| 134 |
+
# For each vertex, compute the sum of areas for triangles containing it.
|
| 135 |
+
idx = faces.view(-1)
|
| 136 |
+
inv_areas = torch.zeros(V, dtype=torch.float32, device=verts.device)
|
| 137 |
+
val = torch.stack([area] * 3, dim=1).view(-1)
|
| 138 |
+
inv_areas.scatter_add_(0, idx, val)
|
| 139 |
+
idx = inv_areas > 0
|
| 140 |
+
# pyre-fixme[58]: `/` is not supported for operand types `float` and `Tensor`.
|
| 141 |
+
inv_areas[idx] = 1.0 / inv_areas[idx]
|
| 142 |
+
inv_areas = inv_areas.view(-1, 1)
|
| 143 |
+
|
| 144 |
+
return L, inv_areas
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
def norm_laplacian(
|
| 148 |
+
verts: torch.Tensor, edges: torch.Tensor, eps: float = 1e-12
|
| 149 |
+
) -> torch.Tensor:
|
| 150 |
+
"""
|
| 151 |
+
Norm laplacian computes a variant of the laplacian matrix which weights each
|
| 152 |
+
affinity with the normalized distance of the neighboring nodes.
|
| 153 |
+
More concretely,
|
| 154 |
+
L[i, j] = 1. / wij where wij = ||vi - vj|| if (vi, vj) are neighboring nodes
|
| 155 |
+
|
| 156 |
+
Args:
|
| 157 |
+
verts: tensor of shape (V, 3) containing the vertices of the graph
|
| 158 |
+
edges: tensor of shape (E, 2) containing the vertex indices of each edge
|
| 159 |
+
Returns:
|
| 160 |
+
L: Sparse FloatTensor of shape (V, V)
|
| 161 |
+
"""
|
| 162 |
+
edge_verts = verts[edges] # (E, 2, 3)
|
| 163 |
+
v0, v1 = edge_verts[:, 0], edge_verts[:, 1]
|
| 164 |
+
|
| 165 |
+
# Side lengths of each edge, of shape (E,)
|
| 166 |
+
w01 = torch.reciprocal((v0 - v1).norm(dim=1) + eps)
|
| 167 |
+
|
| 168 |
+
# Construct a sparse matrix by basically doing:
|
| 169 |
+
# L[v0, v1] = w01
|
| 170 |
+
# L[v1, v0] = w01
|
| 171 |
+
e01 = edges.t() # (2, E)
|
| 172 |
+
|
| 173 |
+
V = verts.shape[0]
|
| 174 |
+
L = torch.sparse_coo_tensor(e01, w01, (V, V), dtype=torch.float32)
|
| 175 |
+
L = L + L.t()
|
| 176 |
+
|
| 177 |
+
return L
|
project/ManiSkill3/src/maniskill2_benchmark/cfdp_experiment/cfdp/pytorch3d/pytorch3d/ops/mesh_face_areas_normals.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 2 |
+
# All rights reserved.
|
| 3 |
+
#
|
| 4 |
+
# This source code is licensed under the BSD-style license found in the
|
| 5 |
+
# LICENSE file in the root directory of this source tree.
|
| 6 |
+
|
| 7 |
+
# pyre-unsafe
|
| 8 |
+
|
| 9 |
+
import torch
|
| 10 |
+
from pytorch3d import _C
|
| 11 |
+
from torch.autograd import Function
|
| 12 |
+
from torch.autograd.function import once_differentiable
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
class _MeshFaceAreasNormals(Function):
|
| 16 |
+
"""
|
| 17 |
+
Torch autograd Function wrapper for face areas & normals C++/CUDA implementations.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
@staticmethod
|
| 21 |
+
def forward(ctx, verts, faces):
|
| 22 |
+
"""
|
| 23 |
+
Args:
|
| 24 |
+
ctx: Context object used to calculate gradients.
|
| 25 |
+
verts: FloatTensor of shape (V, 3), representing the packed
|
| 26 |
+
batch verts tensor.
|
| 27 |
+
faces: LongTensor of shape (F, 3), representing the packed
|
| 28 |
+
batch faces tensor
|
| 29 |
+
Returns:
|
| 30 |
+
areas: FloatTensor of shape (F,) with the areas of each face
|
| 31 |
+
normals: FloatTensor of shape (F,3) with the normals of each face
|
| 32 |
+
"""
|
| 33 |
+
if not (verts.dim() == 2):
|
| 34 |
+
raise ValueError("verts need to be of shape Vx3.")
|
| 35 |
+
if not (verts.shape[1] == 3):
|
| 36 |
+
raise ValueError("verts need to be of shape Vx3.")
|
| 37 |
+
if not (faces.dim() == 2):
|
| 38 |
+
raise ValueError("faces need to be of shape Fx3.")
|
| 39 |
+
if not (faces.shape[1] == 3):
|
| 40 |
+
raise ValueError("faces need to be of shape Fx3.")
|
| 41 |
+
if not (faces.dtype == torch.int64):
|
| 42 |
+
raise ValueError("faces need to be of type torch.int64.")
|
| 43 |
+
# TODO(gkioxari) Change cast to floats once we add support for doubles.
|
| 44 |
+
if not (verts.dtype == torch.float32):
|
| 45 |
+
verts = verts.float()
|
| 46 |
+
|
| 47 |
+
ctx.save_for_backward(verts, faces)
|
| 48 |
+
areas, normals = _C.face_areas_normals_forward(verts, faces)
|
| 49 |
+
return areas, normals
|
| 50 |
+
|
| 51 |
+
@staticmethod
|
| 52 |
+
@once_differentiable
|
| 53 |
+
def backward(ctx, grad_areas, grad_normals):
|
| 54 |
+
grad_areas = grad_areas.contiguous()
|
| 55 |
+
grad_normals = grad_normals.contiguous()
|
| 56 |
+
verts, faces = ctx.saved_tensors
|
| 57 |
+
# TODO(gkioxari) Change cast to floats once we add support for doubles.
|
| 58 |
+
if not (grad_areas.dtype == torch.float32):
|
| 59 |
+
grad_areas = grad_areas.float()
|
| 60 |
+
if not (grad_normals.dtype == torch.float32):
|
| 61 |
+
grad_normals = grad_normals.float()
|
| 62 |
+
grad_verts = _C.face_areas_normals_backward(
|
| 63 |
+
grad_areas, grad_normals, verts, faces
|
| 64 |
+
)
|
| 65 |
+
return grad_verts, None
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
mesh_face_areas_normals = _MeshFaceAreasNormals.apply
|