docstr: Tests we're getting the right labels when there's several gt_boxes.
          
docstr_tok: ["Tests","we","'re","getting","the","right","labels","when","there","'s","several","gt_boxes","."]
code: def testMultipleGtBoxes(self):
      """Tests we're getting the right labels when there's several gt_boxes."""
  
      num_classes = 3
      config = EasyDict(
          {
              "foreground_threshold": 0.5,
              "background_threshold_high": 0.5,
              "background_threshold_low": 0.1,
              "foreground_fraction": 0.5,
              # We change the minibatch_size the catch all our foregrounds
              "minibatch_size": 18,
          }
      )
      model = RCNNTarget(num_classes, config, seed=0)
  
      gt_boxes = tf.constant(
          [
              (10, 0, 398, 399, 0),
              (200, 300, 250, 390, 1),
              (185, 305, 235, 372, 2),
          ],
          dtype=tf.float32,
      )
      proposed_boxes = tf.constant(
          [
              (12, 70, 350, 540),  # noise
              (190, 310, 240, 370),  # 2
              (197, 300, 252, 389),  # 1
              (196, 300, 252, 389),  # 1
              (197, 303, 252, 394),  # 1
              (180, 310, 235, 370),  # 2
              (0, 0, 400, 400),  # 0
              (197, 302, 252, 389),  # 1
              (0, 0, 400, 400),  # 0
          ],
          dtype=tf.float32,
      )
  
      (proposals_label, bbox_targets) = self._run_rcnn_target(
          model, gt_boxes, proposed_boxes
      )
      # We don't care much about the first value.
      self.assertAllClose(
          proposals_label[1:],
          # We sum one to normalize for RCNNTarget's results.
          np.add([2.0, 1.0, 1.0, 1.0, 2.0, 0.0, 1.0, 0.0], 1),
          self._equality_delta,
      )
  
file_path: luminoth/luminoth/models/fasterrcnn/rcnn_target_test.py
imports: import numpy
  import tensorflow
  from easydict import EasyDict
  from luminoth.models.fasterrcnn.rcnn_target import RCNNTarget
  from luminoth.utils.test.gt_boxes import generate_gt_boxes
label_desc: Use image node_id 9 for calling the RCNNTargetTest obj's underlying member method code with example usage: obj.testMultipleGtBoxes() without return types