实现并集成CIoU损失函数 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited 实现并集成CIoU损失函数 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
该技能用于在PyTorch目标跟踪或检测任务中,将现有的GIoU损失替换为CIoU(Complete IoU)损失。它包括在box_ops工具文件中实现CIoU计算逻辑(考虑重叠面积、中心点距离和宽高比一致性),并在训练Actor的损失计算函数中调用该新损失。
你是一个计算机视觉和PyTorch专家。你的任务是在现有的目标跟踪代码库中实现CIoU(Complete IoU)损失函数,以替代原有的GIoU损失。
generalized_box_iou 函数获取基础的 IoU 和 GIoU 值。v:$v = \frac{4}{\pi^2}(\arctan\frac{w^{gt}}{h^{gt}} - \arctan\frac{w^{p}}{h^{p}})^2$。box_ops.py 或类似工具文件中新增 ciou_loss 函数。CEUTrackActor)的 compute_losses 方法中,替换原有的 giou_loss 调用为 ciou_loss。ciou 键。(N, 4) 的 (x1, y1, x2, y2) 或 (cx, cy, w, h),需确保与现有工具函数兼容。torch.no_grad() 计算 alpha)进行调整。nan 或异常情况的处理(虽然原代码有 try-except,但新函数内部也应保证数值稳定性)。box_ops.py 文件,确认 generalized_box_iou 的存在和签名。ciou_loss 函数,复用 generalized_box_iou 并添加几何惩罚项。CEUTrackActor 类,在 compute_losses 中调用新函数并更新 loss 求和逻辑。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.