PyCharm Code Inspect fixes (#18392)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
d35860d4a1
commit
e5e91967d9
31 changed files with 72 additions and 72 deletions
|
|
@ -440,7 +440,8 @@ class ProfileModels:
|
|||
print(f"Profiling: {sorted(files)}")
|
||||
return [Path(file) for file in sorted(files)]
|
||||
|
||||
def get_onnx_model_info(self, onnx_file: str):
|
||||
@staticmethod
|
||||
def get_onnx_model_info(onnx_file: str):
|
||||
"""Extracts metadata from an ONNX model file including parameters, GFLOPs, and input shape."""
|
||||
return 0.0, 0.0, 0.0, 0.0 # return (num_layers, num_params, num_gradients, num_flops)
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ def unzip_file(file, path=None, exclude=(".DS_Store", "__MACOSX"), exist_ok=Fals
|
|||
If a path is not provided, the function will use the parent directory of the zipfile as the default path.
|
||||
|
||||
Args:
|
||||
file (str): The path to the zipfile to be extracted.
|
||||
file (str | Path): The path to the zipfile to be extracted.
|
||||
path (str, optional): The path to extract the zipfile to. Defaults to None.
|
||||
exclude (tuple, optional): A tuple of filename strings to be excluded. Defaults to ('.DS_Store', '__MACOSX').
|
||||
exist_ok (bool, optional): Whether to overwrite existing contents if they exist. Defaults to False.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ to_4tuple = _ntuple(4)
|
|||
# `ltwh` means left top and width, height(COCO format)
|
||||
_formats = ["xyxy", "xywh", "ltwh"]
|
||||
|
||||
__all__ = ("Bboxes",) # tuple or list
|
||||
__all__ = ("Bboxes", "Instances") # tuple or list
|
||||
|
||||
|
||||
class Bboxes:
|
||||
|
|
|
|||
|
|
@ -545,7 +545,8 @@ class Annotator:
|
|||
"""Save the annotated image to 'filename'."""
|
||||
cv2.imwrite(filename, np.asarray(self.im))
|
||||
|
||||
def get_bbox_dimension(self, bbox=None):
|
||||
@staticmethod
|
||||
def get_bbox_dimension(bbox=None):
|
||||
"""
|
||||
Calculate the area of a bounding box.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue