Major changes: - New frontend (platform/web/): Vite + React 18 + TypeScript + Tailwind - 4-module navigation: 数据送标 / 模型管理 / 车队管理 / 系统管理 - Data catalog with charts (DMS/ADAS/Lane 3-tab view) - Quality review workflow (标注质检): Good/Fine/Bad scoring with auto-advance - Audit enhancements: batch operations, rejection categories, Feishu notifications - Operation audit log (操作日志) - World model simulation studio (仿真工坊) - Dataset version management with snapshots and diff - ADAS 7-class dataset integration (138K images organized + compressed) - User management with Feishu integration and pagination - CRUD/search/filter on all pages, card layout redesign - PIL-optimized image overlay rendering - Auto-snapshot on build, in_review workflow stage - Removed embedded algorithm code (now in workspace)
46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
from clrnet.utils import Registry, build_from_cfg
|
|
import torch.nn as nn
|
|
|
|
BACKBONES = Registry('backbones')
|
|
AGGREGATORS = Registry('aggregators')
|
|
HEADS = Registry('heads')
|
|
NECKS = Registry('necks')
|
|
NETS = Registry('nets')
|
|
|
|
|
|
def build(cfg, registry, default_args=None):
|
|
if isinstance(cfg, list):
|
|
modules = [
|
|
build_from_cfg(cfg_, registry, default_args) for cfg_ in cfg
|
|
]
|
|
return nn.Sequential(*modules)
|
|
else:
|
|
return build_from_cfg(cfg, registry, default_args)
|
|
|
|
|
|
def build_backbones(cfg):
|
|
return build(cfg.backbone, BACKBONES, default_args=dict(cfg=cfg))
|
|
|
|
|
|
def build_necks(cfg):
|
|
return build(cfg.necks, NECKS, default_args=dict(cfg=cfg))
|
|
|
|
|
|
def build_aggregator(cfg):
|
|
return build(cfg.aggregator, AGGREGATORS, default_args=dict(cfg=cfg))
|
|
|
|
|
|
def build_heads(cfg):
|
|
return build(cfg.heads, HEADS, default_args=dict(cfg=cfg))
|
|
|
|
|
|
def build_head(split_cfg, cfg):
|
|
return build(split_cfg, HEADS, default_args=dict(cfg=cfg))
|
|
|
|
|
|
def build_net(cfg):
|
|
return build(cfg.net, NETS, default_args=dict(cfg=cfg))
|
|
|
|
def build_necks(cfg):
|
|
return build(cfg.neck, NECKS, default_args=dict(cfg=cfg))
|