Instance segmentation

in detectron2 maskrcnn instance segmentation, does the software take into account the neighborhood of the instance to determine it and not only its content?