GeorgeSeif / Semantic-Segmentation-Suite

Semantic Segmentation Suite in TensorFlow. Implement, train, and test new Semantic Segmentation models easily!
2.51k stars 878 forks source link

bug about MultiResolutionFusion in Refinenet.py #218

Closed cena001plus closed 5 years ago

cena001plus commented 5 years ago

the code can run smooth, and result si right ,but i found some question in code , the function MultiResolutionFusion() in RefineNet.py , conv_low_up= upsmapling(conv_low, 2), i think this code should be upsampling(conv_high, 2). because conv_high is smaller than conv_low.

  if high_inputs is None: # RefineNet block 4

        fuse = slim.conv2d(low_inputs, n_filters, 3, activation_fn=None)

        return fuse

    else:

        conv_low = slim.conv2d(low_inputs, n_filters, 3, activation_fn=None)
        conv_high = slim.conv2d(high_inputs, n_filters, 3, activation_fn=None)

        conv_low_up = Upsampling(conv_low,2)

        return tf.add(conv_low_up, conv_high)

another question, why high_input is none in MultiResolutionFusion? but low_inputs is None in RefneBlock? i have no idea.

def RefineBlock(high_inputs=None,low_inputs=None):
    """
    A RefineNet Block which combines together the ResidualConvUnits,
    fuses the feature maps using MultiResolutionFusion, and then gets
    large-scale context with the ResidualConvUnit.
    Arguments:
      high_inputs: The input tensors that have the higher resolution
      low_inputs: The input tensors that have the lower resolution
    Returns:
      RefineNet block for a single path i.e one resolution

    """

    if low_inputs is None: # block 4
        rcu_new_low= ResidualConvUnit(high_inputs, n_filters=512)
................
        rcu_new_low = ResidualConvUnit(rcu_new_low, n_filters=512)
cena001plus commented 5 years ago

it's right