Skip to content

Commit

Permalink
Remove Hindi links
Browse files Browse the repository at this point in the history
  • Loading branch information
UltralyticsAssistant committed Aug 24, 2024
1 parent a9af0e2 commit 3cd401f
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions segment/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,7 @@


def train(hyp, opt, device, callbacks):
"""
Trains the YOLOv5 model on a dataset, managing hyperparameters, model optimization, logging, and validation.
`hyp` is path/to/hyp.yaml or hyp dictionary.
"""
"""Trains a YOLOv5 segmentation model on a dataset, handling hyperparameters, optimization, and validation."""
(
save_dir,
epochs,
Expand Down Expand Up @@ -541,11 +537,7 @@ def lf(x):


def parse_opt(known=False):
"""
Parses command line arguments for training configurations, returning parsed arguments.
Supports both known and unknown args.
"""
"""Parses command line arguments for YOLOv5 training configurations, supporting both known and unknown arguments."""
parser = argparse.ArgumentParser()
parser.add_argument("--weights", type=str, default=ROOT / "yolov5s-seg.pt", help="initial weights path")
parser.add_argument("--cfg", type=str, default="", help="model.yaml path")
Expand Down Expand Up @@ -748,9 +740,18 @@ def main(opt, callbacks=Callbacks()):

def run(**kwargs):
"""
Executes YOLOv5 training with given parameters, altering options programmatically; returns updated options.
Example: import train; train.run(data='coco128.yaml', imgsz=320, weights='yolov5m.pt')
Executes YOLOv5 training with given parameters, altering options programmatically.
Args:
**kwargs (Any): Keyword arguments to override default training options.
Returns:
(argparse.Namespace): Updated options after parsing and applying keyword arguments.
Examples:
Run YOLOv5 training with custom data and image size
>>> import train
>>> train.run(data='coco128.yaml', imgsz=320, weights='yolov5m.pt')
"""
opt = parse_opt(True)
for k, v in kwargs.items():
Expand Down

0 comments on commit 3cd401f

Please sign in to comment.