feat: 合并 Docker Compose、标注表格优化与部署文档
将 platform + CVAT 合并为单文件 docker-compose.yml,完善 .env 与 init/dev_up 脚本; 新增 docs/DEPLOY.md 与更新 README 以支持新机器部署;含数据湖示例、车队地图、 紧凑表格 UI、ADAS det_7cls 路径与批次台账等近期改动。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -693,7 +693,8 @@ def api_scan_inbox(
|
||||
project: str = Query("dms"),
|
||||
) -> dict[str, Any]:
|
||||
"""扫描 inbox 目录,返回未登记的新批次。"""
|
||||
from as_platform.data.core import get_pending_report, load_wf, proj_root
|
||||
from as_platform.data.core import load_wf, proj_root
|
||||
from as_platform.labeling.batch_index import index_is_empty, rebuild_batch_index
|
||||
|
||||
wf = load_wf()
|
||||
root = proj_root(wf, project)
|
||||
@@ -701,8 +702,20 @@ def api_scan_inbox(
|
||||
if not inbox.is_dir():
|
||||
return {"project": project, "items": [], "inbox_path": str(inbox)}
|
||||
|
||||
report = get_pending_report()
|
||||
registered = {b.get("batch", "") for b in report.get("batches", [])}
|
||||
if index_is_empty():
|
||||
rebuild_batch_index(wf)
|
||||
|
||||
from as_platform.db.engine import session_scope
|
||||
from as_platform.db.models import BatchIndex
|
||||
|
||||
with session_scope() as db:
|
||||
registered = {
|
||||
(r.task or "", r.batch)
|
||||
for r in db.query(BatchIndex).filter(
|
||||
BatchIndex.project == project,
|
||||
BatchIndex.archived.is_(False),
|
||||
).all()
|
||||
}
|
||||
|
||||
items: list[dict[str, Any]] = []
|
||||
for task_dir in sorted(inbox.iterdir()):
|
||||
@@ -713,7 +726,7 @@ def api_scan_inbox(
|
||||
continue
|
||||
batch_name = batch_dir.name
|
||||
task_name = task_dir.name
|
||||
if batch_name in registered:
|
||||
if (task_name, batch_name) in registered:
|
||||
continue # 已登记
|
||||
|
||||
# Count images (含 images/ 子目录)
|
||||
|
||||
Reference in New Issue
Block a user