Add conversion to FEN

This commit is contained in:
2025-12-22 16:30:07 +01:00
parent 86dea774e4
commit 0aaea36586
12 changed files with 246 additions and 105 deletions

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env python3
import cv2
import numpy as np
from ultralytics import YOLO
from paths import *
def main():
model = YOLO(model_path)
# Load image
image = cv2.imread(img_path)
if image is None:
print(f"Failed to read {img_path}")
return
height, width = image.shape[:2]
warped = image # For now assume top-down view
# Run YOLO detection
results = model(warped)
res = results[0]
debug_img = res.plot() # draws boxes around detected objects
cv2.imshow("Detections", debug_img)
cv2.waitKey(0)
cv2.destroyAllWindows()
if __name__ == "__main__":
main()