diff --git a/rpi/services/detection_service.py b/rpi/services/detection_service.py index efd27e94..d1374206 100644 --- a/rpi/services/detection_service.py +++ b/rpi/services/detection_service.py @@ -62,10 +62,13 @@ class DetectionService: edges_prediction = result["edges"] pieces_prediction = result["pieces"] - warped_corners, matrix = self.board_manager.process_frame(edges_prediction[0], frame, self.scale_size) - if matrix is None: + processed_frame = self.board_manager.process_frame(edges_prediction[0], frame, self.scale_size) + if processed_frame is None: return None + warped_corners = processed_frame[0] + matrix = processed_frame[1] + detections = self.pieces_manager.extract_pieces(pieces_prediction) board = self.pieces_manager.pieces_to_board(detections, warped_corners, matrix, self.scale_size)