Skip to content

Commit 09dbaf5

Browse files
committed
refactor: remove unused parameters from calc_word_boxes
1 parent 32c705b commit 09dbaf5

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

python/rapidocr/main.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def build_final_output(
209209
and all(rec_res.word_results)
210210
):
211211
rec_res.word_results = self.calc_word_boxes(
212-
cropped_img_list, det_res.boxes, rec_res, op_record, ori_h, ori_w
212+
cropped_img_list, det_res.boxes, rec_res
213213
)
214214

215215
ocr_res = RapidOCROutput(
@@ -230,13 +230,7 @@ def build_final_output(
230230
return ocr_res if len(ocr_res) > 0 else RapidOCROutput()
231231

232232
def calc_word_boxes(
233-
self,
234-
img: List[np.ndarray],
235-
dt_boxes: np.ndarray,
236-
rec_res: TextRecOutput,
237-
op_record: Dict[str, Any],
238-
raw_h: int,
239-
raw_w: int,
233+
self, img: List[np.ndarray], dt_boxes: np.ndarray, rec_res: TextRecOutput
240234
) -> Any:
241235
rec_res = self.cal_rec_boxes(
242236
img, dt_boxes, rec_res, self.return_single_char_box

0 commit comments

Comments
 (0)