diff --git a/utils/loggers/__init__.py b/utils/loggers/__init__.py index 006125edbcd9..59d4b566836a 100644 --- a/utils/loggers/__init__.py +++ b/utils/loggers/__init__.py @@ -252,7 +252,7 @@ def __init__(self, opt, console_logger, include=('tb', 'wandb')): self.tb = SummaryWriter(str(self.save_dir)) if wandb and 'wandb' in self.include: - self.wandb = wandb.init(project="YOLOv5-Classifier" if opt.project == "runs/train" else opt.project, + self.wandb = wandb.init(project=web_project_name(str(opt.project)), name=None if opt.name == "exp" else opt.name, config=opt) else: @@ -303,3 +303,11 @@ def log_tensorboard_graph(tb, model, imgsz=(640, 640)): tb.add_graph(torch.jit.trace(de_parallel(model), im, strict=False), []) except Exception as e: print(f'WARNING: TensorBoard graph visualization failure {e}') + + +def web_project_name(project): + # Convert local project name to web project name + if not project.startswith('runs/train'): + return project + suffix = '-Classify' if project.endswith('-cls') else '-Segment' if project.endswith('-seg') else '' + return f'YOLOv5{suffix}'