tensorflow/models

View on GitHub
official/projects/centernet/modeling/layers/detection_generator.py

Summary

Maintainability
B
6 hrs
Test Coverage

File detection_generator.py has 264 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: Minor
Found in official/projects/centernet/modeling/layers/detection_generator.py - About 2 hrs to fix

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

      def __init__(self,
    Severity: Major
    Found in official/projects/centernet/modeling/layers/detection_generator.py - About 1 hr to fix

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

        def get_boxes(self,
                      y_indices: tf.Tensor,
                      x_indices: tf.Tensor,
                      channel_indices: tf.Tensor,
                      height_width_predictions: tf.Tensor,
      Severity: Minor
      Found in official/projects/centernet/modeling/layers/detection_generator.py - About 1 hr to fix

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

          def get_boxes(self,
        Severity: Minor
        Found in official/projects/centernet/modeling/layers/detection_generator.py - About 45 mins to fix

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

            def get_top_k_peaks(self,
          Severity: Minor
          Found in official/projects/centernet/modeling/layers/detection_generator.py - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status