tensorflow/models

View on GitHub
research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py

Summary

Maintainability
F
1 mo
Test Coverage

File center_net_meta_arch_tf2_test.py has 2979 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2020 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

    CenterNetMetaArchHelpersTest has 33 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class CenterNetMetaArchHelpersTest(test_case.TestCase, parameterized.TestCase):
      """Test for CenterNet meta architecture related functions."""
    
      def test_row_col_channel_indices_from_flattened_indices(self):
        """Tests that the computation of row, col, channel indices is correct."""

      Function test_postprocess has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def test_postprocess(self, target_class_id, with_true_image_shape):
          """Test the postprocess function."""
          model = build_center_net_meta_arch()
          max_detection = model._center_params.max_box_predictions
          num_keypoints = len(model._kp_params_dict[_TASK_NAME].keypoint_indices)

        Function test_outputs_with_correct_shape has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def test_outputs_with_correct_shape(self, stride):
            # The 1D case reuses code from the 2D cases. These tests only check that
            # the output shapes are correct, and relies on other tests for correctness.
            batch_size = 2
            height = 1

          Function build_center_net_meta_arch has 13 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def build_center_net_meta_arch(build_resnet=False,

            Function test_postprocess_single_class has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def test_postprocess_single_class(self, candidate_ranking_mode,
                                                argmax_postprocessing):
                """Test the postprocess function."""
                model = build_center_net_meta_arch(
                    num_classes=1, max_box_predictions=5, per_keypoint_offset=True,

              Function test_mask_object_center_in_postprocess_by_true_image_shape has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def test_mask_object_center_in_postprocess_by_true_image_shape(self):
                  """Test the postprocess function is masked by true_image_shape."""
                  model = build_center_net_meta_arch(num_classes=1)
                  max_detection = model._center_params.max_box_predictions
                  num_keypoints = len(model._kp_params_dict[_TASK_NAME].keypoint_indices)

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

                  def test_non_max_suppression_with_kpts_rescoring(self):
                    """Tests application of NMS on CenterNet detections and keypoints."""
                    model = build_center_net_meta_arch(
                        num_classes=1, max_box_predictions=5, per_keypoint_offset=True,
                        candidate_ranking_mode='min_distance',

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

                  def get_fake_prediction_dict(input_height,
                                               input_width,
                                               stride,
                                               per_keypoint_depth=False):
                    """Prepares the fake prediction dictionary."""

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

                      def test_keypoint_candidate_prediction(self):
                        keypoint_heatmap_np = np.zeros((2, 3, 3, 2), dtype=np.float32)
                        keypoint_heatmap_np[0, 0, 0, 0] = 1.0
                        keypoint_heatmap_np[0, 2, 1, 0] = 0.7
                        keypoint_heatmap_np[0, 1, 1, 0] = 0.6

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

                        def test_keypoint_candidate_prediction_per_keypoints(self):
                          keypoint_heatmap_np = np.zeros((2, 3, 3, 2), dtype=np.float32)
                          keypoint_heatmap_np[0, 0, 0, 0] = 1.0
                          keypoint_heatmap_np[0, 2, 1, 0] = 0.7
                          keypoint_heatmap_np[0, 1, 1, 0] = 0.6

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

                          def test_postprocess_single_class_depth(self, per_keypoint_depth):
                            """Test the postprocess function."""
                            model = build_center_net_meta_arch(
                                num_classes=1,
                                per_keypoint_offset=per_keypoint_depth,

                          Function build_center_net_meta_arch has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def build_center_net_meta_arch(build_resnet=False,
                                                         num_classes=_NUM_CLASSES,
                                                         max_box_predictions=5,
                                                         apply_non_max_suppression=False,
                                                         detection_only=False,

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                            def test_postprocess_kpts_no_od(self):
                              """Test the postprocess function."""
                              target_class_id = 1
                              model = build_center_net_meta_arch(keypoint_only=True)
                              max_detection = model._center_params.max_box_predictions

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

                              def test_keypoint_candidate_prediction_depth(self, per_keypoint_depth):
                                keypoint_heatmap_np = np.zeros((2, 3, 3, 2), dtype=np.float32)
                                keypoint_heatmap_np[0, 0, 0, 0] = 1.0
                                keypoint_heatmap_np[0, 2, 1, 0] = 0.7
                                keypoint_heatmap_np[0, 1, 1, 0] = 0.6

                              Function test_prediction_to_multi_instance_keypoints has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                def test_prediction_to_multi_instance_keypoints(self, provide_keypoint_score):
                                  image_size = (9, 9)
                                  keypoint_heatmap_np = np.zeros((image_size[0], image_size[1], 3, 4),
                                                                 dtype=np.float32)
                                  # Instance 0.

                                Function test_crop_and_threshold_masks has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def test_crop_and_threshold_masks(self):
                                    boxes_np = np.array(
                                        [[0., 0., 0.5, 0.5],
                                         [0.25, 0.25, 1.0, 1.0]], dtype=np.float32)
                                    classes_np = np.array([0, 2], dtype=np.int32)

                                  Function test_prediction_to_single_instance_keypoints has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    def test_prediction_to_single_instance_keypoints(self):
                                      image_size = (9, 9)
                                      object_heatmap_np = np.zeros((1, image_size[0], image_size[1], 1),
                                                                   dtype=np.float32)
                                      # This should be picked.

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

                                      def test_box_prediction(self):
                                    
                                        class_pred = np.zeros((3, 128, 128, 5), dtype=np.float32)
                                        hw_pred = np.zeros((3, 128, 128, 2), dtype=np.float32)
                                        offset_pred = np.zeros((3, 128, 128, 2), dtype=np.float32)

                                      Function get_fake_kp_params has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def get_fake_kp_params(num_candidates_per_keypoint=100,

                                        Function test_refine_keypoints_with_bboxes has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                          def test_refine_keypoints_with_bboxes(self, predict_depth):
                                            regressed_keypoints_np = np.array(
                                                [
                                                    # Example 0.
                                                    [

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                          def __init__(self,

                                          Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                            def __init__(self, tensor, out_stride=1, channel_means=(0., 0., 0.),

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

                                              def test_top_k_feature_map_locations(self):
                                                feature_map_np = np.zeros((2, 3, 3, 2), dtype=np.float32)
                                                feature_map_np[0, 2, 0, 1] = 1.0
                                                feature_map_np[0, 2, 1, 1] = 0.9  # Get's filtered due to max pool.
                                                feature_map_np[0, 0, 1, 0] = 0.7
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 442..470

                                            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 395.

                                            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

                                              def test_top_k_feature_map_locations_no_pooling(self):
                                                feature_map_np = np.zeros((2, 3, 3, 2), dtype=np.float32)
                                                feature_map_np[0, 2, 0, 1] = 1.0
                                                feature_map_np[0, 2, 1, 1] = 0.9
                                                feature_map_np[0, 0, 1, 0] = 0.7
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 412..440

                                            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 395.

                                            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

                                              def test_bgr_ordering(self):
                                                feature_extractor = DummyFeatureExtractor(
                                                    channel_means=(0.0, 0.0, 0.0),
                                                    channel_stds=(1., 1., 1.), bgr_ordering=True,
                                                    num_feature_outputs=2, stride=4)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3422..3438

                                            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 211.

                                            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

                                              def test_default_ordering(self):
                                                feature_extractor = DummyFeatureExtractor(
                                                    channel_means=(0.0, 0.0, 0.0),
                                                    channel_stds=(1., 1., 1.), bgr_ordering=False,
                                                    num_feature_outputs=2, stride=4)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3404..3420

                                            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 211.

                                            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

                                              def test_compute_kp_offset_loss(self):
                                                def graph_fn():
                                                  loss = self.model._compute_kp_offset_loss(
                                                      input_height=self.input_height,
                                                      input_width=self.input_width,
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3229..3243

                                            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 85.

                                            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

                                              def test_compute_kp_regression_loss(self):
                                                def graph_fn():
                                                  loss = self.model._compute_kp_regression_loss(
                                                      input_height=self.input_height,
                                                      input_width=self.input_width,
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3213..3227

                                            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 85.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                expected_refined_keypoints = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [[2.0, 2.5], [6.0, 10.0], [14.0, 7.0]],  # Instance 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 175..187
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 217..229
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 244..256
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1102..1114
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1184..1196
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1213..1225
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1364..1376
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1377..1389

                                            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 78.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                  expected_keypoint_coords_np = np.array(
                                                      [
                                                          # Example 0.
                                                          [
                                                              [[0.0, 0.08], [0.75, 0.22], [0.75, 1.0]],
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 175..187
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 244..256
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1102..1114
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1184..1196
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1213..1225
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1364..1376
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1377..1389
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1469..1481

                                            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 78.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                  expected_refined_keypoints = np.array(
                                                      [
                                                          # Example 0.
                                                          [
                                                              [[2.0, 2.5], [6.0, 10.5], [14.0, 7.0]],  # Instance 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 175..187
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 217..229
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 244..256
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1102..1114
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1213..1225
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1364..1376
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1377..1389
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1469..1481

                                            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 78.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                keypoint_candidates_np = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [[2.0, 2.5], [6.0, 10.5], [4.0, 7.0]],  # Candidate 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 175..187
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 217..229
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 244..256
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1102..1114
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1184..1196
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1213..1225
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1364..1376
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1469..1481

                                            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 78.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                regressed_keypoints_np = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [[2.0, 2.0], [6.0, 10.0], [14.0, 7.0]],  # Instance 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 175..187
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 217..229
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 244..256
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1184..1196
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1213..1225
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1364..1376
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1377..1389
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1469..1481

                                            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 78.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                regressed_keypoints_np = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [[2.0, 2.0], [6.0, 10.0], [14.0, 7.0]],  # Instance 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 175..187
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 217..229
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 244..256
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1102..1114
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1184..1196
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1213..1225
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1377..1389
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1469..1481

                                            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 78.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                  expected_keypoint_coords_np = np.array(
                                                      [
                                                          # Example 0.
                                                          [
                                                              [[-0.125, 0.08], [0.75, 0.22], [0.75, 1.2]],
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 175..187
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 217..229
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1102..1114
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1184..1196
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1213..1225
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1364..1376
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1377..1389
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1469..1481

                                            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 78.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                keypoint_coords_np = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [[-10., 8.], [60., 22.], [60., 120.]],
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 217..229
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 244..256
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1102..1114
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1184..1196
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1213..1225
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1364..1376
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1377..1389
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1469..1481

                                            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 78.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                  expected_refined_keypoints = np.array(
                                                      [
                                                          # Example 0.
                                                          [
                                                              [[2.0, 2.5], [6.0, 10.5], [14.0, 7.0]],  # Instance 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 175..187
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 217..229
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 244..256
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1102..1114
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1184..1196
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1364..1376
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1377..1389
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1469..1481

                                            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 78.

                                            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

                                                def graph_fn():
                                                  keypoint_heatmap = tf.constant(keypoint_heatmap_np, dtype=tf.float32)
                                                  keypoint_heatmap_offsets = tf.constant(
                                                      keypoint_heatmap_offsets_np, dtype=tf.float32)
                                            
                                            
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 928..940

                                            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 72.

                                            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

                                                def graph_fn():
                                                  keypoint_heatmap = tf.constant(keypoint_heatmap_np, dtype=tf.float32)
                                                  keypoint_heatmap_offsets = tf.constant(
                                                      keypoint_heatmap_offsets_np, dtype=tf.float32)
                                            
                                            
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 715..727

                                            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 72.

                                            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

                                                r_grid[..., 0] = r_grid[..., 1] = r_grid[..., 2] = np.array(
                                                    [[0, 0, 0, 0],
                                                     [1, 1, 1, 1],
                                                     [2, 2, 2, 2],
                                                     [3, 3, 3, 3],
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 72..77

                                            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 71.

                                            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

                                                c_grid[..., 0] = c_grid[..., 1] = c_grid[..., 2] = np.array(
                                                    [[0, 1, 2, 3],
                                                     [0, 1, 2, 3],
                                                     [0, 1, 2, 3],
                                                     [0, 1, 2, 3],
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 64..69

                                            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 71.

                                            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 3 locations. Consider refactoring.
                                            Open

                                                prediction_dict = {
                                                    cnma.OBJECT_CENTER: [class_center],
                                                    cnma.BOX_SCALE: [height_width],
                                                    cnma.BOX_OFFSET: [offset],
                                                    cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_HEATMAP):
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2506..2515
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2784..2793

                                            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 64.

                                            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 3 locations. Consider refactoring.
                                            Open

                                                prediction_dict = {
                                                    cnma.OBJECT_CENTER: [class_center],
                                                    cnma.BOX_SCALE: [height_width],
                                                    cnma.BOX_OFFSET: [offset],
                                                    cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_HEATMAP):
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2582..2591
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2784..2793

                                            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 64.

                                            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 3 locations. Consider refactoring.
                                            Open

                                                prediction_dict = {
                                                    cnma.OBJECT_CENTER: [class_center],
                                                    cnma.BOX_SCALE: [height_width],
                                                    cnma.BOX_OFFSET: [offset],
                                                    cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_HEATMAP):
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2506..2515
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2582..2591

                                            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 64.

                                            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

                                                keypoint_candidates_np = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [[2.0, 2.5], [6.0, 10.5], [4.0, 7.0]],  # Candidate 0.
                                            research/object_detection/utils/spatial_transform_ops_test.py on lines 468..470

                                            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 62.

                                            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

                                                def graph_fn():
                                                  predicted_embedding_feature_map = tf.constant(
                                                      predicted_embedding_feature_map_np, dtype=tf.float32)
                                            
                                                  gathered_predicted_embeddings = (
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1067..1076

                                            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 61.

                                            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

                                                def graph_fn():
                                                  regressed_keypoint_feature_map = tf.constant(
                                                      regressed_keypoint_feature_map_np, dtype=tf.float32)
                                            
                                                  gathered_regressed_keypoints = (
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1711..1720

                                            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 61.

                                            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

                                                self.assertAllEqual(
                                                    detections['detection_masks'][0, 1:, :, :],
                                                    np.zeros_like(detections['detection_masks'][0, 1:, :, :]))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2322..2324

                                            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 54.

                                            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

                                                self.assertAllEqual(
                                                    detections['detection_surface_coords'][0, 1:, :, :],
                                                    np.zeros_like(detections['detection_surface_coords'][0, 1:, :, :]))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2319..2321

                                            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 54.

                                            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

                                                prediction_dict = {
                                                    cnma.OBJECT_CENTER: [class_center],
                                                    cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_HEATMAP):
                                                        [keypoint_heatmaps],
                                                    cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_OFFSET):
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2646..2653

                                            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 52.

                                            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

                                                prediction_dict = {
                                                    cnma.OBJECT_CENTER: [class_center],
                                                    cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_HEATMAP):
                                                        [keypoint_heatmaps],
                                                    cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_OFFSET):
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2390..2397

                                            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 52.

                                            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

                                                keypoint_scores_np = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [0.8, 0.9, 1.0],  # Candidate 0.
                                            research/object_detection/utils/np_box_mask_list_ops_test.py on lines 108..110

                                            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 52.

                                            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

                                                distances_np = np.expand_dims(
                                                    np.array(
                                                        [
                                                            # Instance 0.
                                                            [
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1584..1598

                                            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 52.

                                            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

                                                distances_np = np.expand_dims(
                                                    np.array(
                                                        [
                                                            # Instance 0.
                                                            [
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1520..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 52.

                                            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

                                                expected_keypoint_candidates = [
                                                    [  # Example 0.
                                                        [[0.5, 0.25], [1.0, 2.0]],  # Keypoint 1.
                                                        [[1.75, 1.5], [1.0, 1.0]],  # Keypoint 2.
                                                    ],
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 945..952

                                            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

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

                                                expected_keypoint_candidates = [
                                                    [  # Example 0.
                                                        [[0.5, 0.25], [1.0, 2.0]],  # Candidate 1 of keypoint 1, 2.
                                                        [[1.75, 1.5], [1.0, 1.0]],  # Candidate 2 of keypoint 1, 2.
                                                    ],
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 732..739

                                            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 3 locations. Consider refactoring.
                                            Open

                                                def graph_fn():
                                                  feature_map = tf.constant(feature_map_np)
                                                  scores, y_inds, x_inds, channel_inds = (
                                                      cnma.top_k_feature_map_locations(
                                                          feature_map, max_pool_kernel_size=3, k=2, per_channel=True))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 535..540
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 567..572

                                            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

                                                def graph_fn():
                                                  feature_map = tf.constant(feature_map_np)
                                                  scores, y_inds, x_inds, channel_inds = (
                                                      cnma.top_k_feature_map_locations(
                                                          feature_map, max_pool_kernel_size=3, k=1, per_channel=False))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 503..508
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 567..572

                                            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

                                                def graph_fn():
                                                  feature_map = tf.constant(feature_map_np)
                                                  scores, y_inds, x_inds, channel_inds = (
                                                      cnma.top_k_feature_map_locations(
                                                          feature_map, max_pool_kernel_size=3, k=1, per_channel=True))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 503..508
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 535..540

                                            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 2 locations. Consider refactoring.
                                            Open

                                                def graph_fn():
                                                  kpt_coords = tf.constant(kpt_coords_np)
                                                  kpt_scores = tf.constant(kpt_scores_np)
                                                  kpt_coords_padded, kpt_scores_padded = (
                                                      cnma._pad_to_full_keypoint_dim(
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1681..1687

                                            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 2 locations. Consider refactoring.
                                            Open

                                                def graph_fn():
                                                  kpt_coords = tf.constant(kpt_coords_np)
                                                  kpt_scores = tf.constant(kpt_scores_np)
                                                  kpt_coords_padded, kpt_scores_padded = (
                                                      cnma._pad_to_full_instance_dim(
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1650..1656

                                            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

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

                                                  tf.tile(
                                                      tf.expand_dims(
                                                          tf.constant([[float('nan'), 0.55,
                                                                        float('nan'), 0.55, 0.55, 0.0]]),
                                                          axis=2),
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3036..3041

                                            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 48.

                                            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

                                                  tf.tile(
                                                      tf.expand_dims(
                                                          tf.constant([[float('nan'), 0.55,
                                                                        float('nan'), 0.55, 0.55, 0.0]]),
                                                          axis=2),
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3030..3035

                                            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 48.

                                            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

                                                regressed_keypoints_np = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [[2.0, 2.0], [6.0, 10.0], [14.0, 7.0]],  # Instance 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1342..1349

                                            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 48.

                                            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

                                                expected_refined_keypoints = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [[2.0, 2.5], [6.0, 10.5], [4.0, 7.0]],  # Instance 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1284..1291

                                            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 48.

                                            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 3 locations. Consider refactoring.
                                            Open

                                                self.assertAllClose(detections['detection_boxes'][0, 0],
                                                                    np.array([55, 46, 75, 86]) / 128.0)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2288..2289
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2601..2602

                                            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 42.

                                            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 3 locations. Consider refactoring.
                                            Open

                                                self.assertAllClose(detections['detection_boxes'][0, 0],
                                                                    np.array([55, 46, 75, 86]) / 128.0)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2454..2455
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2601..2602

                                            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 42.

                                            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 3 locations. Consider refactoring.
                                            Open

                                                self.assertAllClose(detections['detection_boxes'][0, 0],
                                                                    np.array([55, 46, 75, 86]) / 128.0)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2288..2289
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2454..2455

                                            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 42.

                                            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

                                                r_grid = np.array([[0, 0, 0, 0], [1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3],
                                                                   [4, 4, 4, 4]])
                                            research/object_detection/core/box_list_ops_test.py on lines 332..336
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 97..98

                                            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 42.

                                            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

                                                c_grid = np.array([[0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3],
                                                                   [0, 1, 2, 3]])
                                            research/object_detection/core/box_list_ops_test.py on lines 332..336
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 94..95

                                            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 42.

                                            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

                                                  expected_refined_scores = np.array(
                                                      [
                                                          # Example 0.
                                                          [
                                                              [0.8, 0.9, unmatched_keypoint_score],  # Instance 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1226..1240

                                            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 42.

                                            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

                                                  expected_refined_scores = np.array(
                                                      [
                                                          # Example 0.
                                                          [
                                                              [0.8, 0.9, unmatched_keypoint_score],  # Instance 0.
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1197..1211

                                            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 42.

                                            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

                                                  loss = self.model._compute_object_center_loss(
                                                      object_center_predictions=self.prediction_dict[cnma.OBJECT_CENTER],
                                                      input_height=self.input_height,
                                                      input_width=self.input_width,
                                                      per_pixel_weights=self.per_pixel_weights)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3170..3174

                                            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

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

                                                loss = self.model._compute_object_center_loss(
                                                    object_center_predictions=self.prediction_dict[cnma.OBJECT_CENTER],
                                                    input_height=self.input_height,
                                                    input_width=self.input_width,
                                                    per_pixel_weights=self.per_pixel_weights)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3155..3159

                                            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

                                                keypoint_depth_weights = [
                                                    tf.constant([[1.0, 1.0, 1.0, 1.0, 0.0, 0.0]]),
                                                    tf.constant([[1.0, 1.0, 1.0, 1.0, 0.0, 0.0]])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3055..3057
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3059..3061

                                            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 38.

                                            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

                                                keypoint_depth_weights = [
                                                    tf.constant([[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]),
                                                    tf.constant([[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3050..3052
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3055..3057

                                            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 38.

                                            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

                                                keypoint_depths = [
                                                    tf.constant([[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]]),
                                                    tf.constant([[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3050..3052
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3059..3061

                                            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 38.

                                            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

                                              temporal_offsets = [
                                                  tf.constant([[5.0, 5.0]], dtype=tf.float32),
                                                  tf.constant([[2.0, 3.0]], dtype=tf.float32),
                                            research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py on lines 1837..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 37.

                                            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

                                                self.assertEqual(predictions[cnma.BOX_SCALE][0].shape,
                                                                 (batch_size, height, width // stride, 2))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3593..3594

                                            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 37.

                                            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

                                                self.assertEqual(predictions[cnma.BOX_OFFSET][0].shape,
                                                                 (batch_size, height, width // stride, 2))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3590..3591

                                            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 37.

                                            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 9 locations. Consider refactoring.
                                            Open

                                                  expected_refined_depths = np.array([[[-0.8, 0.0, 0.0], [0.0, 0.0, -1.0]],
                                                                                      [[-0.7, -0.1, 0.0], [-0.7, -0.4,
                                                                                                           0.0]]])
                                            official/projects/centernet/losses/centernet_losses_test.py on lines 94..96
                                            official/projects/waste_identification_ml/model_inference/color_and_property_extractor_test.py on lines 75..82
                                            official/projects/waste_identification_ml/model_inference/color_and_property_extractor_test.py on lines 93..100
                                            official/projects/yt8m/modeling/yt8m_model_utils_test.py on lines 29..31
                                            research/deeplab/utils/get_dataset_colormap_test.py on lines 82..84
                                            research/delf/delf/python/datum_io_test.py on lines 73..74
                                            research/delf/delf/python/datum_io_test.py on lines 84..85
                                            research/object_detection/core/losses_test.py on lines 1405..1407

                                            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 36.

                                            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

                                              densepose_num_points = [
                                                  tf.constant([1], dtype=tf.int32),
                                                  tf.constant([0], dtype=tf.int32),
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3087..3089
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3095..3097
                                            research/object_detection/utils/ops_test.py on lines 1589..1591

                                            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 36.

                                            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

                                              track_match_flags = [
                                                  tf.constant([1.0], dtype=tf.float32),
                                                  tf.constant([1.0], dtype=tf.float32),
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3073..3075
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3087..3089
                                            research/object_detection/utils/ops_test.py on lines 1589..1591

                                            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 36.

                                            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

                                              track_ids = [
                                                  tf.constant([2], dtype=tf.int32),
                                                  tf.constant([1], dtype=tf.int32),
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3073..3075
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 3095..3097
                                            research/object_detection/utils/ops_test.py on lines 1589..1591

                                            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 36.

                                            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

                                                self.assertGreater(
                                                    0.01,
                                                    loss_dict['%s/%s' %
                                                              (cnma.LOSS_KEY_PREFIX,
                                                               cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_HEATMAP))])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2169..2173
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2174..2177

                                            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 36.

                                            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

                                                self.assertGreater(
                                                    0.01,
                                                    loss_dict['%s/%s' %
                                                              (cnma.LOSS_KEY_PREFIX,
                                                               cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_OFFSET))])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2164..2168
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2174..2177

                                            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 36.

                                            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

                                                self.assertAllClose(detections['detection_boxes'][0, 0],
                                                                    np.array([0, 0, 0, 0]))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2743..2744
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2745..2746

                                            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 36.

                                            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

                                                self.assertGreater(
                                                    0.01, loss_dict['%s/%s' % (cnma.LOSS_KEY_PREFIX,
                                                                               cnma.get_keypoint_name(
                                                                                   _TASK_NAME, cnma.KEYPOINT_REGRESSION))])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2164..2168
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2169..2173

                                            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 36.

                                            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

                                                self.assertAllClose(detections['detection_keypoint_depths'][0, 0],
                                                                    np.array([-1.0, -1.1, -1.2, 0.0]))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2745..2746
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2803..2804

                                            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 36.

                                            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

                                                self.assertAllClose(detections['detection_keypoint_scores'][0, 0],
                                                                    np.array([0.9, 0.9, 0.9, 0.1]))
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2743..2744
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2803..2804

                                            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 36.

                                            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

                                                  boxes = tf.constant(
                                                      [
                                                          [[0.5, 0.5, 1.0, 1.0],
                                                           [0.0, 0.5, 0.5, 1.0],
                                                           [0.0, 0.0, 0.0, 0.0]],
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 316..321

                                            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 35.

                                            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

                                                  boxes = tf.constant(
                                                      [
                                                          [[0.5, 0.5, 1.0, 1.0],
                                                           [0.0, 0.5, 0.5, 1.0],
                                                           [0.0, 0.0, 0.0, 0.0]],
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 276..281

                                            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 35.

                                            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

                                                keypoint_scores_np = np.array(
                                                    [
                                                        # Example 0.
                                                        [
                                                            [0.8, 0.9, 1.0],  # Candidate 0.
                                            official/projects/detr/ops/matchers_test.py on lines 32..33
                                            research/object_detection/utils/np_box_mask_list_ops_test.py on lines 138..139

                                            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 35.

                                            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

                                                object_heatmap_np = np.zeros((1, image_size[0], image_size[1], 1),
                                                                             dtype=np.float32)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 770..771
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 785..786
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 792..793

                                            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

                                                keypoint_offset_np = np.zeros((1, image_size[0], image_size[1], 8),
                                                                              dtype=np.float32)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 763..764
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 770..771
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 792..793

                                            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

                                                keypoint_heatmap_np = np.zeros((1, image_size[0], image_size[1], 4),
                                                                               dtype=np.float32)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 763..764
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 785..786
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 792..793

                                            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

                                                keypoint_regression_np = np.zeros((1, image_size[0], image_size[1], 8),
                                                                                  dtype=np.float32)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 763..764
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 770..771
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 785..786

                                            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 2 locations. Consider refactoring.
                                            Open

                                                  (refined_keypoints, refined_scores, _) = cnma.refine_keypoints(
                                                      regressed_keypoints,
                                                      keypoint_candidates,
                                                      keypoint_scores,
                                                      num_keypoint_candidates,
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1267..1271

                                            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 2 locations. Consider refactoring.
                                            Open

                                                  np.testing.assert_allclose(detections['detection_keypoints'][0][0],
                                                                             expected_kpts_for_obj_0, rtol=1e-6)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2333..2334

                                            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 2 locations. Consider refactoring.
                                            Open

                                                  np.testing.assert_allclose(detections['detection_keypoint_scores'][0][0],
                                                                             expected_kpt_scores_for_obj_0, rtol=1e-6)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2331..2332

                                            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 2 locations. Consider refactoring.
                                            Open

                                                  (refined_keypoints, refined_scores,
                                                   refined_depths) = cnma.refine_keypoints(
                                                       regressed_keypoints,
                                                       keypoint_candidates,
                                                       keypoint_scores,
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1169..1173

                                            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 2 locations. Consider refactoring.
                                            Open

                                                  (refined_keypoints, refined_scores, _) = cnma.refine_keypoints(
                                                      regressed_keypoints,
                                                      keypoint_candidates,
                                                      keypoint_scores,
                                                      num_keypoint_candidates,
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1325..1329

                                            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 2 locations. Consider refactoring.
                                            Open

                                                  (refined_keypoints, refined_scores, _) = cnma.refine_keypoints(
                                                      regressed_keypoints,
                                                      keypoint_candidates,
                                                      keypoint_scores,
                                                      num_keypoint_candidates,
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1453..1458

                                            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.assertGreater(ranking_scores[0, 0, 0, 2], ranking_scores[0, 0, 0, 1])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1563..1563
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1633..1634
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1638..1638

                                            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

                                                expected_gathered_keypoints_0 = regressed_keypoint_feature_map_np[
                                                    0, y_indices[0], x_indices[0], :]
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1082..1083
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1724..1725
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1726..1727

                                            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

                                                keypoint_heatmaps = np.ones(
                                                    (1, 32, 32, num_keypoints), dtype=np.float32) * _logit(0.01)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2210..2211
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2475..2476
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2685..2686

                                            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

                                                self.assertGreater(ranking_scores[0, 0, 0, 1], ranking_scores[0, 0, 0, 0])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1562..1562
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1633..1634
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1638..1638

                                            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

                                                self.assertAlmostEqual(
                                                    ranking_scores[0, 0, 0, 0], ranking_scores[0, 0, 0, 1])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1562..1562
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1563..1563
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1638..1638

                                            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

                                                keypoint_heatmaps = np.ones(
                                                    (1, 32, 32, num_keypoints), dtype=np.float32) * _logit(0.001)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2210..2211
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2475..2476
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2554..2555

                                            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

                                                keypoint_heatmaps = np.ones(
                                                    (1, 32, 32, num_keypoints), dtype=np.float32) * _logit(0.01)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2210..2211
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2554..2555
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2685..2686

                                            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

                                                expected_gathered_embeddings_1 = predicted_embedding_feature_map_np[
                                                    1, y_indices[1], x_indices[1], :]
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1080..1081
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1082..1083
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1724..1725

                                            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

                                                expected_gathered_embeddings_0 = predicted_embedding_feature_map_np[
                                                    0, y_indices[0], x_indices[0], :]
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1080..1081
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1082..1083
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1726..1727

                                            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

                                                expected_gathered_keypoints_1 = regressed_keypoint_feature_map_np[
                                                    1, y_indices[1], x_indices[1], :]
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1080..1081
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1724..1725
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1726..1727

                                            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

                                                self.assertGreater(ranking_scores[0, 0, 0, 0], ranking_scores[0, 1, 0, 0])
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1562..1562
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1563..1563
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 1633..1634

                                            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

                                                keypoint_heatmaps = np.ones(
                                                    (1, 32, 32, num_keypoints), dtype=np.float32) * _logit(0.001)
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2475..2476
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2554..2555
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2685..2686

                                            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 3 locations. Consider refactoring.
                                            Open

                                                output = model._prediction_head_dict[cnma.get_keypoint_name(
                                                    _TASK_NAME, cnma.KEYPOINT_HEATMAP)][-1](
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2009..2010
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2021..2022

                                            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 3 locations. Consider refactoring.
                                            Open

                                                output = model._prediction_head_dict[cnma.get_keypoint_name(
                                                    _TASK_NAME, cnma.KEYPOINT_REGRESSION)][-1](
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2009..2010
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_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 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 3 locations. Consider refactoring.
                                            Open

                                                output = model._prediction_head_dict[
                                                    cnma.get_keypoint_name(_TASK_NAME, cnma.KEYPOINT_OFFSET)][-1](
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2015..2016
                                            research/object_detection/meta_architectures/center_net_meta_arch_tf2_test.py on lines 2021..2022

                                            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