tensorflow/models

View on GitHub
research/object_detection/metrics/coco_evaluation_test.py

Summary

Maintainability
F
1 mo
Test Coverage

File coco_evaluation_test.py has 1953 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Major
Found in research/object_detection/metrics/coco_evaluation_test.py - About 5 days to fix

    Function testGetOneMAPWithMatchingGroundtruthAndDetectionsBatched has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def testGetOneMAPWithMatchingGroundtruthAndDetectionsBatched(self):
        coco_evaluator = coco_evaluation.CocoMaskEvaluator(_get_categories_list())
        batch_size = 3
        image_id = tf.placeholder(tf.string, shape=(batch_size))
        groundtruth_boxes = tf.placeholder(tf.float32, shape=(batch_size, None, 4))
    Severity: Minor
    Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

      Function testGetOneMAPWithMatchingGroundtruthAndDetectionsPaddedBatches has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def testGetOneMAPWithMatchingGroundtruthAndDetectionsPaddedBatches(self):
          coco_evaluator = coco_evaluation.CocoDetectionEvaluator(
              _get_categories_list())
          batch_size = 3
          image_id = tf.placeholder(tf.string, shape=(batch_size))
      Severity: Minor
      Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

        Function testGetOneMAPWithMatchingGroundtruthAndDetections has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def testGetOneMAPWithMatchingGroundtruthAndDetections(self):
            coco_evaluator = coco_evaluation.CocoMaskEvaluator(_get_categories_list())
            image_id = tf.placeholder(tf.string, shape=())
            groundtruth_boxes = tf.placeholder(tf.float32, shape=(None, 4))
            groundtruth_classes = tf.placeholder(tf.float32, shape=(None))
        Severity: Minor
        Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

          Function testGetOneMAPWithMatchingKeypointsBatched has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def testGetOneMAPWithMatchingKeypointsBatched(self):
              category_keypoint_dict = _get_category_keypoints_dict()
              coco_keypoint_evaluator = coco_evaluation.CocoKeypointEvaluator(
                  category_id=1, category_keypoints=category_keypoint_dict['person'],
                  class_text='person')
          Severity: Minor
          Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

            Function testGetOneMAPWithMatchingKeypointsIsAnnotated has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def testGetOneMAPWithMatchingKeypointsIsAnnotated(self):
                category_keypoint_dict = _get_category_keypoints_dict()
                coco_keypoint_evaluator = coco_evaluation.CocoKeypointEvaluator(
                    category_id=1, category_keypoints=category_keypoint_dict['person'],
                    class_text='person')
            Severity: Minor
            Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

              Function testGetOneMAPWithMatchingKeypointsAndVisibilities has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def testGetOneMAPWithMatchingKeypointsAndVisibilities(self):
                  category_keypoint_dict = _get_category_keypoints_dict()
                  coco_keypoint_evaluator = coco_evaluation.CocoKeypointEvaluator(
                      category_id=1, category_keypoints=category_keypoint_dict['person'],
                      class_text='person')
              Severity: Minor
              Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

                Function testGetOneMAPWithMatchingGroundtruthAndDetectionsIsAnnotated has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def testGetOneMAPWithMatchingGroundtruthAndDetectionsIsAnnotated(self):
                    coco_evaluator = coco_evaluation.CocoDetectionEvaluator(
                        _get_categories_list())
                    image_id = tf.placeholder(tf.string, shape=())
                    groundtruth_boxes = tf.placeholder(tf.float32, shape=(None, 4))
                Severity: Minor
                Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

                  Function testGetOneMAPWithMatchingGroundtruthAndDetectionsBatched has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def testGetOneMAPWithMatchingGroundtruthAndDetectionsBatched(self):
                      coco_evaluator = coco_evaluation.CocoDetectionEvaluator(
                          _get_categories_list())
                      batch_size = 3
                      image_id = tf.placeholder(tf.string, shape=(batch_size))
                  Severity: Minor
                  Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

                    Function testGetOneMAPWithMatchingKeypoints has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def testGetOneMAPWithMatchingKeypoints(self):
                        category_keypoint_dict = _get_category_keypoints_dict()
                        coco_keypoint_evaluator = coco_evaluation.CocoKeypointEvaluator(
                            category_id=1, category_keypoints=category_keypoint_dict['person'],
                            class_text='person')
                    Severity: Minor
                    Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

                      Function testGetMAPWithSkipUnmatchedPredictions has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def testGetMAPWithSkipUnmatchedPredictions(self):
                          coco_evaluator = coco_evaluation.CocoDetectionEvaluator(
                              _get_categories_list(), skip_predictions_for_unlabeled_class=True)
                          image_id = tf.placeholder(tf.string, shape=())
                          groundtruth_boxes = tf.placeholder(tf.float32, shape=(None, 4))
                      Severity: Minor
                      Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

                        Function testGetOneMAPWithMatchingGroundtruthAndDetectionsPadded has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def testGetOneMAPWithMatchingGroundtruthAndDetectionsPadded(self):
                            coco_evaluator = coco_evaluation.CocoDetectionEvaluator(
                                _get_categories_list())
                            image_id = tf.placeholder(tf.string, shape=())
                            groundtruth_boxes = tf.placeholder(tf.float32, shape=(None, 4))
                        Severity: Minor
                        Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

                          Function _MatchingGroundtruthAndDetections has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def _MatchingGroundtruthAndDetections(self, coco_evaluator):
                              image_id = tf.placeholder(tf.string, shape=())
                              groundtruth_boxes = tf.placeholder(tf.float32, shape=(None, 4))
                              groundtruth_classes = tf.placeholder(tf.float32, shape=(None))
                              detection_boxes = tf.placeholder(tf.float32, shape=(None, 4))
                          Severity: Minor
                          Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

                            Function _get_panoptic_test_data has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            def _get_panoptic_test_data():
                              # image1 contains 3 people in gt, (2 normal annotation and 1 "is_crowd"
                              # annotation), and 3 people in prediction.
                              gt_masks1 = np.zeros((3, 50, 50), dtype=np.uint8)
                              result_masks1 = np.zeros((3, 50, 50), dtype=np.uint8)
                            Severity: Minor
                            Found in research/object_detection/metrics/coco_evaluation_test.py - About 1 hr to fix

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    sess.run(update_op,
                                             feed_dict={
                                                 image_id: 'image2',
                                                 groundtruth_boxes: np.array([[50., 50., 100., 100.]]),
                                                 groundtruth_classes: np.array([1]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 1 day to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1743..1757

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 159.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    sess.run(update_op,
                                             feed_dict={
                                                 image_id: 'image3',
                                                 groundtruth_boxes: np.array([[25., 25., 50., 50.]]),
                                                 groundtruth_classes: np.array([1]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 1 day to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1727..1740

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 159.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    sess.run(
                                        update_op,
                                        feed_dict={
                                            image_id:
                                                'image1',
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 1 day to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1309..1331

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 149.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    sess.run(
                                        update_op,
                                        feed_dict={
                                            image_id:
                                                'image2',
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 1 day to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1285..1307

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 149.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    sess.run(
                                        update_op,
                                        feed_dict={
                                            image_id:
                                                'image1',
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 1 day to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1103..1123

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 147.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    sess.run(
                                        update_op,
                                        feed_dict={
                                            image_id:
                                                'image2',
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 1 day to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1081..1101

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 147.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                                np.stack([
                                                    np.pad(
                                                        np.ones([1, 100, 100], dtype=np.uint8),
                                                        ((0, 0), (0, 0), (0, 0)),
                                                        mode='constant'),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 1 day to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1849..1860

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 135.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                                np.stack([
                                                    np.pad(
                                                        np.ones([1, 100, 100], dtype=np.uint8),
                                                        ((0, 0), (0, 0), (0, 0)),
                                                        mode='constant'),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 1 day to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1827..1838

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 135.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image1',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 7 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 793..805
                              research/object_detection/metrics/coco_evaluation_test.py on lines 819..831

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 115.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image1',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 7 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 819..831
                              research/object_detection/metrics/coco_evaluation_test.py on lines 976..988

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 115.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image2',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                              np.array([[50., 50., 100., 100.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 7 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 793..805
                              research/object_detection/metrics/coco_evaluation_test.py on lines 976..988

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 115.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                          np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 6 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1513..1524

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 109.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image2',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                          np.array([[50., 50., 100., 100.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 6 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1490..1501

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 109.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image1',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 906..916

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 96.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image2',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                              np.array([[50., 50., 100., 100.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 882..892

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 96.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image3',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                          np.array([[25., 25., 50., 50.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1480..1488
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1503..1511

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 95.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image1',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                          np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1503..1511
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1526..1534

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 95.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image2',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                          np.array([[50., 50., 100., 100.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1480..1488
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1526..1534

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 95.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 7 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image2',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                              np.array([[50., 50., 100., 100.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 6 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 807..817
                              research/object_detection/metrics/coco_evaluation_test.py on lines 894..904
                              research/object_detection/metrics/coco_evaluation_test.py on lines 918..928
                              research/object_detection/metrics/coco_evaluation_test.py on lines 953..964
                              research/object_detection/metrics/coco_evaluation_test.py on lines 990..1000
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1028..1038

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 94.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 7 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 6 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 807..817
                              research/object_detection/metrics/coco_evaluation_test.py on lines 833..843
                              research/object_detection/metrics/coco_evaluation_test.py on lines 894..904
                              research/object_detection/metrics/coco_evaluation_test.py on lines 918..928
                              research/object_detection/metrics/coco_evaluation_test.py on lines 953..964
                              research/object_detection/metrics/coco_evaluation_test.py on lines 990..1000

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 94.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 7 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 6 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 807..817
                              research/object_detection/metrics/coco_evaluation_test.py on lines 833..843
                              research/object_detection/metrics/coco_evaluation_test.py on lines 918..928
                              research/object_detection/metrics/coco_evaluation_test.py on lines 953..964
                              research/object_detection/metrics/coco_evaluation_test.py on lines 990..1000
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1028..1038

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 94.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 7 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 6 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 807..817
                              research/object_detection/metrics/coco_evaluation_test.py on lines 833..843
                              research/object_detection/metrics/coco_evaluation_test.py on lines 894..904
                              research/object_detection/metrics/coco_evaluation_test.py on lines 918..928
                              research/object_detection/metrics/coco_evaluation_test.py on lines 953..964
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1028..1038

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 94.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 7 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 6 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 833..843
                              research/object_detection/metrics/coco_evaluation_test.py on lines 894..904
                              research/object_detection/metrics/coco_evaluation_test.py on lines 918..928
                              research/object_detection/metrics/coco_evaluation_test.py on lines 953..964
                              research/object_detection/metrics/coco_evaluation_test.py on lines 990..1000
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1028..1038

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 94.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 7 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 6 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 807..817
                              research/object_detection/metrics/coco_evaluation_test.py on lines 833..843
                              research/object_detection/metrics/coco_evaluation_test.py on lines 894..904
                              research/object_detection/metrics/coco_evaluation_test.py on lines 918..928
                              research/object_detection/metrics/coco_evaluation_test.py on lines 990..1000
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1028..1038

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 94.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 7 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image2',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                              np.array([[50., 50., 100., 100.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 6 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 807..817
                              research/object_detection/metrics/coco_evaluation_test.py on lines 833..843
                              research/object_detection/metrics/coco_evaluation_test.py on lines 894..904
                              research/object_detection/metrics/coco_evaluation_test.py on lines 953..964
                              research/object_detection/metrics/coco_evaluation_test.py on lines 990..1000
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1028..1038

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 94.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                    sess.run(
                                        update_op,
                                        feed_dict={
                                            image_id:
                                                'image2',
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 565..579
                              research/object_detection/metrics/coco_evaluation_test.py on lines 597..611

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 92.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                    sess.run(
                                        update_op,
                                        feed_dict={
                                            image_id:
                                                'image3',
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 565..579
                              research/object_detection/metrics/coco_evaluation_test.py on lines 581..595

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 92.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                    sess.run(
                                        update_op,
                                        feed_dict={
                                            image_id:
                                                'image1',
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 581..595
                              research/object_detection/metrics/coco_evaluation_test.py on lines 597..611

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 92.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    sess.run(
                                        update_op,
                                        feed_dict={
                                            image_id: 'image2',
                                            groundtruth_boxes: np.array([[50., 50., 100., 100.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 413..422

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 90.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                    sess.run(
                                        update_op,
                                        feed_dict={
                                            image_id: 'image3',
                                            groundtruth_boxes: np.array([[25., 25., 50., 50.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 5 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 402..411

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 90.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                    sess.run(update_op,
                                             feed_dict={
                                                 image_id: 'image3',
                                                 groundtruth_boxes: np.array([[25., 25., 50., 50.]]),
                                                 groundtruth_classes: np.array([2]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 4 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 474..482
                              research/object_detection/metrics/coco_evaluation_test.py on lines 484..492

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 79.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                    sess.run(update_op,
                                             feed_dict={
                                                 image_id: 'image1',
                                                 groundtruth_boxes: np.array([[100., 100., 200., 200.]]),
                                                 groundtruth_classes: np.array([1]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 4 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 484..492
                              research/object_detection/metrics/coco_evaluation_test.py on lines 494..502

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 79.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                    sess.run(update_op,
                                             feed_dict={
                                                 image_id: 'image2',
                                                 groundtruth_boxes: np.array([[50., 50., 100., 100.]]),
                                                 groundtruth_classes: np.array([3]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 4 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 474..482
                              research/object_detection/metrics/coco_evaluation_test.py on lines 494..502

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 79.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                    sess.run(update_op,
                                             feed_dict={
                                                 image_id: 'image3',
                                                 groundtruth_boxes: np.array([[25., 25., 50., 50.]]),
                                                 groundtruth_classes: np.array([2]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 4 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 282..289
                              research/object_detection/metrics/coco_evaluation_test.py on lines 291..298

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 77.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                    sess.run(update_op,
                                             feed_dict={
                                                 image_id: 'image2',
                                                 groundtruth_boxes: np.array([[50., 50., 100., 100.]]),
                                                 groundtruth_classes: np.array([3]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 4 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 282..289
                              research/object_detection/metrics/coco_evaluation_test.py on lines 300..307

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 77.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                    sess.run(update_op,
                                             feed_dict={
                                                 image_id: 'image1',
                                                 groundtruth_boxes: np.array([[100., 100., 200., 200.]]),
                                                 groundtruth_classes: np.array([1]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 4 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 291..298
                              research/object_detection/metrics/coco_evaluation_test.py on lines 300..307

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 77.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                                np.stack([
                                                    np.pad(
                                                        result_masks[0], ((0, 0), (0, 10), (0, 10)),
                                                        mode='constant'),
                                                    np.pad(
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 4 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2063..2068

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 74.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                                np.stack([
                                                    np.pad(
                                                        gt_masks[0], ((0, 0), (0, 10), (0, 10)),
                                                        mode='constant'),
                                                    np.pad(
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 4 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2086..2091

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 74.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  with self.assertRaises(ValueError):
                                    coco_evaluator.add_single_detected_image_info(
                                        image_id='image1',
                                        detections_dict={
                                            standard_fields.DetectionResultFields.detection_boxes:
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 7 other locations - About 3 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 74..82
                              research/object_detection/metrics/coco_evaluation_test.py on lines 91..99
                              research/object_detection/metrics/coco_evaluation_test.py on lines 108..116
                              research/object_detection/metrics/coco_evaluation_test.py on lines 135..143
                              research/object_detection/metrics/coco_evaluation_test.py on lines 162..170
                              research/object_detection/metrics/coco_evaluation_test.py on lines 214..222
                              research/object_detection/metrics/coco_evaluation_test.py on lines 225..233

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 7 other locations - About 3 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 74..82
                              research/object_detection/metrics/coco_evaluation_test.py on lines 91..99
                              research/object_detection/metrics/coco_evaluation_test.py on lines 108..116
                              research/object_detection/metrics/coco_evaluation_test.py on lines 162..170
                              research/object_detection/metrics/coco_evaluation_test.py on lines 214..222
                              research/object_detection/metrics/coco_evaluation_test.py on lines 225..233
                              research/object_detection/metrics/coco_evaluation_test.py on lines 242..251

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                          np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 7 other locations - About 3 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 74..82
                              research/object_detection/metrics/coco_evaluation_test.py on lines 91..99
                              research/object_detection/metrics/coco_evaluation_test.py on lines 108..116
                              research/object_detection/metrics/coco_evaluation_test.py on lines 135..143
                              research/object_detection/metrics/coco_evaluation_test.py on lines 162..170
                              research/object_detection/metrics/coco_evaluation_test.py on lines 225..233
                              research/object_detection/metrics/coco_evaluation_test.py on lines 242..251

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                          np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 7 other locations - About 3 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 91..99
                              research/object_detection/metrics/coco_evaluation_test.py on lines 108..116
                              research/object_detection/metrics/coco_evaluation_test.py on lines 135..143
                              research/object_detection/metrics/coco_evaluation_test.py on lines 162..170
                              research/object_detection/metrics/coco_evaluation_test.py on lines 214..222
                              research/object_detection/metrics/coco_evaluation_test.py on lines 225..233
                              research/object_detection/metrics/coco_evaluation_test.py on lines 242..251

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image3',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                          np.array([[25., 25., 50., 50.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 7 other locations - About 3 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 74..82
                              research/object_detection/metrics/coco_evaluation_test.py on lines 91..99
                              research/object_detection/metrics/coco_evaluation_test.py on lines 135..143
                              research/object_detection/metrics/coco_evaluation_test.py on lines 162..170
                              research/object_detection/metrics/coco_evaluation_test.py on lines 214..222
                              research/object_detection/metrics/coco_evaluation_test.py on lines 225..233
                              research/object_detection/metrics/coco_evaluation_test.py on lines 242..251

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image2',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                          np.array([[50., 50., 100., 100.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 7 other locations - About 3 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 74..82
                              research/object_detection/metrics/coco_evaluation_test.py on lines 108..116
                              research/object_detection/metrics/coco_evaluation_test.py on lines 135..143
                              research/object_detection/metrics/coco_evaluation_test.py on lines 162..170
                              research/object_detection/metrics/coco_evaluation_test.py on lines 214..222
                              research/object_detection/metrics/coco_evaluation_test.py on lines 225..233
                              research/object_detection/metrics/coco_evaluation_test.py on lines 242..251

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                              np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 7 other locations - About 3 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 74..82
                              research/object_detection/metrics/coco_evaluation_test.py on lines 91..99
                              research/object_detection/metrics/coco_evaluation_test.py on lines 108..116
                              research/object_detection/metrics/coco_evaluation_test.py on lines 135..143
                              research/object_detection/metrics/coco_evaluation_test.py on lines 214..222
                              research/object_detection/metrics/coco_evaluation_test.py on lines 225..233
                              research/object_detection/metrics/coco_evaluation_test.py on lines 242..251

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_detected_image_info(
                                      image_id='image1',  # Note that this image id was previously added.
                                      detections_dict={
                                          standard_fields.DetectionResultFields.detection_boxes:
                                          np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 7 other locations - About 3 hrs to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 74..82
                              research/object_detection/metrics/coco_evaluation_test.py on lines 91..99
                              research/object_detection/metrics/coco_evaluation_test.py on lines 108..116
                              research/object_detection/metrics/coco_evaluation_test.py on lines 135..143
                              research/object_detection/metrics/coco_evaluation_test.py on lines 162..170
                              research/object_detection/metrics/coco_evaluation_test.py on lines 214..222
                              research/object_detection/metrics/coco_evaluation_test.py on lines 242..251

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                                np.array([[[100., 100., 200., 200.],
                                                           [0., 0., 0., 0.],
                                                           [0., 0., 0., 0.]],
                                                          [[50., 50., 100., 100.],
                                                           [0., 0., 0., 0.],
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 3 hrs to fix
                              research/object_detection/core/target_assigner_test.py on lines 2238..2247

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 63.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                                np.array([[[100., 100., 200., 200.], [-1, -1, -1, -1]],
                                                          [[50., 50., 100., 100.], [-1, -1, -1, -1]],
                                                          [[25., 25., 50., 50.], [10., 10., 15., 15.]]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 1 other location - About 2 hrs to fix
                              research/object_detection/core/densepose_ops_test.py on lines 68..71

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 50.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image1',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                          np.array([[100., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 84..89
                              research/object_detection/metrics/coco_evaluation_test.py on lines 101..106
                              research/object_detection/metrics/coco_evaluation_test.py on lines 207..212

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 49.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image3',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                          np.array([[25., 25., 50., 50.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 67..72
                              research/object_detection/metrics/coco_evaluation_test.py on lines 84..89
                              research/object_detection/metrics/coco_evaluation_test.py on lines 207..212

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 49.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image1',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                          np.array([[99., 100., 200., 200.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 67..72
                              research/object_detection/metrics/coco_evaluation_test.py on lines 84..89
                              research/object_detection/metrics/coco_evaluation_test.py on lines 101..106

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 49.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  coco_evaluator.add_single_ground_truth_image_info(
                                      image_id='image2',
                                      groundtruth_dict={
                                          standard_fields.InputDataFields.groundtruth_boxes:
                                          np.array([[50., 50., 100., 100.]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 67..72
                              research/object_detection/metrics/coco_evaluation_test.py on lines 101..106
                              research/object_detection/metrics/coco_evaluation_test.py on lines 207..212

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 49.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                                np.stack([
                                                    gt_class[0],
                                                    np.pad(gt_class[1], (0, 1), mode='constant')
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2073..2075
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2080..2082

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 40.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                                np.stack([
                                                    result_class[0],
                                                    np.pad(result_class[1], (0, 1), mode='constant')
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2057..2059
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2073..2075

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 40.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                                np.stack([
                                                    gt_is_crowd[0],
                                                    np.pad(gt_is_crowd[1], (0, 1), mode='constant')
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 2 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2057..2059
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2080..2082

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 40.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 6 locations. Consider refactoring.
                              Open

                                  eval_dict = {
                                      input_data_fields.key: image_id,
                                      input_data_fields.groundtruth_boxes: groundtruth_boxes,
                                      input_data_fields.groundtruth_classes: groundtruth_classes,
                                      input_data_fields.groundtruth_instance_masks: groundtruth_masks,
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 5 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1064..1072
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1403..1411
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1611..1620
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1799..1808
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2035..2043

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 39.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 6 locations. Consider refactoring.
                              Open

                                  eval_dict = {
                                      input_data_fields.key: image_id,
                                      input_data_fields.groundtruth_boxes: groundtruth_boxes,
                                      input_data_fields.groundtruth_classes: groundtruth_classes,
                                      input_data_fields.groundtruth_instance_masks: groundtruth_masks,
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 5 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1064..1072
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1403..1411
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1611..1620
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1675..1684
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2035..2043

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 39.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 6 locations. Consider refactoring.
                              Open

                                  eval_dict = {
                                      input_data_fields.key: image_id,
                                      input_data_fields.groundtruth_boxes: groundtruth_boxes,
                                      input_data_fields.groundtruth_classes: groundtruth_classes,
                                      input_data_fields.groundtruth_keypoints: groundtruth_keypoints,
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 5 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1064..1072
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1611..1620
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1675..1684
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1799..1808
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2035..2043

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 39.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 6 locations. Consider refactoring.
                              Open

                                  eval_dict = {
                                      input_data_fields.key: image_id,
                                      input_data_fields.groundtruth_boxes: groundtruth_boxes,
                                      input_data_fields.groundtruth_classes: groundtruth_classes,
                                      input_data_fields.groundtruth_instance_masks: groundtruth_masks,
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 5 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1064..1072
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1403..1411
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1675..1684
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1799..1808
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2035..2043

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 39.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 6 locations. Consider refactoring.
                              Open

                                  eval_dict = {
                                      input_data_fields.key: image_id,
                                      input_data_fields.groundtruth_boxes: groundtruth_boxes,
                                      input_data_fields.groundtruth_classes: groundtruth_classes,
                                      input_data_fields.groundtruth_keypoints: groundtruth_keypoints,
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 5 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1403..1411
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1611..1620
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1675..1684
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1799..1808
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2035..2043

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 39.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 6 locations. Consider refactoring.
                              Open

                                  eval_dict = {
                                      input_data_fields.key: image_id,
                                      input_data_fields.groundtruth_classes: groundtruth_classes,
                                      input_data_fields.groundtruth_instance_masks: groundtruth_masks,
                                      input_data_fields.groundtruth_is_crowd: groundtruth_is_crowd,
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 5 other locations - About 1 hr to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1064..1072
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1403..1411
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1611..1620
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1675..1684
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1799..1808

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 39.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  self.assertAlmostEqual(metrics['PanopticQuality@0.50IOU'],
                                                         (0.32 + 135.0 / 195) / 3)
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 40 mins to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1959..1960
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2015..2016
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2101..2102

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 34.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  self.assertAlmostEqual(metrics['PanopticQuality@0.50IOU'],
                                                         (0.32 + 135.0 / 195) / 3)
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 40 mins to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1959..1960
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1962..1963
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2101..2102

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 34.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  self.assertAlmostEqual(metrics['SegmentationQuality@0.50IOU'],
                                                         (0.8 + 135.0 / 195) / 3)
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 40 mins to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1962..1963
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2015..2016
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2101..2102

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 34.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  self.assertAlmostEqual(metrics['PanopticQuality@0.50IOU'],
                                                         (0.32 + 135.0 / 195) / 3)
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 40 mins to fix
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1959..1960
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1962..1963
                              research/object_detection/metrics/coco_evaluation_test.py on lines 2015..2016

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 34.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                                 groundtruth_boxes: np.array([[[100., 100., 200., 200.]],
                                                                              [[50., 50., 100., 100.]],
                                                                              [[25., 25., 50., 50.]]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 30 mins to fix
                              research/object_detection/core/densepose_ops_test.py on lines 84..87
                              research/object_detection/metrics/coco_evaluation_test.py on lines 669..671
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1821..1823

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 32.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                                 detection_boxes: np.array([[[100., 100., 200., 200.]],
                                                                            [[50., 50., 100., 100.]],
                                                                            [[25., 25., 50., 50.]]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 30 mins to fix
                              research/object_detection/core/densepose_ops_test.py on lines 84..87
                              research/object_detection/metrics/coco_evaluation_test.py on lines 665..667
                              research/object_detection/metrics/coco_evaluation_test.py on lines 1821..1823

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 32.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                                np.array([[[100., 100., 200., 200.]],
                                                          [[50., 50., 100., 100.]],
                                                          [[25., 25., 50., 50.]]]),
                              Severity: Major
                              Found in research/object_detection/metrics/coco_evaluation_test.py and 3 other locations - About 30 mins to fix
                              research/object_detection/core/densepose_ops_test.py on lines 84..87
                              research/object_detection/metrics/coco_evaluation_test.py on lines 665..667
                              research/object_detection/metrics/coco_evaluation_test.py on lines 669..671

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 32.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              There are no issues that match your filters.

                              Category
                              Status