official/vision/ops/augment.py
File augment.py
has 2280 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,
Function build_for_detection
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_for_detection(cls,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,
Function _apply_bbox_augmentation_wrapper
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _apply_bbox_augmentation_wrapper(image, bbox, new_bboxes, prob,
Function _apply_transform_to_images
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _apply_transform_to_images(
Function _parse_policy_info
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _parse_policy_info(name: str,
Function _fill_rectangle_video
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _fill_rectangle_video(image,
Function _fill_rectangle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _fill_rectangle(image,
Function _apply_multi_bbox_augmentation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _apply_multi_bbox_augmentation(image, bboxes, prob, aug_func,
Function gaussian_filter2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def gaussian_filter2d(
Function _apply_multi_bbox_augmentation_wrapper
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _apply_multi_bbox_augmentation_wrapper(image, bboxes, prob, aug_func,
Function transform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def transform(
Function _check_bbox_area
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _check_bbox_area(min_y, min_x, max_y, max_x, delta=0.05):
Function translate_bbox
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def translate_bbox(image, bboxes, pixels, replace, shift_horizontal):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,
Function _shear_bbox
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _shear_bbox(bbox, image_height, image_width, level, shear_horizontal):
Function translate_y_only_bboxes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def translate_y_only_bboxes(
Function shear_with_bboxes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def shear_with_bboxes(image, bboxes, level, replace, shear_horizontal):
Function _shift_bbox
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _shift_bbox(bbox, image_height, image_width, pixels, shift_horizontal):
Function translate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def translate(
Function _apply_func_with_prob
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _apply_func_with_prob(func: Any, image: tf.Tensor,