CharlesShang / FastMaskRCNN

Mask RCNN in TensorFlow
Apache License 2.0
3.1k stars 1.1k forks source link

A missing "-1" in crop layer? #190

Open ntajbakhsh opened 6 years ago

ntajbakhsh commented 6 years ago

Assuming x,y, z start from 0, I think there should be a -1 in the denominator, or am I missing something?

xs = xs / tf.cast(shape[2], tf.float32) -> xs = xs / tf.cast(shape[2]-1, tf.float32) ys = ys / tf.cast(shape[1], tf.float32) -> ys = ys / tf.cast(shape[1]-1, tf.float32) https://github.com/CharlesShang/FastMaskRCNN/blob/bdae07702acccd85803e658f5e49690981efcdb2/libs/layers/crop.py#L29