将检测任务迁移python

This commit is contained in:
2025-09-30 14:23:33 +08:00
parent 3fe5f8083d
commit 39d39a7a24
69 changed files with 7921 additions and 1836 deletions

View File

@@ -11,11 +11,11 @@ public final class Overlay {
public static void draw(List<Detection> dets, Mat frame) {
for (Detection d : dets) {
Rect r = d.box();
int bgr = d.colorBGR();
Rect r = d.getRect();
int bgr = d.getColorBGR();
Scalar c = new Scalar(bgr & 0xFF, (bgr >> 8) & 0xFF, (bgr >> 16) & 0xFF, 0);
rectangle(frame, r, c, 2, LINE_8, 0);
String label = d.cls()+" "+String.format("%.2f", d.conf());
String label = d.getLabel()+" "+String.format("%.2f", d.getConfidence());
int[] baseline = new int[1];
Size t = getTextSize(label, FONT_HERSHEY_SIMPLEX, 0.5, 1, baseline);
int x = Math.max(0, r.x());