add nms and max neg num for context training