learning3d 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. learning3d-0.0.1/LICENSE +21 -0
  2. learning3d-0.0.1/MANIFEST.in +2 -0
  3. learning3d-0.0.1/PKG-INFO +271 -0
  4. learning3d-0.0.1/README.md +245 -0
  5. learning3d-0.0.1/data/modelnet40_ply_hdf5_2048/shape_names.txt +40 -0
  6. learning3d-0.0.1/data/modelnet40_ply_hdf5_2048/test_files.txt +2 -0
  7. learning3d-0.0.1/data/modelnet40_ply_hdf5_2048/train_files.txt +5 -0
  8. learning3d-0.0.1/pretrained/exp_prnet/args.txt +35 -0
  9. learning3d-0.0.1/pyproject.toml +29 -0
  10. learning3d-0.0.1/requirements.txt +12 -0
  11. learning3d-0.0.1/setup.cfg +4 -0
  12. learning3d-0.0.1/src/learning3d/__init__.py +2 -0
  13. learning3d-0.0.1/src/learning3d/data_utils/__init__.py +4 -0
  14. learning3d-0.0.1/src/learning3d/data_utils/dataloaders.py +454 -0
  15. learning3d-0.0.1/src/learning3d/data_utils/user_data.py +119 -0
  16. learning3d-0.0.1/src/learning3d/examples/test_dcp.py +139 -0
  17. learning3d-0.0.1/src/learning3d/examples/test_deepgmr.py +144 -0
  18. learning3d-0.0.1/src/learning3d/examples/test_flownet.py +113 -0
  19. learning3d-0.0.1/src/learning3d/examples/test_masknet.py +159 -0
  20. learning3d-0.0.1/src/learning3d/examples/test_masknet2.py +162 -0
  21. learning3d-0.0.1/src/learning3d/examples/test_pcn.py +118 -0
  22. learning3d-0.0.1/src/learning3d/examples/test_pcrnet.py +120 -0
  23. learning3d-0.0.1/src/learning3d/examples/test_pnlk.py +121 -0
  24. learning3d-0.0.1/src/learning3d/examples/test_pointconv.py +126 -0
  25. learning3d-0.0.1/src/learning3d/examples/test_pointnet.py +121 -0
  26. learning3d-0.0.1/src/learning3d/examples/test_prnet.py +126 -0
  27. learning3d-0.0.1/src/learning3d/examples/test_rpmnet.py +120 -0
  28. learning3d-0.0.1/src/learning3d/examples/train_PointNetLK.py +240 -0
  29. learning3d-0.0.1/src/learning3d/examples/train_dcp.py +249 -0
  30. learning3d-0.0.1/src/learning3d/examples/train_deepgmr.py +244 -0
  31. learning3d-0.0.1/src/learning3d/examples/train_flownet.py +259 -0
  32. learning3d-0.0.1/src/learning3d/examples/train_masknet.py +239 -0
  33. learning3d-0.0.1/src/learning3d/examples/train_pcn.py +216 -0
  34. learning3d-0.0.1/src/learning3d/examples/train_pcrnet.py +228 -0
  35. learning3d-0.0.1/src/learning3d/examples/train_pointconv.py +245 -0
  36. learning3d-0.0.1/src/learning3d/examples/train_pointnet.py +244 -0
  37. learning3d-0.0.1/src/learning3d/examples/train_prnet.py +229 -0
  38. learning3d-0.0.1/src/learning3d/examples/train_rpmnet.py +228 -0
  39. learning3d-0.0.1/src/learning3d/losses/__init__.py +12 -0
  40. learning3d-0.0.1/src/learning3d/losses/chamfer_distance.py +51 -0
  41. learning3d-0.0.1/src/learning3d/losses/classification.py +14 -0
  42. learning3d-0.0.1/src/learning3d/losses/correspondence_loss.py +10 -0
  43. learning3d-0.0.1/src/learning3d/losses/cuda/chamfer_distance/__init__.py +1 -0
  44. learning3d-0.0.1/src/learning3d/losses/cuda/chamfer_distance/chamfer_distance.cpp +185 -0
  45. learning3d-0.0.1/src/learning3d/losses/cuda/chamfer_distance/chamfer_distance.cu +209 -0
  46. learning3d-0.0.1/src/learning3d/losses/cuda/chamfer_distance/chamfer_distance.py +66 -0
  47. learning3d-0.0.1/src/learning3d/losses/cuda/emd_torch/pkg/emd_loss_layer.py +41 -0
  48. learning3d-0.0.1/src/learning3d/losses/cuda/emd_torch/pkg/include/cuda/emd.cuh +347 -0
  49. learning3d-0.0.1/src/learning3d/losses/cuda/emd_torch/pkg/include/cuda_helper.h +18 -0
  50. learning3d-0.0.1/src/learning3d/losses/cuda/emd_torch/pkg/include/emd.h +54 -0
  51. learning3d-0.0.1/src/learning3d/losses/cuda/emd_torch/pkg/layer/__init__.py +1 -0
  52. learning3d-0.0.1/src/learning3d/losses/cuda/emd_torch/pkg/layer/emd_loss_layer.py +40 -0
  53. learning3d-0.0.1/src/learning3d/losses/cuda/emd_torch/pkg/src/cuda/emd.cu +70 -0
  54. learning3d-0.0.1/src/learning3d/losses/cuda/emd_torch/pkg/src/emd.cpp +1 -0
  55. learning3d-0.0.1/src/learning3d/losses/cuda/emd_torch/setup.py +29 -0
  56. learning3d-0.0.1/src/learning3d/losses/emd.py +16 -0
  57. learning3d-0.0.1/src/learning3d/losses/frobenius_norm.py +21 -0
  58. learning3d-0.0.1/src/learning3d/losses/rmse_features.py +16 -0
  59. learning3d-0.0.1/src/learning3d/models/__init__.py +23 -0
  60. learning3d-0.0.1/src/learning3d/models/classifier.py +41 -0
  61. learning3d-0.0.1/src/learning3d/models/dcp.py +92 -0
  62. learning3d-0.0.1/src/learning3d/models/deepgmr.py +165 -0
  63. learning3d-0.0.1/src/learning3d/models/dgcnn.py +92 -0
  64. learning3d-0.0.1/src/learning3d/models/flownet3d.py +446 -0
  65. learning3d-0.0.1/src/learning3d/models/masknet.py +84 -0
  66. learning3d-0.0.1/src/learning3d/models/masknet2.py +264 -0
  67. learning3d-0.0.1/src/learning3d/models/pcn.py +164 -0
  68. learning3d-0.0.1/src/learning3d/models/pcrnet.py +74 -0
  69. learning3d-0.0.1/src/learning3d/models/pointconv.py +108 -0
  70. learning3d-0.0.1/src/learning3d/models/pointnet.py +108 -0
  71. learning3d-0.0.1/src/learning3d/models/pointnetlk.py +173 -0
  72. learning3d-0.0.1/src/learning3d/models/pooling.py +15 -0
  73. learning3d-0.0.1/src/learning3d/models/ppfnet.py +102 -0
  74. learning3d-0.0.1/src/learning3d/models/prnet.py +431 -0
  75. learning3d-0.0.1/src/learning3d/models/rpmnet.py +359 -0
  76. learning3d-0.0.1/src/learning3d/models/segmentation.py +38 -0
  77. learning3d-0.0.1/src/learning3d/ops/__init__.py +0 -0
  78. learning3d-0.0.1/src/learning3d/ops/data_utils.py +45 -0
  79. learning3d-0.0.1/src/learning3d/ops/invmat.py +134 -0
  80. learning3d-0.0.1/src/learning3d/ops/quaternion.py +218 -0
  81. learning3d-0.0.1/src/learning3d/ops/se3.py +157 -0
  82. learning3d-0.0.1/src/learning3d/ops/sinc.py +229 -0
  83. learning3d-0.0.1/src/learning3d/ops/so3.py +213 -0
  84. learning3d-0.0.1/src/learning3d/ops/transform_functions.py +342 -0
  85. learning3d-0.0.1/src/learning3d/utils/__init__.py +9 -0
  86. learning3d-0.0.1/src/learning3d/utils/lib/build/lib.linux-x86_64-3.5/pointnet2_cuda.cpython-35m-x86_64-linux-gnu.so +0 -0
  87. learning3d-0.0.1/src/learning3d/utils/lib/build/temp.linux-x86_64-3.5/src/ball_query.o +0 -0
  88. learning3d-0.0.1/src/learning3d/utils/lib/build/temp.linux-x86_64-3.5/src/ball_query_gpu.o +0 -0
  89. learning3d-0.0.1/src/learning3d/utils/lib/build/temp.linux-x86_64-3.5/src/group_points.o +0 -0
  90. learning3d-0.0.1/src/learning3d/utils/lib/build/temp.linux-x86_64-3.5/src/group_points_gpu.o +0 -0
  91. learning3d-0.0.1/src/learning3d/utils/lib/build/temp.linux-x86_64-3.5/src/interpolate.o +0 -0
  92. learning3d-0.0.1/src/learning3d/utils/lib/build/temp.linux-x86_64-3.5/src/interpolate_gpu.o +0 -0
  93. learning3d-0.0.1/src/learning3d/utils/lib/build/temp.linux-x86_64-3.5/src/pointnet2_api.o +0 -0
  94. learning3d-0.0.1/src/learning3d/utils/lib/build/temp.linux-x86_64-3.5/src/sampling.o +0 -0
  95. learning3d-0.0.1/src/learning3d/utils/lib/build/temp.linux-x86_64-3.5/src/sampling_gpu.o +0 -0
  96. learning3d-0.0.1/src/learning3d/utils/lib/dist/pointnet2-0.0.0-py3.5-linux-x86_64.egg +0 -0
  97. learning3d-0.0.1/src/learning3d/utils/lib/pointnet2.egg-info/SOURCES.txt +14 -0
  98. learning3d-0.0.1/src/learning3d/utils/lib/pointnet2.egg-info/dependency_links.txt +1 -0
  99. learning3d-0.0.1/src/learning3d/utils/lib/pointnet2.egg-info/top_level.txt +1 -0
  100. learning3d-0.0.1/src/learning3d/utils/lib/pointnet2_modules.py +160 -0
  101. learning3d-0.0.1/src/learning3d/utils/lib/pointnet2_utils.py +318 -0
  102. learning3d-0.0.1/src/learning3d/utils/lib/pytorch_utils.py +236 -0
  103. learning3d-0.0.1/src/learning3d/utils/lib/setup.py +23 -0
  104. learning3d-0.0.1/src/learning3d/utils/lib/src/ball_query.cpp +25 -0
  105. learning3d-0.0.1/src/learning3d/utils/lib/src/ball_query_gpu.cu +67 -0
  106. learning3d-0.0.1/src/learning3d/utils/lib/src/ball_query_gpu.h +15 -0
  107. learning3d-0.0.1/src/learning3d/utils/lib/src/cuda_utils.h +15 -0
  108. learning3d-0.0.1/src/learning3d/utils/lib/src/group_points.cpp +36 -0
  109. learning3d-0.0.1/src/learning3d/utils/lib/src/group_points_gpu.cu +86 -0
  110. learning3d-0.0.1/src/learning3d/utils/lib/src/group_points_gpu.h +22 -0
  111. learning3d-0.0.1/src/learning3d/utils/lib/src/interpolate.cpp +65 -0
  112. learning3d-0.0.1/src/learning3d/utils/lib/src/interpolate_gpu.cu +233 -0
  113. learning3d-0.0.1/src/learning3d/utils/lib/src/interpolate_gpu.h +36 -0
  114. learning3d-0.0.1/src/learning3d/utils/lib/src/pointnet2_api.cpp +25 -0
  115. learning3d-0.0.1/src/learning3d/utils/lib/src/sampling.cpp +46 -0
  116. learning3d-0.0.1/src/learning3d/utils/lib/src/sampling_gpu.cu +253 -0
  117. learning3d-0.0.1/src/learning3d/utils/lib/src/sampling_gpu.h +29 -0
  118. learning3d-0.0.1/src/learning3d/utils/pointconv_util.py +382 -0
  119. learning3d-0.0.1/src/learning3d/utils/ppfnet_util.py +244 -0
  120. learning3d-0.0.1/src/learning3d/utils/svd.py +59 -0
  121. learning3d-0.0.1/src/learning3d/utils/transformer.py +243 -0
  122. learning3d-0.0.1/src/learning3d.egg-info/PKG-INFO +271 -0
  123. learning3d-0.0.1/src/learning3d.egg-info/SOURCES.txt +124 -0
  124. learning3d-0.0.1/src/learning3d.egg-info/dependency_links.txt +1 -0
  125. learning3d-0.0.1/src/learning3d.egg-info/requires.txt +12 -0
  126. learning3d-0.0.1/src/learning3d.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2010-2019 Google, Inc. http://angularjs.org
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,2 @@
1
+ global-include *.cu *.h *.cpp *.egg-info *.so *.o *.egg *.cuh *.txt
2
+ global-exclude *__pycache__* *.pyc
@@ -0,0 +1,271 @@
1
+ Metadata-Version: 2.1
2
+ Name: learning3d
3
+ Version: 0.0.1
4
+ Summary: Learning3D: A Modern Library for Deep Learning on 3D Point Clouds Data
5
+ Author-email: Vinit Sarode <vinitsarode5@gmail.com>
6
+ Project-URL: Homepage, https://github.com/vinits5/learning3d
7
+ Project-URL: Issues, https://github.com/vinits5/learning3d/issues
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: torch==2.0.1
15
+ Requires-Dist: torchvision==0.15.2
16
+ Requires-Dist: h5py==3.8.0
17
+ Requires-Dist: ninja==1.11.1
18
+ Requires-Dist: open3d==0.17.0
19
+ Requires-Dist: tensorboardX==2.6
20
+ Requires-Dist: tqdm==4.65.0
21
+ Requires-Dist: scikit-learn==1.2.2
22
+ Requires-Dist: scipy==1.10.1
23
+ Requires-Dist: numpy==1.24.3
24
+ Requires-Dist: transforms3d==0.4.1
25
+ Requires-Dist: pycuda
26
+
27
+ <p align="center">
28
+ <img src="https://github.com/vinits5/learning3d/blob/master/images/logo.png" height="170">
29
+ </p>
30
+
31
+ # Learning3D: A Modern Library for Deep Learning on 3D Point Clouds Data.
32
+
33
+ **[Documentation](https://github.com/vinits5/learning3d#documentation) | [Blog](https://medium.com/@vinitsarode5/learning3d-a-modern-library-for-deep-learning-on-3d-point-clouds-data-48adc1fd3e0?sk=0beb59651e5ce980243bcdfbf0859b7a) | [Demo](https://github.com/vinits5/learning3d/blob/master/examples/test_pointnet.py)**
34
+
35
+ Learning3D is an open-source library that supports the development of deep learning algorithms that deal with 3D data. The Learning3D exposes a set of state of art deep neural networks in python. A modular code has been provided for further development. We welcome contributions from the open-source community.
36
+
37
+ ## Latest News:
38
+ 1. \[24 Oct, 2023\]: [MaskNet++](https://github.com/zhouruqin/MaskNet2) is now a part of learning3d library.
39
+ 2. \[12 May, 2022\]: [ChamferDistance](https://github.com/fwilliams/fml) loss function is incorporated in learning3d. This is a purely pytorch based loss function.
40
+ 3. \[24 Dec. 2020\]: [MaskNet](https://arxiv.org/pdf/2010.09185.pdf) is now ready to enhance the performance of registration algorithms in learning3d for occluded point clouds.
41
+ 4. \[24 Dec. 2020\]: Loss based on the predicted and ground truth correspondences is added in learning3d after consideration of [Correspondence Matrices are Underrated](https://arxiv.org/pdf/2010.16085.pdf) paper.
42
+ 5. \[24 Dec. 2020\]: [PointConv](https://arxiv.org/abs/1811.07246), latent feature estimation using convolutions on point clouds is now available in learning3d.
43
+ 6. \[16 Oct. 2020\]: [DeepGMR](https://wentaoyuan.github.io/deepgmr/), registration using gaussian mixture models is now available in learning3d
44
+ 7. \[14 Oct. 2020\]: Now, use your own data in learning3d. (Check out [UserData](https://github.com/vinits5/learning3d#use-your-own-data) functionality!)
45
+
46
+ ## Available Computer Vision Algorithms in Learning3D
47
+
48
+ | Sr. No. | Tasks | Algorithms |
49
+ |:-------------:|:----------:|:-----|
50
+ | 1 | [Classification](https://github.com/vinits5/learning3d#use-of-classification--segmentation-network) | PointNet, DGCNN, PPFNet, [PointConv](https://github.com/vinits5/learning3d#use-of-pointconv) |
51
+ | 2 | [Segmentation](https://github.com/vinits5/learning3d#use-of-classification--segmentation-network) | PointNet, DGCNN |
52
+ | 3 | [Reconstruction](https://github.com/vinits5/learning3d#use-of-point-completion-network) | Point Completion Network (PCN) |
53
+ | 4 | [Registration](https://github.com/vinits5/learning3d#use-of-registration-networks) | PointNetLK, PCRNet, DCP, PRNet, RPM-Net, DeepGMR |
54
+ | 5 | [Flow Estimation](https://github.com/vinits5/learning3d#use-of-flow-estimation-network) | FlowNet3D |
55
+ | 6 | [Inlier Estimation](https://github.com/vinits5/learning3d#use-of-inlier-estimation-network-masknet) | MaskNet, MaskNet++ |
56
+
57
+ ## Available Pretrained Models
58
+ 1. PointNet
59
+ 2. PCN
60
+ 3. PointNetLK
61
+ 4. PCRNet
62
+ 5. DCP
63
+ 6. PRNet
64
+ 7. FlowNet3D
65
+ 8. RPM-Net (clean-trained.pth, noisy-trained.pth, partial-pretrained.pth)
66
+ 9. DeepGMR
67
+ 10. PointConv (Download from this [link](https://github.com/DylanWusee/pointconv_pytorch/blob/master/checkpoints/checkpoint.pth))
68
+ 11. MaskNet
69
+ 12. MaskNet++ / MaskNet2
70
+
71
+ ## Available Datasets
72
+ 1. ModelNet40
73
+
74
+ ## Available Loss Functions
75
+ 1. Classification Loss (Cross Entropy)
76
+ 2. Registration Losses (FrobeniusNormLoss, RMSEFeaturesLoss)
77
+ 3. Distance Losses (Chamfer Distance, Earth Mover's Distance)
78
+ 4. Correspondence Loss (based on this [paper](https://arxiv.org/pdf/2010.16085.pdf))
79
+
80
+ ## Technical Details
81
+ ### Supported OS
82
+ 1. Ubuntu 16.04
83
+ 2. Ubuntu 18.04
84
+ 3. Ubuntu 20.04.6
85
+ 3. Linux Mint
86
+
87
+ ### Requirements
88
+ 1. CUDA 10.0 or higher
89
+ 2. Pytorch 1.3 or higher
90
+ 3. Python 3.8
91
+
92
+ ## How to use this library?
93
+ **Important Note: Clone this repository in your project. Please don't add your codes in "learning3d" folder.**
94
+
95
+ 1. All networks are defined in the module "models".
96
+ 2. All loss functions are defined in the module "losses".
97
+ 3. Data loaders are pre-defined in data_utils/dataloaders.py file.
98
+ 4. All pretrained models are provided in learning3d/pretrained folder.
99
+
100
+ ## Documentation
101
+ B: Batch Size, N: No. of points and C: Channels.
102
+ #### Use of Point Embedding Networks:
103
+ > from learning3d.models import PointNet, DGCNN, PPFNet\
104
+ > pn = PointNet(emb_dims=1024, input_shape='bnc', use_bn=False)\
105
+ > dgcnn = DGCNN(emb_dims=1024, input_shape='bnc')\
106
+ > ppf = PPFNet(features=['ppf', 'dxyz', 'xyz'], emb_dims=96, radius='0.3', num_neighbours=64)
107
+
108
+ | Sr. No. | Variable | Data type | Shape | Choices | Use |
109
+ |:---:|:---:|:---:|:---:|:---:|:---:|
110
+ | 1. | emb_dims | Integer | Scalar | 1024, 512 | Size of feature vector for the each point|
111
+ | 2. | input_shape | String | - | 'bnc', 'bcn' | Shape of input point cloud|
112
+ | 3. | output | tensor | BxCxN | - | High dimensional embeddings for each point|
113
+ | 4. | features | List of Strings | - | ['ppf', 'dxyz', 'xyz'] | Use of various features |
114
+ | 5. | radius | Float | Scalar | 0.3 | Radius of cluster for computing local features |
115
+ | 6. | num_neighbours | Integer | Scalar | 64 | Maximum number of points to consider per cluster |
116
+
117
+ #### Use of Classification / Segmentation Network:
118
+ > from learning3d.models import Classifier, PointNet, Segmentation\
119
+ > classifier = Classifier(feature_model=PointNet(), num_classes=40)\
120
+ > seg = Segmentation(feature_model=PointNet(), num_classes=40)
121
+
122
+ | Sr. No. | Variable | Data type | Shape | Choices | Use |
123
+ |:---:|:---:|:---:|:---:|:---:|:---:|
124
+ | 1. | feature_model | Object | - | PointNet / DGCNN | Point cloud embedding network |
125
+ | 2. | num_classes | Integer | Scalar | 10, 40 | Number of object categories to be classified |
126
+ | 3. | output | tensor | Classification: Bx40, Segmentation: BxNx40 | 10, 40 | Probabilities of each category or each point |
127
+
128
+ #### Use of Registration Networks:
129
+ > from learning3d.models import PointNet, PointNetLK, DCP, iPCRNet, PRNet, PPFNet, RPMNet\
130
+ > pnlk = PointNetLK(feature_model=PointNet(), delta=1e-02, xtol=1e-07, p0_zero_mean=True, p1_zero_mean=True, pooling='max')\
131
+ > dcp = DCP(feature_model=PointNet(), pointer_='transformer', head='svd')\
132
+ > pcrnet = iPCRNet(feature_moodel=PointNet(), pooling='max')\
133
+ > rpmnet = RPMNet(feature_model=PPFNet())\
134
+ > deepgmr = DeepGMR(use_rri=True, feature_model=PointNet(), nearest_neighbors=20)
135
+
136
+ | Sr. No. | Variable | Data type | Choices | Use | Algorithm |
137
+ |:---:|:---:|:---:|:---:|:---:|:---:|
138
+ | 1. | feature_model | Object | PointNet / DGCNN | Point cloud embedding network | PointNetLK |
139
+ | 2. | delta | Float | Scalar | Parameter to calculate approximate jacobian | PointNetLK |
140
+ | 3. | xtol | Float | Scalar | Check tolerance to stop iterations | PointNetLK |
141
+ | 4. | p0_zero_mean | Boolean | True/False | Subtract mean from template point cloud | PointNetLK |
142
+ | 5. | p1_zero_mean | Boolean | True/False | Subtract mean from source point cloud | PointNetLK |
143
+ | 6. | pooling | String | 'max' / 'avg' | Type of pooling used to get global feature vectror | PointNetLK |
144
+ | 7. | pointer_ | String | 'transformer' / 'identity' | Choice for Transformer/Attention network | DCP |
145
+ | 8. | head | String | 'svd' / 'mlp' | Choice of module to estimate registration params | DCP |
146
+ | 9. | use_rri | Boolean | True/False | Use nearest neighbors to estimate point cloud features. | DeepGMR |
147
+ | 10. | nearest_neighbores | Integer | 20/any integer | Give number of nearest neighbors used to estimate features | DeepGMR |
148
+
149
+ #### Use of Inlier Estimation Network (MaskNet):
150
+ > from learning3d.models import MaskNet, PointNet, MaskNet2\
151
+ > masknet = MaskNet(feature_model=PointNet(), is_training=True)
152
+ > masknet2 = MaskNet2(feature_model=PointNet(), is_training=True)
153
+
154
+ | Sr. No. | Variable | Data type | Choices | Use |
155
+ |:---:|:---:|:---:|:---:|:---:|
156
+ | 1. | feature_model | Object | PointNet / DGCNN | Point cloud embedding network |
157
+ | 2. | is_training | Boolean | True / False | Specify if the network will undergo training or testing |
158
+
159
+ #### Use of Point Completion Network:
160
+ > from learning3d.models import PCN\
161
+ > pcn = PCN(emb_dims=1024, input_shape='bnc', num_coarse=1024, grid_size=4, detailed_output=True)
162
+
163
+ | Sr. No. | Variable | Data type | Choices | Use |
164
+ |:---:|:---:|:---:|:---:|:---:|
165
+ | 1. | emb_dims | Integer | 1024, 512 | Size of feature vector for each point |
166
+ | 2. | input_shape | String | 'bnc' / 'bcn' | Shape of input point cloud |
167
+ | 3. | num_coarse | Integer | 1024 | Shape of output point cloud |
168
+ | 4. | grid_size | Integer | 4, 8, 16 | Size of grid used to produce detailed output |
169
+ | 5. | detailed_output | Boolean | True / False | Choice for additional module to create detailed output point cloud|
170
+
171
+ #### Use of PointConv:
172
+ Use the following to create pretrained model provided by authors.
173
+ > from learning3d.models import create_pointconv\
174
+ > PointConv = create_pointconv(classifier=True, pretrained='path of checkpoint')\
175
+ > ptconv = PointConv(emb_dims=1024, input_shape='bnc', input_channel_dim=6, classifier=True)
176
+
177
+ **OR**\
178
+ Use the following to create your own PointConv model.
179
+
180
+ > PointConv = create_pointconv(classifier=False, pretrained=None)\
181
+ > ptconv = PointConv(emb_dims=1024, input_shape='bnc', input_channel_dim=3, classifier=True)
182
+
183
+ PointConv variable is a class. Users can use it to create a sub-class to override *create_classifier* and *create_structure* methods in order to change PointConv's network architecture.
184
+
185
+ | Sr. No. | Variable | Data type | Choices | Use |
186
+ |:---:|:---:|:---:|:---:|:---:|
187
+ | 1. | emb_dims | Integer | 1024, 512 | Size of feature vector for each point |
188
+ | 2. | input_shape | String | 'bnc' / 'bcn' | Shape of input point cloud |
189
+ | 3. | input_channel_dim | Integer | 3/6 | Define if point cloud contains only xyz co-ordinates or normals and colors as well |
190
+ | 4. | classifier | Boolean | True / False | Choose if you want to use a classifier with PointConv |
191
+ | 5. | pretrained | Boolean | String | Give path of the pretrained classifier model (only use it for weights given by authors) |
192
+
193
+ #### Use of Flow Estimation Network:
194
+ > from learning3d.models import FlowNet3D\
195
+ > flownet = FlowNet3D()
196
+
197
+ #### Use of Data Loaders:
198
+ > from learning3d.data_utils import ModelNet40Data, ClassificationData, RegistrationData, FlowData\
199
+ > modelnet40 = ModelNet40Data(train=True, num_points=1024, download=True)\
200
+ > classification_data = ClassificationData(data_class=ModelNet40Data())\
201
+ > registration_data = RegistrationData(algorithm='PointNetLK', data_class=ModelNet40Data(), partial_source=False, partial_template=False, noise=False)\
202
+ > flow_data = FlowData()
203
+
204
+ | Sr. No. | Variable | Data type | Choices | Use |
205
+ |:---:|:---:|:---:|:---:|:---:|
206
+ | 1. | train | Boolean | True / False | Split data as train/test set |
207
+ | 2. | num_points | Integer | 1024 | Number of points in each point cloud |
208
+ | 3. | download | Boolean | True / False | If data not available then download it |
209
+ | 4. | data_class | Object | - | Specify which dataset to use |
210
+ | 5. | algorithm | String | 'PointNetLK', 'PCRNet', 'DCP', 'iPCRNet' | Algorithm used for registration |
211
+ | 6. | partial_source | Boolean | True / False | Create partial source point cloud |
212
+ | 7. | partial_template | Boolean | True / False | Create partial template point cloud |
213
+ | 8. | noise | Boolean | True / False | Add noise in source point cloud |
214
+
215
+ #### Use Your Own Data:
216
+ > from learning3d.data_utils import UserData\
217
+ > dataset = UserData(application, data_dict)
218
+
219
+ |Sr. No. | Application | Required Key | Respective Value |
220
+ |:---:|:---:|:---:|:---:|
221
+ | 1. | 'classification' | 'pcs' | Point Clouds (BxNx3) |
222
+ | | | 'labels' | Ground Truth Class Labels (BxN) |
223
+ | 2. | 'registration' | 'template' | Template Point Clouds (BxNx3) |
224
+ | | | 'source' | Source Point Clouds (BxNx3) |
225
+ | | | 'transformation' | Ground Truth Transformation (Bx4x4)|
226
+ | 3. | 'flow_estimation' | 'frame1' | Point Clouds (BxNx3) |
227
+ | | | 'frame2' | Point Clouds (BxNx3) |
228
+ | | | 'flow' | Ground Truth Flow Vector (BxNx3)|
229
+
230
+ #### Use of Loss Functions:
231
+ > from learning3d.losses import RMSEFeaturesLoss, FrobeniusNormLoss, ClassificationLoss, EMDLoss, ChamferDistanceLoss, CorrespondenceLoss\
232
+ > rmse = RMSEFeaturesLoss()\
233
+ > fn_loss = FrobeniusNormLoss()\
234
+ > classification_loss = ClassificationLoss()\
235
+ > emd = EMDLoss()\
236
+ > cd = ChamferDistanceLoss()\
237
+ > corr = CorrespondenceLoss()
238
+
239
+ | Sr. No. | Loss Type | Use |
240
+ |:---:|:---:|:---:|
241
+ | 1. | RMSEFeaturesLoss | Used to find root mean square value between two global feature vectors of point clouds |
242
+ | 2. | FrobeniusNormLoss | Used to find frobenius norm between two transfromation matrices |
243
+ | 3. | ClassificationLoss | Used to calculate cross-entropy loss |
244
+ | 4. | EMDLoss | Earth Mover's distance between two given point clouds |
245
+ | 5. | ChamferDistanceLoss | Chamfer's distance between two given point clouds |
246
+ | 6. | CorrespondenceLoss | Computes cross entropy loss using the predicted correspondence and ground truth correspondence for each source point |
247
+
248
+ ### To run codes from examples:
249
+ 1. Copy the file from "examples" folder outside of the directory "learning3d"
250
+ 2. Now, run the file. (ex. python test_pointnet.py)
251
+ - Your Directory/Location
252
+ - learning3d
253
+ - test_pointnet.py
254
+
255
+ ### References:
256
+ 1. [PointNet:](https://arxiv.org/abs/1612.00593) Deep Learning on Point Sets for 3D Classification and Segmentation
257
+ 2. [Dynamic Graph CNN](https://arxiv.org/abs/1801.07829) for Learning on Point Clouds
258
+ 3. [PPFNet:](https://arxiv.org/pdf/1802.02669.pdf) Global Context Aware Local Features for Robust 3D Point Matching
259
+ 4. [PointConv:](https://arxiv.org/abs/1811.07246) Deep Convolutional Networks on 3D Point Clouds
260
+ 5. [PointNetLK:](https://arxiv.org/abs/1903.05711) Robust & Efficient Point Cloud Registration using PointNet
261
+ 6. [PCRNet:](https://arxiv.org/abs/1908.07906) Point Cloud Registration Network using PointNet Encoding
262
+ 7. [Deep Closest Point:](https://arxiv.org/abs/1905.03304) Learning Representations for Point Cloud Registration
263
+ 8. [PRNet:](https://arxiv.org/abs/1910.12240) Self-Supervised Learning for Partial-to-Partial Registration
264
+ 9. [FlowNet3D:](https://arxiv.org/abs/1806.01411) Learning Scene Flow in 3D Point Clouds
265
+ 10. [PCN:](https://arxiv.org/pdf/1808.00671.pdf) Point Completion Network
266
+ 11. [RPM-Net:](https://arxiv.org/pdf/2003.13479.pdf) Robust Point Matching using Learned Features
267
+ 12. [3D ShapeNets:](https://people.csail.mit.edu/khosla/papers/cvpr2015_wu.pdf) A Deep Representation for Volumetric Shapes
268
+ 13. [DeepGMR:](https://arxiv.org/abs/2008.09088) Learning Latent Gaussian Mixture Models for Registration
269
+ 14. [CMU:](https://arxiv.org/pdf/2010.16085.pdf) Correspondence Matrices are Underrated
270
+ 15. [MaskNet:](https://arxiv.org/pdf/2010.09185.pdf) A Fully-Convolutional Network to Estimate Inlier Points
271
+ 16. [MaskNet++:](https://www.sciencedirect.com/science/article/abs/pii/S0097849322000085) Inlier/outlier identification for two point clouds
@@ -0,0 +1,245 @@
1
+ <p align="center">
2
+ <img src="https://github.com/vinits5/learning3d/blob/master/images/logo.png" height="170">
3
+ </p>
4
+
5
+ # Learning3D: A Modern Library for Deep Learning on 3D Point Clouds Data.
6
+
7
+ **[Documentation](https://github.com/vinits5/learning3d#documentation) | [Blog](https://medium.com/@vinitsarode5/learning3d-a-modern-library-for-deep-learning-on-3d-point-clouds-data-48adc1fd3e0?sk=0beb59651e5ce980243bcdfbf0859b7a) | [Demo](https://github.com/vinits5/learning3d/blob/master/examples/test_pointnet.py)**
8
+
9
+ Learning3D is an open-source library that supports the development of deep learning algorithms that deal with 3D data. The Learning3D exposes a set of state of art deep neural networks in python. A modular code has been provided for further development. We welcome contributions from the open-source community.
10
+
11
+ ## Latest News:
12
+ 1. \[24 Oct, 2023\]: [MaskNet++](https://github.com/zhouruqin/MaskNet2) is now a part of learning3d library.
13
+ 2. \[12 May, 2022\]: [ChamferDistance](https://github.com/fwilliams/fml) loss function is incorporated in learning3d. This is a purely pytorch based loss function.
14
+ 3. \[24 Dec. 2020\]: [MaskNet](https://arxiv.org/pdf/2010.09185.pdf) is now ready to enhance the performance of registration algorithms in learning3d for occluded point clouds.
15
+ 4. \[24 Dec. 2020\]: Loss based on the predicted and ground truth correspondences is added in learning3d after consideration of [Correspondence Matrices are Underrated](https://arxiv.org/pdf/2010.16085.pdf) paper.
16
+ 5. \[24 Dec. 2020\]: [PointConv](https://arxiv.org/abs/1811.07246), latent feature estimation using convolutions on point clouds is now available in learning3d.
17
+ 6. \[16 Oct. 2020\]: [DeepGMR](https://wentaoyuan.github.io/deepgmr/), registration using gaussian mixture models is now available in learning3d
18
+ 7. \[14 Oct. 2020\]: Now, use your own data in learning3d. (Check out [UserData](https://github.com/vinits5/learning3d#use-your-own-data) functionality!)
19
+
20
+ ## Available Computer Vision Algorithms in Learning3D
21
+
22
+ | Sr. No. | Tasks | Algorithms |
23
+ |:-------------:|:----------:|:-----|
24
+ | 1 | [Classification](https://github.com/vinits5/learning3d#use-of-classification--segmentation-network) | PointNet, DGCNN, PPFNet, [PointConv](https://github.com/vinits5/learning3d#use-of-pointconv) |
25
+ | 2 | [Segmentation](https://github.com/vinits5/learning3d#use-of-classification--segmentation-network) | PointNet, DGCNN |
26
+ | 3 | [Reconstruction](https://github.com/vinits5/learning3d#use-of-point-completion-network) | Point Completion Network (PCN) |
27
+ | 4 | [Registration](https://github.com/vinits5/learning3d#use-of-registration-networks) | PointNetLK, PCRNet, DCP, PRNet, RPM-Net, DeepGMR |
28
+ | 5 | [Flow Estimation](https://github.com/vinits5/learning3d#use-of-flow-estimation-network) | FlowNet3D |
29
+ | 6 | [Inlier Estimation](https://github.com/vinits5/learning3d#use-of-inlier-estimation-network-masknet) | MaskNet, MaskNet++ |
30
+
31
+ ## Available Pretrained Models
32
+ 1. PointNet
33
+ 2. PCN
34
+ 3. PointNetLK
35
+ 4. PCRNet
36
+ 5. DCP
37
+ 6. PRNet
38
+ 7. FlowNet3D
39
+ 8. RPM-Net (clean-trained.pth, noisy-trained.pth, partial-pretrained.pth)
40
+ 9. DeepGMR
41
+ 10. PointConv (Download from this [link](https://github.com/DylanWusee/pointconv_pytorch/blob/master/checkpoints/checkpoint.pth))
42
+ 11. MaskNet
43
+ 12. MaskNet++ / MaskNet2
44
+
45
+ ## Available Datasets
46
+ 1. ModelNet40
47
+
48
+ ## Available Loss Functions
49
+ 1. Classification Loss (Cross Entropy)
50
+ 2. Registration Losses (FrobeniusNormLoss, RMSEFeaturesLoss)
51
+ 3. Distance Losses (Chamfer Distance, Earth Mover's Distance)
52
+ 4. Correspondence Loss (based on this [paper](https://arxiv.org/pdf/2010.16085.pdf))
53
+
54
+ ## Technical Details
55
+ ### Supported OS
56
+ 1. Ubuntu 16.04
57
+ 2. Ubuntu 18.04
58
+ 3. Ubuntu 20.04.6
59
+ 3. Linux Mint
60
+
61
+ ### Requirements
62
+ 1. CUDA 10.0 or higher
63
+ 2. Pytorch 1.3 or higher
64
+ 3. Python 3.8
65
+
66
+ ## How to use this library?
67
+ **Important Note: Clone this repository in your project. Please don't add your codes in "learning3d" folder.**
68
+
69
+ 1. All networks are defined in the module "models".
70
+ 2. All loss functions are defined in the module "losses".
71
+ 3. Data loaders are pre-defined in data_utils/dataloaders.py file.
72
+ 4. All pretrained models are provided in learning3d/pretrained folder.
73
+
74
+ ## Documentation
75
+ B: Batch Size, N: No. of points and C: Channels.
76
+ #### Use of Point Embedding Networks:
77
+ > from learning3d.models import PointNet, DGCNN, PPFNet\
78
+ > pn = PointNet(emb_dims=1024, input_shape='bnc', use_bn=False)\
79
+ > dgcnn = DGCNN(emb_dims=1024, input_shape='bnc')\
80
+ > ppf = PPFNet(features=['ppf', 'dxyz', 'xyz'], emb_dims=96, radius='0.3', num_neighbours=64)
81
+
82
+ | Sr. No. | Variable | Data type | Shape | Choices | Use |
83
+ |:---:|:---:|:---:|:---:|:---:|:---:|
84
+ | 1. | emb_dims | Integer | Scalar | 1024, 512 | Size of feature vector for the each point|
85
+ | 2. | input_shape | String | - | 'bnc', 'bcn' | Shape of input point cloud|
86
+ | 3. | output | tensor | BxCxN | - | High dimensional embeddings for each point|
87
+ | 4. | features | List of Strings | - | ['ppf', 'dxyz', 'xyz'] | Use of various features |
88
+ | 5. | radius | Float | Scalar | 0.3 | Radius of cluster for computing local features |
89
+ | 6. | num_neighbours | Integer | Scalar | 64 | Maximum number of points to consider per cluster |
90
+
91
+ #### Use of Classification / Segmentation Network:
92
+ > from learning3d.models import Classifier, PointNet, Segmentation\
93
+ > classifier = Classifier(feature_model=PointNet(), num_classes=40)\
94
+ > seg = Segmentation(feature_model=PointNet(), num_classes=40)
95
+
96
+ | Sr. No. | Variable | Data type | Shape | Choices | Use |
97
+ |:---:|:---:|:---:|:---:|:---:|:---:|
98
+ | 1. | feature_model | Object | - | PointNet / DGCNN | Point cloud embedding network |
99
+ | 2. | num_classes | Integer | Scalar | 10, 40 | Number of object categories to be classified |
100
+ | 3. | output | tensor | Classification: Bx40, Segmentation: BxNx40 | 10, 40 | Probabilities of each category or each point |
101
+
102
+ #### Use of Registration Networks:
103
+ > from learning3d.models import PointNet, PointNetLK, DCP, iPCRNet, PRNet, PPFNet, RPMNet\
104
+ > pnlk = PointNetLK(feature_model=PointNet(), delta=1e-02, xtol=1e-07, p0_zero_mean=True, p1_zero_mean=True, pooling='max')\
105
+ > dcp = DCP(feature_model=PointNet(), pointer_='transformer', head='svd')\
106
+ > pcrnet = iPCRNet(feature_moodel=PointNet(), pooling='max')\
107
+ > rpmnet = RPMNet(feature_model=PPFNet())\
108
+ > deepgmr = DeepGMR(use_rri=True, feature_model=PointNet(), nearest_neighbors=20)
109
+
110
+ | Sr. No. | Variable | Data type | Choices | Use | Algorithm |
111
+ |:---:|:---:|:---:|:---:|:---:|:---:|
112
+ | 1. | feature_model | Object | PointNet / DGCNN | Point cloud embedding network | PointNetLK |
113
+ | 2. | delta | Float | Scalar | Parameter to calculate approximate jacobian | PointNetLK |
114
+ | 3. | xtol | Float | Scalar | Check tolerance to stop iterations | PointNetLK |
115
+ | 4. | p0_zero_mean | Boolean | True/False | Subtract mean from template point cloud | PointNetLK |
116
+ | 5. | p1_zero_mean | Boolean | True/False | Subtract mean from source point cloud | PointNetLK |
117
+ | 6. | pooling | String | 'max' / 'avg' | Type of pooling used to get global feature vectror | PointNetLK |
118
+ | 7. | pointer_ | String | 'transformer' / 'identity' | Choice for Transformer/Attention network | DCP |
119
+ | 8. | head | String | 'svd' / 'mlp' | Choice of module to estimate registration params | DCP |
120
+ | 9. | use_rri | Boolean | True/False | Use nearest neighbors to estimate point cloud features. | DeepGMR |
121
+ | 10. | nearest_neighbores | Integer | 20/any integer | Give number of nearest neighbors used to estimate features | DeepGMR |
122
+
123
+ #### Use of Inlier Estimation Network (MaskNet):
124
+ > from learning3d.models import MaskNet, PointNet, MaskNet2\
125
+ > masknet = MaskNet(feature_model=PointNet(), is_training=True)
126
+ > masknet2 = MaskNet2(feature_model=PointNet(), is_training=True)
127
+
128
+ | Sr. No. | Variable | Data type | Choices | Use |
129
+ |:---:|:---:|:---:|:---:|:---:|
130
+ | 1. | feature_model | Object | PointNet / DGCNN | Point cloud embedding network |
131
+ | 2. | is_training | Boolean | True / False | Specify if the network will undergo training or testing |
132
+
133
+ #### Use of Point Completion Network:
134
+ > from learning3d.models import PCN\
135
+ > pcn = PCN(emb_dims=1024, input_shape='bnc', num_coarse=1024, grid_size=4, detailed_output=True)
136
+
137
+ | Sr. No. | Variable | Data type | Choices | Use |
138
+ |:---:|:---:|:---:|:---:|:---:|
139
+ | 1. | emb_dims | Integer | 1024, 512 | Size of feature vector for each point |
140
+ | 2. | input_shape | String | 'bnc' / 'bcn' | Shape of input point cloud |
141
+ | 3. | num_coarse | Integer | 1024 | Shape of output point cloud |
142
+ | 4. | grid_size | Integer | 4, 8, 16 | Size of grid used to produce detailed output |
143
+ | 5. | detailed_output | Boolean | True / False | Choice for additional module to create detailed output point cloud|
144
+
145
+ #### Use of PointConv:
146
+ Use the following to create pretrained model provided by authors.
147
+ > from learning3d.models import create_pointconv\
148
+ > PointConv = create_pointconv(classifier=True, pretrained='path of checkpoint')\
149
+ > ptconv = PointConv(emb_dims=1024, input_shape='bnc', input_channel_dim=6, classifier=True)
150
+
151
+ **OR**\
152
+ Use the following to create your own PointConv model.
153
+
154
+ > PointConv = create_pointconv(classifier=False, pretrained=None)\
155
+ > ptconv = PointConv(emb_dims=1024, input_shape='bnc', input_channel_dim=3, classifier=True)
156
+
157
+ PointConv variable is a class. Users can use it to create a sub-class to override *create_classifier* and *create_structure* methods in order to change PointConv's network architecture.
158
+
159
+ | Sr. No. | Variable | Data type | Choices | Use |
160
+ |:---:|:---:|:---:|:---:|:---:|
161
+ | 1. | emb_dims | Integer | 1024, 512 | Size of feature vector for each point |
162
+ | 2. | input_shape | String | 'bnc' / 'bcn' | Shape of input point cloud |
163
+ | 3. | input_channel_dim | Integer | 3/6 | Define if point cloud contains only xyz co-ordinates or normals and colors as well |
164
+ | 4. | classifier | Boolean | True / False | Choose if you want to use a classifier with PointConv |
165
+ | 5. | pretrained | Boolean | String | Give path of the pretrained classifier model (only use it for weights given by authors) |
166
+
167
+ #### Use of Flow Estimation Network:
168
+ > from learning3d.models import FlowNet3D\
169
+ > flownet = FlowNet3D()
170
+
171
+ #### Use of Data Loaders:
172
+ > from learning3d.data_utils import ModelNet40Data, ClassificationData, RegistrationData, FlowData\
173
+ > modelnet40 = ModelNet40Data(train=True, num_points=1024, download=True)\
174
+ > classification_data = ClassificationData(data_class=ModelNet40Data())\
175
+ > registration_data = RegistrationData(algorithm='PointNetLK', data_class=ModelNet40Data(), partial_source=False, partial_template=False, noise=False)\
176
+ > flow_data = FlowData()
177
+
178
+ | Sr. No. | Variable | Data type | Choices | Use |
179
+ |:---:|:---:|:---:|:---:|:---:|
180
+ | 1. | train | Boolean | True / False | Split data as train/test set |
181
+ | 2. | num_points | Integer | 1024 | Number of points in each point cloud |
182
+ | 3. | download | Boolean | True / False | If data not available then download it |
183
+ | 4. | data_class | Object | - | Specify which dataset to use |
184
+ | 5. | algorithm | String | 'PointNetLK', 'PCRNet', 'DCP', 'iPCRNet' | Algorithm used for registration |
185
+ | 6. | partial_source | Boolean | True / False | Create partial source point cloud |
186
+ | 7. | partial_template | Boolean | True / False | Create partial template point cloud |
187
+ | 8. | noise | Boolean | True / False | Add noise in source point cloud |
188
+
189
+ #### Use Your Own Data:
190
+ > from learning3d.data_utils import UserData\
191
+ > dataset = UserData(application, data_dict)
192
+
193
+ |Sr. No. | Application | Required Key | Respective Value |
194
+ |:---:|:---:|:---:|:---:|
195
+ | 1. | 'classification' | 'pcs' | Point Clouds (BxNx3) |
196
+ | | | 'labels' | Ground Truth Class Labels (BxN) |
197
+ | 2. | 'registration' | 'template' | Template Point Clouds (BxNx3) |
198
+ | | | 'source' | Source Point Clouds (BxNx3) |
199
+ | | | 'transformation' | Ground Truth Transformation (Bx4x4)|
200
+ | 3. | 'flow_estimation' | 'frame1' | Point Clouds (BxNx3) |
201
+ | | | 'frame2' | Point Clouds (BxNx3) |
202
+ | | | 'flow' | Ground Truth Flow Vector (BxNx3)|
203
+
204
+ #### Use of Loss Functions:
205
+ > from learning3d.losses import RMSEFeaturesLoss, FrobeniusNormLoss, ClassificationLoss, EMDLoss, ChamferDistanceLoss, CorrespondenceLoss\
206
+ > rmse = RMSEFeaturesLoss()\
207
+ > fn_loss = FrobeniusNormLoss()\
208
+ > classification_loss = ClassificationLoss()\
209
+ > emd = EMDLoss()\
210
+ > cd = ChamferDistanceLoss()\
211
+ > corr = CorrespondenceLoss()
212
+
213
+ | Sr. No. | Loss Type | Use |
214
+ |:---:|:---:|:---:|
215
+ | 1. | RMSEFeaturesLoss | Used to find root mean square value between two global feature vectors of point clouds |
216
+ | 2. | FrobeniusNormLoss | Used to find frobenius norm between two transfromation matrices |
217
+ | 3. | ClassificationLoss | Used to calculate cross-entropy loss |
218
+ | 4. | EMDLoss | Earth Mover's distance between two given point clouds |
219
+ | 5. | ChamferDistanceLoss | Chamfer's distance between two given point clouds |
220
+ | 6. | CorrespondenceLoss | Computes cross entropy loss using the predicted correspondence and ground truth correspondence for each source point |
221
+
222
+ ### To run codes from examples:
223
+ 1. Copy the file from "examples" folder outside of the directory "learning3d"
224
+ 2. Now, run the file. (ex. python test_pointnet.py)
225
+ - Your Directory/Location
226
+ - learning3d
227
+ - test_pointnet.py
228
+
229
+ ### References:
230
+ 1. [PointNet:](https://arxiv.org/abs/1612.00593) Deep Learning on Point Sets for 3D Classification and Segmentation
231
+ 2. [Dynamic Graph CNN](https://arxiv.org/abs/1801.07829) for Learning on Point Clouds
232
+ 3. [PPFNet:](https://arxiv.org/pdf/1802.02669.pdf) Global Context Aware Local Features for Robust 3D Point Matching
233
+ 4. [PointConv:](https://arxiv.org/abs/1811.07246) Deep Convolutional Networks on 3D Point Clouds
234
+ 5. [PointNetLK:](https://arxiv.org/abs/1903.05711) Robust & Efficient Point Cloud Registration using PointNet
235
+ 6. [PCRNet:](https://arxiv.org/abs/1908.07906) Point Cloud Registration Network using PointNet Encoding
236
+ 7. [Deep Closest Point:](https://arxiv.org/abs/1905.03304) Learning Representations for Point Cloud Registration
237
+ 8. [PRNet:](https://arxiv.org/abs/1910.12240) Self-Supervised Learning for Partial-to-Partial Registration
238
+ 9. [FlowNet3D:](https://arxiv.org/abs/1806.01411) Learning Scene Flow in 3D Point Clouds
239
+ 10. [PCN:](https://arxiv.org/pdf/1808.00671.pdf) Point Completion Network
240
+ 11. [RPM-Net:](https://arxiv.org/pdf/2003.13479.pdf) Robust Point Matching using Learned Features
241
+ 12. [3D ShapeNets:](https://people.csail.mit.edu/khosla/papers/cvpr2015_wu.pdf) A Deep Representation for Volumetric Shapes
242
+ 13. [DeepGMR:](https://arxiv.org/abs/2008.09088) Learning Latent Gaussian Mixture Models for Registration
243
+ 14. [CMU:](https://arxiv.org/pdf/2010.16085.pdf) Correspondence Matrices are Underrated
244
+ 15. [MaskNet:](https://arxiv.org/pdf/2010.09185.pdf) A Fully-Convolutional Network to Estimate Inlier Points
245
+ 16. [MaskNet++:](https://www.sciencedirect.com/science/article/abs/pii/S0097849322000085) Inlier/outlier identification for two point clouds
@@ -0,0 +1,40 @@
1
+ airplane
2
+ bathtub
3
+ bed
4
+ bench
5
+ bookshelf
6
+ bottle
7
+ bowl
8
+ car
9
+ chair
10
+ cone
11
+ cup
12
+ curtain
13
+ desk
14
+ door
15
+ dresser
16
+ flower_pot
17
+ glass_box
18
+ guitar
19
+ keyboard
20
+ lamp
21
+ laptop
22
+ mantel
23
+ monitor
24
+ night_stand
25
+ person
26
+ piano
27
+ plant
28
+ radio
29
+ range_hood
30
+ sink
31
+ sofa
32
+ stairs
33
+ stool
34
+ table
35
+ tent
36
+ toilet
37
+ tv_stand
38
+ vase
39
+ wardrobe
40
+ xbox
@@ -0,0 +1,2 @@
1
+ data/modelnet40_ply_hdf5_2048/ply_data_test0.h5
2
+ data/modelnet40_ply_hdf5_2048/ply_data_test1.h5
@@ -0,0 +1,5 @@
1
+ data/modelnet40_ply_hdf5_2048/ply_data_train0.h5
2
+ data/modelnet40_ply_hdf5_2048/ply_data_train1.h5
3
+ data/modelnet40_ply_hdf5_2048/ply_data_train2.h5
4
+ data/modelnet40_ply_hdf5_2048/ply_data_train3.h5
5
+ data/modelnet40_ply_hdf5_2048/ply_data_train4.h5
@@ -0,0 +1,35 @@
1
+ {
2
+ "exp_name": "exp_multi_gpu_v1",
3
+ "model": "prnet",
4
+ "emb_nn": "dgcnn",
5
+ "attention": "transformer",
6
+ "head": "svd",
7
+ "n_emb_dims": 512,
8
+ "n_blocks": 1,
9
+ "n_heads": 4,
10
+ "n_iters": 3,
11
+ "discount_factor": 0.9,
12
+ "n_ff_dims": 1024,
13
+ "n_keypoints": 512,
14
+ "temp_factor": 100,
15
+ "cat_sampler": "softmax",
16
+ "dropout": 0.0,
17
+ "batch_size": 16,
18
+ "test_batch_size": 8,
19
+ "epochs": 100,
20
+ "use_sgd": false,
21
+ "lr": 0.001,
22
+ "momentum": 0.9,
23
+ "no_cuda": false,
24
+ "seed": 1234,
25
+ "eval": false,
26
+ "cycle_consistency_loss": 0.1,
27
+ "feature_alignment_loss": 0.1,
28
+ "gaussian_noise": false,
29
+ "unseen": false,
30
+ "n_points": 1024,
31
+ "n_subsampled_points": 768,
32
+ "dataset": "modelnet40",
33
+ "rot_factor": 4,
34
+ "model_path": ""
35
+ }
@@ -0,0 +1,29 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "learning3d"
7
+ version = "0.0.1"
8
+ authors = [
9
+ { name="Vinit Sarode", email="vinitsarode5@gmail.com"},
10
+ ]
11
+ description = "Learning3D: A Modern Library for Deep Learning on 3D Point Clouds Data"
12
+ readme = "README.md"
13
+ requires-python = ">=3.8"
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ dynamic = ["dependencies"]
20
+
21
+ [tool.setuptools.packages.find]
22
+ where = ["src"]
23
+
24
+ [tool.setuptools.dynamic]
25
+ dependencies = {file = ["requirements.txt"]}
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/vinits5/learning3d"
29
+ Issues = "https://github.com/vinits5/learning3d/issues"