nyonyong commited on
Commit
e0be3d4
1 Parent(s): be75e89

Directory fix

Browse files
Files changed (2) hide show
  1. TextRearrange/DBSCAN.py +1 -1
  2. process.py +1 -1
TextRearrange/DBSCAN.py CHANGED
@@ -60,7 +60,7 @@ import directories as Dir
60
  # Get cropped word images
61
  # folder_path = "C:/Users/ban/TEXTAI/yolov5/runs/detect/yujin_paper/crops/word" -> cropped word folder
62
 
63
- x_texts, y_texts, name_jpg = DbscanArrange.get_folder_contents_with_text("/home/user/app"+Dir.folder_path)
64
  file_name = pd.DataFrame(name_jpg)
65
  file_name.columns=['file_name']
66
 
 
60
  # Get cropped word images
61
  # folder_path = "C:/Users/ban/TEXTAI/yolov5/runs/detect/yujin_paper/crops/word" -> cropped word folder
62
 
63
+ x_texts, y_texts, name_jpg = DbscanArrange.get_folder_contents_with_text("/home/user/app"+Dir.yolo_dir+Dir.folder_path)
64
  file_name = pd.DataFrame(name_jpg)
65
  file_name.columns=['file_name']
66
 
process.py CHANGED
@@ -61,7 +61,7 @@ def textRecognition():
61
  #%cd /content/drive/MyDrive/KITA/Text/lmdb/deep-text-recognition-benchmark
62
  ## subprocess.call('cd '+Dir.recog_dir, shell=True)
63
  #!CUDA_VISIBLE_DEVICES=0 python3 demo.py --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn --image_folder /content/drive/MyDrive/KITA/Text/YOLO/runs/detect/youtube_data2/crops/word --saved_model /content/drive/MyDrive/KITA/Text/best_accuracy_s/best_accuracy_s.pth
64
- subprocess.call('CUDA_VISIBLE_DEVICES="" python3 '+ "/home/user/app"+ Dir.recog_dir +'/demo.py --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn --image_folder /home/user/app' + Dir.yolo_dir + Dir.cropped_img_path + '/crops/word --saved_model '+ Dir.recog_model_dir, shell=True)
65
 
66
  def getHcrResult(file_path):#*#
67
  texts = ""
 
61
  #%cd /content/drive/MyDrive/KITA/Text/lmdb/deep-text-recognition-benchmark
62
  ## subprocess.call('cd '+Dir.recog_dir, shell=True)
63
  #!CUDA_VISIBLE_DEVICES=0 python3 demo.py --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn --image_folder /content/drive/MyDrive/KITA/Text/YOLO/runs/detect/youtube_data2/crops/word --saved_model /content/drive/MyDrive/KITA/Text/best_accuracy_s/best_accuracy_s.pth
64
+ subprocess.call('CUDA_VISIBLE_DEVICES="" python3 '+ "/home/user/app"+ Dir.recog_dir +'/demo.py --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn --image_folder /home/user/app' + Dir.yolo_dir + Dir.cropped_img_path + '/crops/word --saved_model /home/user/app'+Dir.recog_model_dir, shell=True)
65
 
66
  def getHcrResult(file_path):#*#
67
  texts = ""