@@ -359,7 +359,7 @@ def createOCRDatasets(self, label_txt_path):
359359 all_image_height = all_image_height + txt_img .shape [0 ]
360360 all_image_count = all_image_count + 1
361361 with open (os .path .join (save_h_detail_path , "rec_gt_test.txt" ), "ab" ) as f :
362- content = "test/" + image_name + "\t " + txt
362+ content = "test/" + image_name + "\t " + txt
363363 f .write ((content + "\n " ).encode ("utf-8" ))
364364 else :
365365 txt_img = (txt_img * 255 ).astype ("uint8" )
@@ -370,7 +370,7 @@ def createOCRDatasets(self, label_txt_path):
370370 all_image_height = all_image_height + txt_img .shape [0 ]
371371 all_image_count = all_image_count + 1
372372 with open (os .path .join (save_v_detail_path , "rec_gt_test.txt" ), "ab" ) as f :
373- content = "test/" + image_name + "\t " + txt
373+ content = "test/" + image_name + "\t " + txt
374374 f .write ((content + "\n " ).encode ("utf-8" ))
375375 else :
376376 if h < w :
@@ -380,7 +380,7 @@ def createOCRDatasets(self, label_txt_path):
380380 all_image_height = all_image_height + txt_img .shape [0 ]
381381 all_image_count = all_image_count + 1
382382 with open (os .path .join (save_h_detail_path , "rec_gt_train.txt" ), "ab" ) as f :
383- content = "train/" + image_name + "\t " + txt
383+ content = "train/" + image_name + "\t " + txt
384384 f .write ((content + "\n " ).encode ("utf-8" ))
385385 else :
386386 txt_img = (txt_img * 255 ).astype ("uint8" )
@@ -391,7 +391,7 @@ def createOCRDatasets(self, label_txt_path):
391391 cv2 .imencode ('.jpg' , txt_img )[1 ].tofile (
392392 os .path .join (save_v_detail_train_path , image_name ))
393393 with open (os .path .join (save_v_detail_path , "rec_gt_train.txt" ), "ab" ) as f :
394- content = "train/" + image_name + "\t " + txt
394+ content = "train/" + image_name + "\t " + txt
395395 f .write ((content + "\n " ).encode ("utf-8" ))
396396 else :
397397 if txt_orignal != "difficult" :
0 commit comments