Showing 11,634 of 11,634 total issues
Function merge_external_params_with_configs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def merge_external_params_with_configs(configs, hparams=None, kwargs_dict=None):
"""Updates `configs` dictionary based on supplied parameters.
This utility is for modifying specific fields in the object detection configs.
Say that one would like to experiment with different learning rates, momentum
- 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
Avoid deeply nested control flow statements. Open
if not display_str:
display_str = 'ID {}'.format(track_ids[i])
else:
display_str = '{}: ID {}'.format(display_str, track_ids[i])
box_to_display_str_map[box].append(display_str)
Function _get_overlaps_and_scores_mask_mode
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_overlaps_and_scores_mask_mode(self, detected_boxes, detected_scores,
Function multilevel_matmul_crop_and_resize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def multilevel_matmul_crop_and_resize(images, boxes, box_levels, crop_size,
Function draw_side_by_side_evaluation_image
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def draw_side_by_side_evaluation_image(eval_dict,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function create_visualization_fn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_visualization_fn(category_index,
Function batch_position_sensitive_crop_regions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def batch_position_sensitive_crop_regions(images,
Function get_configs_from_multiple_files
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_configs_from_multiple_files(model_config_path="",
Function create_visualization_fn
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def create_visualization_fn(category_index,
include_masks=False,
include_keypoints=False,
include_keypoint_scores=False,
include_track_ids=False,
- 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
Avoid deeply nested control flow statements. Open
if not display_str:
display_str = '{}%'.format(round(100*scores[i]))
else:
display_str = '{}: {}%'.format(display_str, round(100*scores[i]))
if not skip_track_ids and track_ids is not None:
Function ravel_indices
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ravel_indices(feature_grid_y, feature_grid_x, num_levels, height, width,
Function _apply_multi_bbox_augmentation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _apply_multi_bbox_augmentation(image, bboxes, prob, aug_func,
Function filter_variables
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def filter_variables(variables, filter_regex_list, invert=False):
"""Filters out the variables matching the filter_regex.
Filter out the variables whose name matches the any of the regular
expressions in filter_regex_list and returns the remaining variables.
- 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 __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, min_level, max_level, anchor_scale, aspect_ratios,
Function build
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def build(hyperparams_config, is_training):
"""Builds tf-slim arg_scope for convolution ops based on the config.
Returns an arg_scope to use for convolution ops containing weights
initializer, weights regularizer, activation function, batch norm function
- 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_head
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _predict_head(self, head_name, head_obj, image_feature, box_tower_feature,
Function create_input_queue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_input_queue(batch_size_per_clone, create_tensor_dict_fn,
Function get_evaluators
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_evaluators(eval_config, categories):
"""Returns the evaluator class according to eval_config, valid for categories.
Args:
eval_config: evaluation configurations.
- 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
Avoid deeply nested control flow statements. Open
if kv.id in list_of_keypoint_ids:
raise ValueError('Duplicate keypoint ids are not allowed. '
'Found {} more than once'.format(kv.id))
keypoints[kv.label] = kv.id