diff --git a/models/yolo.py b/models/yolo.py index d89c5da018de..fa898788f67d 100644 --- a/models/yolo.py +++ b/models/yolo.py @@ -26,41 +26,15 @@ ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative from models.common import ( - C3, - C3SPP, - C3TR, - SPP, - SPPF, - Bottleneck, - BottleneckCSP, - C3Ghost, - C3x, - Classify, - Concat, - Contract, - Conv, - CrossConv, - DetectMultiBackend, - DWConv, - DWConvTranspose2d, - Expand, - Focus, - GhostBottleneck, - GhostConv, - Proto, + C3, C3SPP, C3TR, SPP, SPPF, Bottleneck, BottleneckCSP, C3Ghost, C3x, Classify, Concat, Contract, Conv, + CrossConv, DetectMultiBackend, DWConv, DWConvTranspose2d, Expand, Focus, GhostBottleneck, GhostConv, Proto, ) from models.experimental import MixConv2d from utils.autoanchor import check_anchor_order from utils.general import LOGGER, check_version, check_yaml, colorstr, make_divisible, print_args from utils.plots import feature_visualization from utils.torch_utils import ( - fuse_conv_and_bn, - initialize_weights, - model_info, - profile, - scale_img, - select_device, - time_sync, + fuse_conv_and_bn, initialize_weights, model_info, profile, scale_img, select_device, time_sync, ) try: @@ -341,7 +315,7 @@ def __init__(self, cfg="yolov5s-seg.yaml", ch=3, nc=None, anchors=None): class ClassificationModel(BaseModel): # YOLOv5 classification model def __init__(self, cfg=None, model=None, nc=1000, cutoff=10): - """Initializes YOLOv5 model with config file `cfg`, input channels `ch`, number of classes `nc`, and `cuttoff` + """Initializes YOLOv5 model with config file `cfg`, input channels `ch`, number of classes `nc`, and `cutoff` index. """ super().__init__()