tensorflow/models

View on GitHub
official/vision/ops/augment.py

Summary

Maintainability
F
1 wk
Test Coverage

File augment.py has 2280 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2024 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 official/vision/ops/augment.py - About 6 days to fix

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

      def __init__(self,
    Severity: Major
    Found in official/vision/ops/augment.py - About 1 hr to fix

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

        def __init__(self,
      Severity: Major
      Found in official/vision/ops/augment.py - About 1 hr to fix

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

          def build_for_detection(cls,
        Severity: Major
        Found in official/vision/ops/augment.py - About 1 hr to fix

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

            def __init__(self,
          Severity: Major
          Found in official/vision/ops/augment.py - About 50 mins to fix

            Function _apply_bbox_augmentation_wrapper has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def _apply_bbox_augmentation_wrapper(image, bbox, new_bboxes, prob,
            Severity: Major
            Found in official/vision/ops/augment.py - About 50 mins to fix

              Function _apply_transform_to_images has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def _apply_transform_to_images(
              Severity: Major
              Found in official/vision/ops/augment.py - About 50 mins to fix

                Function _parse_policy_info has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def _parse_policy_info(name: str,
                Severity: Major
                Found in official/vision/ops/augment.py - About 50 mins to fix

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

                  def _fill_rectangle_video(image,
                  Severity: Minor
                  Found in official/vision/ops/augment.py - About 45 mins to fix

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

                    def _fill_rectangle(image,
                    Severity: Minor
                    Found in official/vision/ops/augment.py - About 45 mins to fix

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

                      def _apply_multi_bbox_augmentation(image, bboxes, prob, aug_func,
                      Severity: Minor
                      Found in official/vision/ops/augment.py - About 45 mins to fix

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

                        def gaussian_filter2d(
                        Severity: Minor
                        Found in official/vision/ops/augment.py - About 45 mins to fix

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

                          def _apply_multi_bbox_augmentation_wrapper(image, bboxes, prob, aug_func,
                          Severity: Minor
                          Found in official/vision/ops/augment.py - About 45 mins to fix

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

                            def transform(
                            Severity: Minor
                            Found in official/vision/ops/augment.py - About 45 mins to fix

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

                              def _check_bbox_area(min_y, min_x, max_y, max_x, delta=0.05):
                              Severity: Minor
                              Found in official/vision/ops/augment.py - About 35 mins to fix

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

                                def translate_bbox(image, bboxes, pixels, replace, shift_horizontal):
                                Severity: Minor
                                Found in official/vision/ops/augment.py - About 35 mins to fix

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

                                    def __init__(self,
                                  Severity: Minor
                                  Found in official/vision/ops/augment.py - About 35 mins to fix

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

                                    def _shear_bbox(bbox, image_height, image_width, level, shear_horizontal):
                                    Severity: Minor
                                    Found in official/vision/ops/augment.py - About 35 mins to fix

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

                                      def translate_y_only_bboxes(
                                      Severity: Minor
                                      Found in official/vision/ops/augment.py - About 35 mins to fix

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

                                        def shear_with_bboxes(image, bboxes, level, replace, shear_horizontal):
                                        Severity: Minor
                                        Found in official/vision/ops/augment.py - About 35 mins to fix

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

                                          def _shift_bbox(bbox, image_height, image_width, pixels, shift_horizontal):
                                          Severity: Minor
                                          Found in official/vision/ops/augment.py - About 35 mins to fix

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

                                            def translate(
                                            Severity: Minor
                                            Found in official/vision/ops/augment.py - About 35 mins to fix

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

                                              def _apply_func_with_prob(func: Any, image: tf.Tensor,
                                              Severity: Minor
                                              Found in official/vision/ops/augment.py - About 35 mins to fix

                                                There are no issues that match your filters.

                                                Category
                                                Status