tensorflow/models

View on GitHub

Showing 11,634 of 11,634 total issues

Function _postprocess_keypoints_single_class has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def _postprocess_keypoints_single_class(self, prediction_dict, classes,
Severity: Minor
Found in research/object_detection/meta_architectures/center_net_meta_arch.py - About 45 mins to fix

    Function transform_instance_masks has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def transform_instance_masks(instance_masks, tx, ty, sx, sy, flip):
    Severity: Minor
    Found in research/object_detection/meta_architectures/deepmac_meta_arch.py - About 45 mins to fix

      Function _loss_rpn has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def _loss_rpn(self, rpn_box_encodings,
      Severity: Minor
      Found in research/object_detection/meta_architectures/faster_rcnn_meta_arch.py - About 45 mins to fix

        Function _get_box_classifier_features_shape has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          def _get_box_classifier_features_shape(self,

          Function _get_second_stage_box_predictor has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            def _get_second_stage_box_predictor(self,

            Function graph_fn has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def graph_fn(preprocessed_tensor, groundtruth_boxes1, groundtruth_boxes2,
            Severity: Minor
            Found in research/object_detection/meta_architectures/ssd_meta_arch_test.py - About 45 mins to fix

              Function _get_box_classifier_features_shape has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                def _get_box_classifier_features_shape(self,
              Severity: Minor
              Found in research/object_detection/meta_architectures/rfcn_meta_arch_test.py - About 45 mins to fix

                Function _box_prediction has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  def _box_prediction(self, rpn_features_to_crop, proposal_boxes_normalized,
                Severity: Minor
                Found in research/object_detection/meta_architectures/context_rcnn_meta_arch.py - About 45 mins to fix

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

                    def __init__(self,
                                 is_training,
                                 anchor_generator,
                                 box_predictor,
                                 box_coder,
                  Severity: Minor
                  Found in research/object_detection/meta_architectures/ssd_meta_arch.py - About 45 mins to fix

                  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 _compute_second_stage_input_feature_maps has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    def _compute_second_stage_input_feature_maps(self, features_to_crop,
                  Severity: Minor
                  Found in research/object_detection/meta_architectures/context_rcnn_meta_arch.py - About 45 mins to fix

                    Function _get_box_classifier_features_shape has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      def _get_box_classifier_features_shape(self,

                      Function _get_mask_proposal_boxes_and_classes has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        def _get_mask_proposal_boxes_and_classes(
                      Severity: Minor
                      Found in research/object_detection/meta_architectures/faster_rcnn_meta_arch.py - About 45 mins to fix

                        Function continuous_eval has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def continuous_eval(estimator,
                        Severity: Minor
                        Found in research/object_detection/model_lib.py - About 45 mins to fix

                          Function _predict_second_stage has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            def _predict_second_stage(self, rpn_box_encodings,
                          Severity: Minor
                          Found in research/object_detection/meta_architectures/rfcn_meta_arch.py - About 45 mins to fix

                            Function _postprocess_keypoints_multi_class has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              def _postprocess_keypoints_multi_class(self, prediction_dict, classes,
                            Severity: Minor
                            Found in research/object_detection/meta_architectures/center_net_meta_arch.py - About 45 mins to fix

                              Function _get_second_stage_box_predictor has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                def _get_second_stage_box_predictor(self, num_classes, is_training,

                                Function _sample_box_classifier_batch has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  def _sample_box_classifier_batch(
                                Severity: Minor
                                Found in research/object_detection/meta_architectures/faster_rcnn_meta_arch.py - About 45 mins to fix

                                  Function _postprocess_box_classifier has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                    def _postprocess_box_classifier(self,
                                  Severity: Minor
                                  Found in research/object_detection/meta_architectures/faster_rcnn_meta_arch.py - About 45 mins to fix

                                    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

                                    Avoid deeply nested control flow statements.
                                    Open

                                                with tf.variable_scope('Mixed_7a'):
                                                  with tf.variable_scope('Branch_0'):
                                                    tower_conv = slim.conv2d(proposal_feature_maps,
                                                                             256, 1, scope='Conv2d_0a_1x1')
                                                    tower_conv_1 = slim.conv2d(
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language