Skip to content
Snippets Groups Projects
Commit d202ed1b authored by Martin's avatar Martin
Browse files

fix line_id bug

parent 6aee925c
No related branches found
No related tags found
No related merge requests found
......@@ -94,10 +94,10 @@ class KaldiDataGenerator:
for i, [x, y, w, h] in enumerate(line_bounding_rects):
cropped = img[y:y + h, x:x + w].copy()
cv2.imwrite(f'{self.out_line_img_dir}_{i}.jpg', cropped)
cv2.imwrite(f'{self.out_line_img_dir}/{page_id}_{i}.jpg', cropped)
for i, text in enumerate(line_transcriptions):
write_file(f"{self.out_line_text_dir}_{i}.txt", text)
write_file(f"{self.out_line_text_dir}/{page_id}_{i}.txt", text)
def run_pages(self, page_ids):
for page_id in page_ids:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment