ocnn 2.2.4__tar.gz → 2.2.5__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 (43) hide show
  1. {ocnn-2.2.4/ocnn.egg-info → ocnn-2.2.5}/PKG-INFO +1 -1
  2. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/__init__.py +1 -1
  3. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/autoencoder.py +2 -1
  4. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/ounet.py +1 -2
  5. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/octree/octree.py +21 -2
  6. {ocnn-2.2.4 → ocnn-2.2.5/ocnn.egg-info}/PKG-INFO +1 -1
  7. {ocnn-2.2.4 → ocnn-2.2.5}/setup.py +1 -1
  8. {ocnn-2.2.4 → ocnn-2.2.5}/LICENSE +0 -0
  9. {ocnn-2.2.4 → ocnn-2.2.5}/MANIFEST.in +0 -0
  10. {ocnn-2.2.4 → ocnn-2.2.5}/README.md +0 -0
  11. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/dataset.py +0 -0
  12. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/__init__.py +0 -0
  13. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/hrnet.py +0 -0
  14. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/image2shape.py +0 -0
  15. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/lenet.py +0 -0
  16. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/resnet.py +0 -0
  17. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/segnet.py +0 -0
  18. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/unet.py +0 -0
  19. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/modules/__init__.py +0 -0
  20. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/modules/modules.py +0 -0
  21. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/modules/resblocks.py +0 -0
  22. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/__init__.py +0 -0
  23. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree2col.py +0 -0
  24. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree2vox.py +0 -0
  25. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_align.py +0 -0
  26. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_conv.py +0 -0
  27. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_drop.py +0 -0
  28. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_dwconv.py +0 -0
  29. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_gconv.py +0 -0
  30. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_interp.py +0 -0
  31. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_norm.py +0 -0
  32. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_pad.py +0 -0
  33. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_pool.py +0 -0
  34. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/octree/__init__.py +0 -0
  35. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/octree/points.py +0 -0
  36. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/octree/shuffled_key.py +0 -0
  37. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/utils.py +0 -0
  38. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/SOURCES.txt +0 -0
  39. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/dependency_links.txt +0 -0
  40. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/not-zip-safe +0 -0
  41. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/requires.txt +0 -0
  42. {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/top_level.txt +0 -0
  43. {ocnn-2.2.4 → ocnn-2.2.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ocnn
3
- Version: 2.2.4
3
+ Version: 2.2.5
4
4
  Summary: Octree-based Sparse Convolutional Neural Networks
5
5
  Home-page: https://github.com/octree-nn/ocnn-pytorch
6
6
  Author: Peng-Shuai Wang
@@ -12,7 +12,7 @@ from . import models
12
12
  from . import dataset
13
13
  from . import utils
14
14
 
15
- __version__ = '2.2.4'
15
+ __version__ = '2.2.5'
16
16
 
17
17
  __all__ = [
18
18
  'octree',
@@ -33,8 +33,9 @@ class AutoEncoder(torch.nn.Module):
33
33
  self.full_depth = full_depth
34
34
  self.feature = feature
35
35
  self.resblk_num = 2
36
- self.code_channel = 64 # dim-of-code = code_channel * 2**(3*full_depth)
37
36
  self.channels = [512, 512, 256, 256, 128, 128, 32, 32, 16, 16]
37
+ # dim-of-code = code_channel * 2**(3*full_depth)
38
+ self.code_channel = self.channels[full_depth]
38
39
 
39
40
  # encoder
40
41
  self.conv1 = ocnn.modules.OctreeConvBnRelu(
@@ -18,8 +18,7 @@ class OUNet(AutoEncoder):
18
18
 
19
19
  def __init__(self, channel_in: int, channel_out: int, depth: int,
20
20
  full_depth: int = 2, feature: str = 'ND'):
21
- super().__init__(channel_in, channel_out, depth, full_depth, feature,
22
- code_channel=-1) # !set code_channe=-1
21
+ super().__init__(channel_in, channel_out, depth, full_depth, feature)
23
22
  self.proj = None # remove this module used in AutoEncoder
24
23
 
25
24
  def encoder(self, octree):
@@ -35,7 +35,9 @@ class Octree:
35
35
  and :obj:`points`, contain only non-empty nodes.
36
36
 
37
37
  .. note::
38
- The point cloud must be in range :obj:`[-1, 1]`.
38
+ The point cloud must be strictly in range :obj:`[-1, 1]`. A good practice
39
+ is to normalize it into :obj:`[-0.99, 0.99]` or :obj:`[0.9, 0.9]` to retain
40
+ some margin.
39
41
  '''
40
42
 
41
43
  def __init__(self, depth: int, full_depth: int = 2, batch_size: int = 1,
@@ -176,7 +178,7 @@ class Octree:
176
178
  for d in range(self.depth, self.full_depth, -1):
177
179
  # compute parent key, i.e. keys of layer (d -1)
178
180
  pkey = node_key >> 3
179
- pkey, pidx, pcounts = torch.unique_consecutive(
181
+ pkey, pidx, _ = torch.unique_consecutive(
180
182
  pkey, return_inverse=True, return_counts=True)
181
183
 
182
184
  # augmented key
@@ -287,6 +289,23 @@ class Octree:
287
289
  update_neigh (bool): If True, construct the neighborhood indices.
288
290
  '''
289
291
 
292
+ # increase the octree depth if required
293
+ if depth > self.depth:
294
+ assert depth == self.depth + 1
295
+ self.depth = depth
296
+ self.keys.append(None)
297
+ self.children.append(None)
298
+ self.neighs.append(None)
299
+ self.features.append(None)
300
+ self.normals.append(None)
301
+ self.points.append(None)
302
+ zero = torch.zeros(1, dtype=torch.long)
303
+ self.nnum = torch.cat([self.nnum, zero])
304
+ self.nnum_nempty = torch.cat([self.nnum_nempty, zero])
305
+ zero = zero.view(1, 1)
306
+ self.batch_nnum = torch.cat([self.batch_nnum, zero], dim=0)
307
+ self.batch_nnum_nempty = torch.cat([self.batch_nnum_nempty, zero], dim=0)
308
+
290
309
  # node number
291
310
  nnum = self.nnum_nempty[depth-1] * 8
292
311
  self.nnum[depth] = nnum
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ocnn
3
- Version: 2.2.4
3
+ Version: 2.2.5
4
4
  Summary: Octree-based Sparse Convolutional Neural Networks
5
5
  Home-page: https://github.com/octree-nn/ocnn-pytorch
6
6
  Author: Peng-Shuai Wang
@@ -7,7 +7,7 @@
7
7
 
8
8
  from setuptools import setup, find_packages
9
9
 
10
- __version__ = '2.2.4'
10
+ __version__ = '2.2.5'
11
11
 
12
12
  with open("README.md", "r", encoding="utf-8") as fid:
13
13
  long_description = fid.read()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes