tensorflow/models

View on GitHub
research/object_detection/inputs_test.py

Summary

Maintainability
F
2 wks
Test Coverage

File inputs_test.py has 1581 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    InputFnTest has 21 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class InputFnTest(test_case.TestCase, parameterized.TestCase):
    
      def test_faster_rcnn_resnet50_train_input(self):
        """Tests the training input function for FasterRcnnResnet50."""
        configs = _get_configs_for_model('faster_rcnn_resnet50_pets')
    Severity: Minor
    Found in research/object_detection/inputs_test.py - About 2 hrs to fix

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

        def test_ssd_inceptionV2_eval_input_with_additional_channels(
            self, eval_batch_size=1):
          """Tests the eval input function for SSDInceptionV2 with additional channel.
      
          Args:
      Severity: Minor
      Found in research/object_detection/inputs_test.py - About 1 hr to fix

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

          def test_faster_rcnn_resnet50_eval_input(self, eval_batch_size=1):
            """Tests the eval input function for FasterRcnnResnet50."""
            configs = _get_configs_for_model('faster_rcnn_resnet50_pets')
            model_config = configs['model']
            model_config.faster_rcnn.num_classes = 37
        Severity: Minor
        Found in research/object_detection/inputs_test.py - About 1 hr to fix

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

            def test_ssd_inceptionV2_eval_input(self, eval_batch_size=1):
              """Tests the eval input function for SSDInceptionV2."""
              configs = _get_configs_for_model('ssd_inception_v2_pets')
              model_config = configs['model']
              model_config.ssd.num_classes = 37
          Severity: Minor
          Found in research/object_detection/inputs_test.py - About 1 hr to fix

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

              def test_gray_images_and_additional_channels(self):
                input_tensor_dict = {
                    fields.InputDataFields.image:
                        test_utils.image_with_dynamic_shape(4, 4, 3),
                    fields.InputDataFields.image_additional_channels:
            Severity: Major
            Found in research/object_detection/inputs_test.py and 1 other location - About 1 day to fix
            research/object_detection/inputs_test.py on lines 1533..1553

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

            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_images_and_additional_channels(self):
                input_tensor_dict = {
                    fields.InputDataFields.image:
                        test_utils.image_with_dynamic_shape(4, 3, 5),
                    fields.InputDataFields.image_additional_channels:
            Severity: Major
            Found in research/object_detection/inputs_test.py and 1 other location - About 1 day to fix
            research/object_detection/inputs_test.py on lines 1586..1606

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

            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

                  tensor_dict = {
                      fields.InputDataFields.image:
                          tf.constant(np.random.rand(4, 4, 3).astype(np.float32)),
                      fields.InputDataFields.groundtruth_boxes:
                          tf.constant(np.array([[.5, .5, 1, 1], [.5, .5, 1, 1]],
            Severity: Major
            Found in research/object_detection/inputs_test.py and 1 other location - About 5 hrs to fix
            research/object_detection/inputs_test.py on lines 993..999

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 95.

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

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

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

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

            Refactorings

            Further Reading

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

                  tensor_dict = {
                      fields.InputDataFields.image:
                          tf.constant(np.random.rand(4, 4, 3).astype(np.float32)),
                      fields.InputDataFields.groundtruth_boxes:
                          tf.constant(np.array([[0, 0, 1, 1], [.5, .5, 1, 1]], np.float32)),
            Severity: Major
            Found in research/object_detection/inputs_test.py and 1 other location - About 5 hrs to fix
            research/object_detection/inputs_test.py on lines 1083..1090

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 95.

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

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

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

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

            Refactorings

            Further Reading

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

              def test_error_with_bad_eval_config(self):
                """Tests that a TypeError is raised with improper eval config."""
                configs = _get_configs_for_model('ssd_inception_v2_pets')
                configs['model'].ssd.num_classes = 37
                eval_input_fn = inputs.create_eval_input_fn(
            Severity: Major
            Found in research/object_detection/inputs_test.py and 1 other location - About 5 hrs to fix
            research/object_detection/inputs_test.py on lines 645..654

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

            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_error_with_bad_eval_model_config(self):
                """Tests that a TypeError is raised with improper eval model config."""
                configs = _get_configs_for_model('ssd_inception_v2_pets')
                configs['model'].ssd.num_classes = 37
                eval_input_fn = inputs.create_eval_input_fn(
            Severity: Major
            Found in research/object_detection/inputs_test.py and 1 other location - About 5 hrs to fix
            research/object_detection/inputs_test.py on lines 623..632

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

            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

              def test_error_with_bad_train_model_config(self):
                """Tests that a TypeError is raised with improper train model config."""
                configs = _get_configs_for_model('ssd_inception_v2_pets')
                configs['model'].ssd.num_classes = 37
                train_input_fn = inputs.create_train_input_fn(
            Severity: Major
            Found in research/object_detection/inputs_test.py and 3 other locations - About 4 hrs to fix
            research/object_detection/inputs_test.py on lines 590..599
            research/object_detection/inputs_test.py on lines 601..610
            research/object_detection/inputs_test.py on lines 634..643

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

              def test_error_with_bad_train_config(self):
                """Tests that a TypeError is raised with improper train config."""
                configs = _get_configs_for_model('ssd_inception_v2_pets')
                configs['model'].ssd.num_classes = 37
                train_input_fn = inputs.create_train_input_fn(
            Severity: Major
            Found in research/object_detection/inputs_test.py and 3 other locations - About 4 hrs to fix
            research/object_detection/inputs_test.py on lines 601..610
            research/object_detection/inputs_test.py on lines 612..621
            research/object_detection/inputs_test.py on lines 634..643

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

              def test_error_with_bad_eval_input_config(self):
                """Tests that a TypeError is raised with improper eval input config."""
                configs = _get_configs_for_model('ssd_inception_v2_pets')
                configs['model'].ssd.num_classes = 37
                eval_input_fn = inputs.create_eval_input_fn(
            Severity: Major
            Found in research/object_detection/inputs_test.py and 3 other locations - About 4 hrs to fix
            research/object_detection/inputs_test.py on lines 590..599
            research/object_detection/inputs_test.py on lines 601..610
            research/object_detection/inputs_test.py on lines 612..621

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

              def test_error_with_bad_train_input_config(self):
                """Tests that a TypeError is raised with improper train input config."""
                configs = _get_configs_for_model('ssd_inception_v2_pets')
                configs['model'].ssd.num_classes = 37
                train_input_fn = inputs.create_train_input_fn(
            Severity: Major
            Found in research/object_detection/inputs_test.py and 3 other locations - About 4 hrs to fix
            research/object_detection/inputs_test.py on lines 590..599
            research/object_detection/inputs_test.py on lines 612..621
            research/object_detection/inputs_test.py on lines 634..643

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

                  return (transformed_inputs[fields.InputDataFields.groundtruth_boxes],
                          transformed_inputs[fields.InputDataFields.groundtruth_classes],
                          transformed_inputs[fields.InputDataFields.
                                             groundtruth_confidences],
                          transformed_inputs[fields.InputDataFields.num_groundtruth_boxes])
            Severity: Major
            Found in research/object_detection/inputs_test.py and 2 other locations - About 1 hr to fix
            research/object_detection/builders/decoder_builder_test.py on lines 154..157
            research/object_detection/inputs_test.py on lines 771..774

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

            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

                  return (augmented_tensor_dict[fields.InputDataFields.image],
                          augmented_tensor_dict[fields.InputDataFields.groundtruth_boxes],
                          augmented_tensor_dict[fields.InputDataFields.groundtruth_classes],
                          augmented_tensor_dict[fields.InputDataFields.groundtruth_weights])
            Severity: Major
            Found in research/object_detection/inputs_test.py and 2 other locations - About 1 hr to fix
            research/object_detection/builders/decoder_builder_test.py on lines 154..157
            research/object_detection/inputs_test.py on lines 1101..1105

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

            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

                  tensor_dict = {
                      fields.InputDataFields.image:
                          tf.constant(np.random.rand(4, 4, 3).astype(np.float32)),
                      fields.InputDataFields.groundtruth_boxes:
                          tf.constant(
            Severity: Major
            Found in research/object_detection/inputs_test.py and 2 other locations - About 1 hr to fix
            research/object_detection/dataset_tools/oid_tfrecord_creation.py on lines 51..78
            research/object_detection/utils/visualization_utils_test.py on lines 521..537

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

            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 _make_initializable_iterator(dataset):
              """Creates an iterator, and initializes tables.
            
              Args:
                dataset: A `tf.data.Dataset` object.
            Severity: Major
            Found in research/object_detection/inputs_test.py and 1 other location - About 1 hr to fix
            research/object_detection/model_lib_tf1_test.py on lines 110..121

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

            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

                  tensor_dict = {
                      fields.InputDataFields.image: image,
                      fields.InputDataFields.groundtruth_classes:
                          tf.constant(np.array([3, 1], np.int32))
            Severity: Major
            Found in research/object_detection/inputs_test.py and 2 other locations - About 55 mins to fix
            research/object_detection/inputs_test.py on lines 1224..1227
            research/object_detection/inputs_test.py on lines 1252..1255

            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

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

                  tensor_dict = {
                      fields.InputDataFields.image: image,
                      fields.InputDataFields.groundtruth_classes:
                          tf.constant(np.array([3, 1], np.int32))
            Severity: Major
            Found in research/object_detection/inputs_test.py and 2 other locations - About 55 mins to fix
            research/object_detection/inputs_test.py on lines 1199..1202
            research/object_detection/inputs_test.py on lines 1252..1255

            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

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

                  tensor_dict = {
                      fields.InputDataFields.image: image,
                      fields.InputDataFields.groundtruth_classes:
                          tf.constant(np.array([3, 1], np.int32))
            Severity: Major
            Found in research/object_detection/inputs_test.py and 2 other locations - About 55 mins to fix
            research/object_detection/inputs_test.py on lines 1199..1202
            research/object_detection/inputs_test.py on lines 1224..1227

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

                  return (padded_tensor_dict[fields.InputDataFields.groundtruth_boxes],
                          padded_tensor_dict[fields.InputDataFields.groundtruth_classes],
                          padded_tensor_dict[fields.InputDataFields.num_groundtruth_boxes])
            Severity: Major
            Found in research/object_detection/inputs_test.py and 4 other locations - About 50 mins to fix
            research/object_detection/builders/decoder_builder_test.py on lines 129..131
            research/object_detection/inputs_test.py on lines 803..806
            research/object_detection/inputs_test.py on lines 835..837
            research/object_detection/inputs_test.py on lines 1184..1187

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

                  return (augmented_tensor_dict[fields.InputDataFields.image],
                          augmented_tensor_dict[fields.InputDataFields.
                                                groundtruth_instance_masks],
                          augmented_tensor_dict[fields.InputDataFields.
            Severity: Major
            Found in research/object_detection/inputs_test.py and 4 other locations - About 50 mins to fix
            research/object_detection/builders/decoder_builder_test.py on lines 129..131
            research/object_detection/inputs_test.py on lines 835..837
            research/object_detection/inputs_test.py on lines 1184..1187
            research/object_detection/inputs_test.py on lines 1524..1526

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

                  return (transformed_inputs[fields.InputDataFields.original_image],
                          transformed_inputs[fields.InputDataFields.
                                             original_image_spatial_shape],
                          transformed_inputs[fields.InputDataFields.
            Severity: Major
            Found in research/object_detection/inputs_test.py and 4 other locations - About 50 mins to fix
            research/object_detection/builders/decoder_builder_test.py on lines 129..131
            research/object_detection/inputs_test.py on lines 803..806
            research/object_detection/inputs_test.py on lines 835..837
            research/object_detection/inputs_test.py on lines 1524..1526

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

                  return (augmented_tensor_dict[fields.InputDataFields.image],
                          augmented_tensor_dict[fields.InputDataFields.groundtruth_boxes],
                          augmented_tensor_dict[fields.InputDataFields.
            Severity: Major
            Found in research/object_detection/inputs_test.py and 4 other locations - About 50 mins to fix
            research/object_detection/builders/decoder_builder_test.py on lines 129..131
            research/object_detection/inputs_test.py on lines 803..806
            research/object_detection/inputs_test.py on lines 1184..1187
            research/object_detection/inputs_test.py on lines 1524..1526

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

                self.assertAllEqual(
                    [eval_batch_size, 100, model_config.ssd.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 210..212
            research/object_detection/inputs_test.py on lines 260..262
            research/object_detection/inputs_test.py on lines 270..272
            research/object_detection/inputs_test.py on lines 304..306
            research/object_detection/inputs_test.py on lines 345..347
            research/object_detection/inputs_test.py on lines 380..382
            research/object_detection/inputs_test.py on lines 390..392
            research/object_detection/inputs_test.py on lines 423..425
            research/object_detection/inputs_test.py on lines 466..468

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

                self.assertAllEqual(
                    [eval_batch_size, 100, model_config.ssd.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 210..212
            research/object_detection/inputs_test.py on lines 260..262
            research/object_detection/inputs_test.py on lines 270..272
            research/object_detection/inputs_test.py on lines 304..306
            research/object_detection/inputs_test.py on lines 345..347
            research/object_detection/inputs_test.py on lines 380..382
            research/object_detection/inputs_test.py on lines 390..392
            research/object_detection/inputs_test.py on lines 423..425
            research/object_detection/inputs_test.py on lines 532..534

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

                self.assertAllEqual(
                    [eval_batch_size, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 260..262
            research/object_detection/inputs_test.py on lines 270..272
            research/object_detection/inputs_test.py on lines 304..306
            research/object_detection/inputs_test.py on lines 345..347
            research/object_detection/inputs_test.py on lines 380..382
            research/object_detection/inputs_test.py on lines 390..392
            research/object_detection/inputs_test.py on lines 423..425
            research/object_detection/inputs_test.py on lines 466..468
            research/object_detection/inputs_test.py on lines 532..534

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

                self.assertAllEqual(
                    [batch_size, 100, model_config.ssd.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 210..212
            research/object_detection/inputs_test.py on lines 260..262
            research/object_detection/inputs_test.py on lines 270..272
            research/object_detection/inputs_test.py on lines 304..306
            research/object_detection/inputs_test.py on lines 345..347
            research/object_detection/inputs_test.py on lines 380..382
            research/object_detection/inputs_test.py on lines 390..392
            research/object_detection/inputs_test.py on lines 466..468
            research/object_detection/inputs_test.py on lines 532..534

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

                self.assertAllEqual(
                    [eval_batch_size, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 210..212
            research/object_detection/inputs_test.py on lines 260..262
            research/object_detection/inputs_test.py on lines 270..272
            research/object_detection/inputs_test.py on lines 304..306
            research/object_detection/inputs_test.py on lines 380..382
            research/object_detection/inputs_test.py on lines 390..392
            research/object_detection/inputs_test.py on lines 423..425
            research/object_detection/inputs_test.py on lines 466..468
            research/object_detection/inputs_test.py on lines 532..534

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

                self.assertAllEqual(
                    [train_batch_size, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 210..212
            research/object_detection/inputs_test.py on lines 260..262
            research/object_detection/inputs_test.py on lines 270..272
            research/object_detection/inputs_test.py on lines 304..306
            research/object_detection/inputs_test.py on lines 345..347
            research/object_detection/inputs_test.py on lines 390..392
            research/object_detection/inputs_test.py on lines 423..425
            research/object_detection/inputs_test.py on lines 466..468
            research/object_detection/inputs_test.py on lines 532..534

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

                self.assertAllEqual(
                    [train_batch_size, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_confidences].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 210..212
            research/object_detection/inputs_test.py on lines 260..262
            research/object_detection/inputs_test.py on lines 270..272
            research/object_detection/inputs_test.py on lines 304..306
            research/object_detection/inputs_test.py on lines 345..347
            research/object_detection/inputs_test.py on lines 380..382
            research/object_detection/inputs_test.py on lines 423..425
            research/object_detection/inputs_test.py on lines 466..468
            research/object_detection/inputs_test.py on lines 532..534

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

                self.assertAllEqual(
                    [train_batch_size, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 210..212
            research/object_detection/inputs_test.py on lines 270..272
            research/object_detection/inputs_test.py on lines 304..306
            research/object_detection/inputs_test.py on lines 345..347
            research/object_detection/inputs_test.py on lines 380..382
            research/object_detection/inputs_test.py on lines 390..392
            research/object_detection/inputs_test.py on lines 423..425
            research/object_detection/inputs_test.py on lines 466..468
            research/object_detection/inputs_test.py on lines 532..534

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

                self.assertAllEqual(
                    [train_batch_size, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_confidences].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 210..212
            research/object_detection/inputs_test.py on lines 260..262
            research/object_detection/inputs_test.py on lines 304..306
            research/object_detection/inputs_test.py on lines 345..347
            research/object_detection/inputs_test.py on lines 380..382
            research/object_detection/inputs_test.py on lines 390..392
            research/object_detection/inputs_test.py on lines 423..425
            research/object_detection/inputs_test.py on lines 466..468
            research/object_detection/inputs_test.py on lines 532..534

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

                self.assertAllEqual(
                    [eval_batch_size, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 9 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 210..212
            research/object_detection/inputs_test.py on lines 260..262
            research/object_detection/inputs_test.py on lines 270..272
            research/object_detection/inputs_test.py on lines 345..347
            research/object_detection/inputs_test.py on lines 380..382
            research/object_detection/inputs_test.py on lines 390..392
            research/object_detection/inputs_test.py on lines 423..425
            research/object_detection/inputs_test.py on lines 466..468
            research/object_detection/inputs_test.py on lines 532..534

            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.assertAllEqual(
                    [1, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_confidences].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 3 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 121..123
            research/object_detection/inputs_test.py on lines 163..165
            research/object_detection/inputs_test.py on lines 173..175

            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

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

                predict_input_fn = inputs.create_predict_input_fn(
                    model_config=configs['model'],
                    predict_input_config=configs['eval_input_configs'][0])
            Severity: Minor
            Found in research/object_detection/inputs_test.py and 1 other location - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 561..563

            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

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

                predict_input_fn = inputs.create_predict_input_fn(
                    model_config=configs['model'],
                    predict_input_config=configs['eval_input_configs'][0])
            Severity: Minor
            Found in research/object_detection/inputs_test.py and 1 other location - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 577..579

            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.assertAllEqual(
                    [1, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 3 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 121..123
            research/object_detection/inputs_test.py on lines 131..133
            research/object_detection/inputs_test.py on lines 173..175

            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.assertAllEqual(
                    [1, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_classes].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 3 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 131..133
            research/object_detection/inputs_test.py on lines 163..165
            research/object_detection/inputs_test.py on lines 173..175

            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.assertAllEqual(
                    [1, 100, model_config.faster_rcnn.num_classes],
                    labels[fields.InputDataFields.groundtruth_confidences].shape.as_list())
            Severity: Major
            Found in research/object_detection/inputs_test.py and 3 other locations - About 40 mins to fix
            research/object_detection/inputs_test.py on lines 121..123
            research/object_detection/inputs_test.py on lines 131..133
            research/object_detection/inputs_test.py on lines 163..165

            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

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

                data_augmentation_options = [
                    (preprocessor.resize_image, {
                        'new_height': 20,
                        'new_width': 20,
                        'method': tf.image.ResizeMethod.NEAREST_NEIGHBOR
            Severity: Minor
            Found in research/object_detection/inputs_test.py and 2 other locations - About 30 mins to fix
            research/object_detection/inputs_test.py on lines 721..727
            research/object_detection/inputs_test.py on lines 814..820

            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

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

                data_augmentation_options = [
                    (preprocessor.resize_image, {
                        'new_height': 20,
                        'new_width': 20,
                        'method': tf.image.ResizeMethod.NEAREST_NEIGHBOR
            Severity: Minor
            Found in research/object_detection/inputs_test.py and 2 other locations - About 30 mins to fix
            research/object_detection/inputs_test.py on lines 748..754
            research/object_detection/inputs_test.py on lines 814..820

            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

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

                data_augmentation_options = [
                    (preprocessor.resize_image, {
                        'new_height': 20,
                        'new_width': 20,
                        'method': tf.image.ResizeMethod.NEAREST_NEIGHBOR
            Severity: Minor
            Found in research/object_detection/inputs_test.py and 2 other locations - About 30 mins to fix
            research/object_detection/inputs_test.py on lines 721..727
            research/object_detection/inputs_test.py on lines 748..754

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

              fname = os.path.join(tf.resource_loader.get_data_files_path(),
                                   'test_data/' + model_name + '.config')
            Severity: Minor
            Found in research/object_detection/inputs_test.py and 1 other location - About 30 mins to fix
            research/object_detection/inputs_test.py on lines 48..49

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

              fname = os.path.join(tf.resource_loader.get_data_files_path(),
                                   'samples/configs/' + model_name + '.config')
            Severity: Minor
            Found in research/object_detection/inputs_test.py and 1 other location - About 30 mins to fix
            research/object_detection/inputs_test.py on lines 66..67

            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