Bro please

This commit is contained in:
2025-12-31 14:22:00 +01:00
parent 2286108be1
commit 13ec518d2a
3 changed files with 2 additions and 4 deletions

View File

@@ -58,7 +58,7 @@ class DetectionService:
board = self.pieces_manager.pieces_to_board(detections, warped_corners, matrix, self.scale_size)
return pieces_prediction[0].plot().tobytes(), self.pieces_manager.board_to_fen(board)
return cv2.imencode(".jpg", pieces_prediction[0].plot())[1].tobytes(), self.pieces_manager.board_to_fen(board)
def __run_complete_detection(self, frame : np.ndarray, display=False) -> dict[str, list[Results]] :
pieces_prediction = self.__run_pieces_detection(frame)