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.
- {ocnn-2.2.4/ocnn.egg-info → ocnn-2.2.5}/PKG-INFO +1 -1
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/__init__.py +1 -1
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/autoencoder.py +2 -1
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/ounet.py +1 -2
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/octree/octree.py +21 -2
- {ocnn-2.2.4 → ocnn-2.2.5/ocnn.egg-info}/PKG-INFO +1 -1
- {ocnn-2.2.4 → ocnn-2.2.5}/setup.py +1 -1
- {ocnn-2.2.4 → ocnn-2.2.5}/LICENSE +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/MANIFEST.in +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/README.md +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/dataset.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/__init__.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/hrnet.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/image2shape.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/lenet.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/resnet.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/segnet.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/models/unet.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/modules/__init__.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/modules/modules.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/modules/resblocks.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/__init__.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree2col.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree2vox.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_align.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_conv.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_drop.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_dwconv.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_gconv.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_interp.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_norm.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_pad.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/nn/octree_pool.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/octree/__init__.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/octree/points.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/octree/shuffled_key.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn/utils.py +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/SOURCES.txt +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/dependency_links.txt +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/not-zip-safe +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/requires.txt +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/ocnn.egg-info/top_level.txt +0 -0
- {ocnn-2.2.4 → ocnn-2.2.5}/setup.cfg +0 -0
|
@@ -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,
|
|
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
|
|
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
|
|
File without changes
|