Skip to content

Feature Space Duplication in Implementation #3

@Leerw

Description

@Leerw

The paper says that you expand the number of points in the feature space, but from your implementation, if I got correct, the feature is concatenated with uniformly sampled 2d grids. seems that the paper's demonstration is different with your implementation, so, how about the performance of simply expand the number of points in the feature space? Is it worse than the way in your implementation?

Dis-PU/Common/ops.py

Lines 1152 to 1199 in ee9a74d

def duplicate_up(pc, feature,is_training, up_ratio=4, use_bn=False,bn_decay=False,scope="up_shuffle_layer4", atten=False,edge=False):
with tf.variable_scope(scope,reuse=tf.AUTO_REUSE):
B, N, C = feature.get_shape()
net = tf.expand_dims(feature,axis=2)
# if up_ratio<2:
# grid = gen_1d_grid(up_ratio)
# else:
grid = gen_grid(up_ratio) #[1,R,2]
grid = tf.tile(tf.expand_dims(grid, 0), [tf.shape(net)[0], 1,tf.shape(net)[1]]) # [B,R,2*N]
#grid = tf.tile(tf.expand_dims(grid, 0), [tf.shape(net)[0], tf.shape(net)[1], 1]) # [B,N*R,2]
# [B,N*R,1,2]
grid = tf.reshape(grid, [tf.shape(net)[0], -1, 1, 2])
#grid = tf.expand_dims(grid, axis=2)
net = tf.tile(net, [1, up_ratio, 1, 1])
net = tf.concat([net, grid], axis=-1)
if atten:
net = attention_unit(net, is_training=is_training)
if edge:
net = tf.squeeze(net, axis=2)
net = EdgeConv(net, 256, k=16, is_training=is_training, bn=use_bn, bn_decay=bn_decay,
scope='shuffle_layer_0')
net = EdgeConv(net, 128, k=16, is_training=is_training, bn=use_bn, bn_decay=bn_decay,
scope='shuffle_layer_1')
else:
net = conv2d(net, 256, [1, 1],
padding='VALID', stride=[1, 1],
bn=False, is_training=is_training,
scope='conv1', bn_decay=bn_decay)
net = conv2d(net, 128, [1, 1],
padding='VALID', stride=[1, 1],
bn=False, is_training=is_training,
scope='conv2', bn_decay=bn_decay)
net = tf.squeeze(net,axis=2)
return net

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions