yzweak commited on
Commit
7feb768
·
1 Parent(s): a5c4791

Optimize YOLO processing by reducing image size

Browse files
pragent/backend/figure_table_pipeline.py CHANGED
@@ -48,7 +48,7 @@ def run_figure_extraction(pdf_path: str, base_work_dir: str) -> str:
48
  for path in page_image_paths:
49
  page_num_str = Path(path).stem
50
  page_crop_dir = os.path.join(cropped_results_dir, page_num_str)
51
- extract_and_save_layout_components(image_path=path, model_path=model_path, save_base_dir=page_crop_dir)
52
  tqdm.write(f"[*] 所有裁剪结果已保存至: {cropped_results_dir}")
53
 
54
  tqdm.write(f"\n--- 步骤 3/3: 对裁剪出的组件进行配对 ---")
 
48
  for path in page_image_paths:
49
  page_num_str = Path(path).stem
50
  page_crop_dir = os.path.join(cropped_results_dir, page_num_str)
51
+ extract_and_save_layout_components(image_path=path, model_path=model_path, save_base_dir=page_crop_dir, imgsz=640)
52
  tqdm.write(f"[*] 所有裁剪结果已保存至: {cropped_results_dir}")
53
 
54
  tqdm.write(f"\n--- 步骤 3/3: 对裁剪出的组件进行配对 ---")