Showing 11,634 of 11,634 total issues
Function ExportKeypointsToCOCO
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ExportKeypointsToCOCO(image_ids,
Avoid deeply nested control flow statements. Open
if depth > 0 and self._num_layers_before_predictor > 0:
for i in range(self._num_layers_before_predictor):
net = slim.conv2d(
net,
depth, [1, 1],
Function ExportSegmentsToCOCO
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ExportSegmentsToCOCO(image_ids,
Function _compute_base_tower
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _compute_base_tower(self, tower_name_scope, image_feature, feature_index):
net = image_feature
for i in range(self._num_layers_before_predictor):
if self._use_depthwise:
conv_op = functools.partial(slim.separable_conv2d, depth_multiplier=1)
- Read upRead up
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 _predict
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _predict(self,
image_features,
num_predictions_per_location,
prediction_stage=2):
"""Optionally computes encoded object locations, confidences, and masks.
- Read upRead up
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 _generate_examples
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _generate_examples(self, annotation_file, excluded_file, label_map,
Function export
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def export(pipeline_config_file,
Function train_input
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def train_input(train_config, train_input_config,
Function main
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def main(_):
tf.logging.set_verbosity(tf.logging.INFO)
required_flags = [
'input_box_annotations_csv', 'input_images_directory', 'input_label_map',
- Read upRead up
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 run_inference
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def run_inference(inputs,
Function dict_to_tf_example
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def dict_to_tf_example(data,
dataset_directory,
label_map_dict,
ignore_difficult_instances=False,
image_subdirectory='JPEGImages'):
- Read upRead up
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 assign_temporal_offset_targets
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def assign_temporal_offset_targets(self,
Function create_target_assigner
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def create_target_assigner(reference, stage=None,
negative_class_weight=1.0, use_matmul_gather=False):
"""Factory function for creating standard target assigners.
Args:
- Read upRead up
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 assign
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def assign(self,
Function eval_input
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def eval_input(eval_config, eval_input_config, model_config,
Function assign_center_targets_from_boxes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def assign_center_targets_from_boxes(self,
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self):
"""Constructor."""
path = os.path.dirname(os.path.abspath(__file__))
uv_symmetry_transforms_path = tf.resource_loader.get_path_to_datafile(
- Read upRead up
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 create_pipeline
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_pipeline(pipeline,
Function construct_pipeline
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def construct_pipeline(pipeline, input_tfrecord, output_tfrecord, model_dir,
Function resize_image
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def resize_image(image,