def test_do_not_return_instance_masks_and_keypoints_without_request(self):
    image_features = tf.random_uniform([2, 7, 7, 3], dtype=tf.float32)
    mask_box_predictor = box_predictor.MaskRCNNBoxPredictor(is_training=False, num_classes=5, fc_hyperparams=self._build_arg_scope_with_hyperparams(), use_dropout=False, dropout_keep_prob=0.5, box_code_size=4)
    box_predictions = mask_box_predictor.predict(image_features, num_predictions_per_location=1, scope='BoxPredictor')
    self.assertEqual(len(box_predictions), 2)
    self.assertTrue((box_predictor.BOX_ENCODINGS in box_predictions))
    self.assertTrue((box_predictor.CLASS_PREDICTIONS_WITH_BACKGROUND in box_predictions))
def test_do_not_return_instance_masks_and_keypoints_without_request(self):
    image_features = tf.random_uniform([2, 7, 7, 3], dtype=tf.float32)
    mask_box_predictor = box_predictor.MaskRCNNBoxPredictor(is_training=False, num_classes=5, fc_hyperparams=self._build_arg_scope_with_hyperparams(), use_dropout=False, dropout_keep_prob=0.5, box_code_size=4)
    box_predictions = mask_box_predictor.predict(image_features, num_predictions_per_location=1, scope='BoxPredictor')
    self.assertEqual(len(box_predictions), 2)
    self.assertTrue((box_predictor.BOX_ENCODINGS in box_predictions))
    self.assertTrue((box_predictor.CLASS_PREDICTIONS_WITH_BACKGROUND in box_predictions))