pip install -e '.[pointcloud]'
# NOTE: Automatically downloads and preprocesses the dataset if it is missing.
python examples/train_pointcloud.py --cuda --dataset="datasets/modelnet40" --model="sfu2023-pcc-rec-pointnet"
Other important changes:
Drop Python 3.6 support since torch-geometric>=2.3.0 requires Python 3.7+. Furthermore, Python 3.6 (released 2016) went EOL in 2021, and Ubuntu 18.04 went EOL in 2023.
Other notes:
pyntcloud breaks with ModelNet40. I created a PR to fix this: https://github.com/daavoo/pyntcloud/pull/352. While we wait for that to be accepted/released, CompressAI installs the PR version directly.
pointops's setup.py contains torch.utils.cpp_extension.CUDAExtension. The installer pip (or whatever) creates an isolated build environment, and installs packages specified in pyproject.toml's build-system.requires. (e.g., requires = ["setuptools", "wheel", "torch"].) However, this version of torch may not match the configured torch version outside the isolated environment. The outer torch version should already be correctly chosen for the CUDA version. But since the isolated torch version may not be CUDA-compatible, this can lead to the error "The detected CUDA version (*) mismatches the version that was used to compile PyTorch (*). Please make sure to use the same CUDA versions.". Ideally, the torch version available within the isolated build environment should be the same as the outside environment. pip has a --no-build-isolation flag, though that's not always available (e.g., poetry), and seems like a bit of a hack. I'll need to see if there's a workaround... [Minor rant.]
Some code is adapted with attribution from the following repositories:
This PR adds learned point cloud compression (PCC) to CompressAI. Namely:
sfu-pcc-rec-pointnet
,sfu-pcc-rec-pointnet2-ssg
,hrtzxf2022-pcc-rec
(He2022)examples/train_pointcloud.py
Example usage:
Other important changes:
torch-geometric>=2.3.0
requires Python 3.7+. Furthermore, Python 3.6 (released 2016) went EOL in 2021, and Ubuntu 18.04 went EOL in 2023.Other notes:
pyntcloud
breaks with ModelNet40. I created a PR to fix this: https://github.com/daavoo/pyntcloud/pull/352. While we wait for that to be accepted/released, CompressAI installs the PR version directly.pointops
'ssetup.py
containstorch.utils.cpp_extension.CUDAExtension
. The installer pip (or whatever) creates an isolated build environment, and installs packages specified in pyproject.toml'sbuild-system.requires
. (e.g.,requires = ["setuptools", "wheel", "torch"]
.) However, this version of torch may not match the configured torch version outside the isolated environment. The outer torch version should already be correctly chosen for the CUDA version. But since the isolated torch version may not be CUDA-compatible, this can lead to the error"The detected CUDA version (*) mismatches the version that was used to compile PyTorch (*). Please make sure to use the same CUDA versions."
. Ideally, the torch version available within the isolated build environment should be the same as the outside environment.pip
has a--no-build-isolation
flag, though that's not always available (e.g., poetry), and seems like a bit of a hack. I'll need to see if there's a workaround... [Minor rant.]Some code is adapted with attribution from the following repositories:
sfu-pcc-rec-pointnet2-ssg
) [MIT license]hrtzxf2022-pcc-rec
) [no license stated]Possible future work:
(dataset, model, lmbda)
combinationsReconstructionPointCloudCompressionRunner