first commit

This commit is contained in:
2026-04-03 07:30:54 +03:00
commit 1a083e043e
1138 changed files with 1705 additions and 0 deletions

15
debug_boxes.py Normal file
View File

@@ -0,0 +1,15 @@
"""Debug: save each detected box ROI as separate image."""
import cv2
import numpy as np
import os
from test_detect import find_boxes
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
image = cv2.imread(os.path.join(BASE_DIR, "test.png"))
boxes = find_boxes(image)
for i, box in enumerate(boxes):
roi = box["roi"]
path = os.path.join(BASE_DIR, f"debug_box_{i}.png")
cv2.imwrite(path, roi)
print(f"Box {i}: bbox={box['bbox']}, area={box['area']}, saved to {path}")