Add TensorBoard graph for model visualization (#4464)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-08-21 01:22:29 +02:00 committed by GitHub
parent 87ce15d383
commit 3acead7e79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 36 deletions

View file

@ -56,14 +56,3 @@ class SegmentationTrainer(yolo.detect.DetectionTrainer):
def plot_metrics(self):
"""Plots training/val metrics."""
plot_results(file=self.csv, segment=True, on_plot=self.on_plot) # save results.png
def train(cfg=DEFAULT_CFG):
"""Train a YOLO segmentation model based on passed arguments."""
args = dict(model=cfg.model or 'yolov8n-seg.pt', data=cfg.data or 'coco8-seg.yaml')
trainer = SegmentationTrainer(overrides=args)
trainer.train()
if __name__ == '__main__':
train()