__init__.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. """
  2. 工具模块包
  3. 包含CUDA环境检测、文件处理等实用工具函数
  4. """
  5. from .check_cuda_env import (
  6. check_nvidia_environment,
  7. )
  8. from .cuda_utils import (
  9. monitor_gpu_memory,
  10. detect_available_gpus
  11. )
  12. from .file_utils import (
  13. get_image_files_from_dir,
  14. get_image_files_from_list,
  15. get_image_files_from_csv,
  16. split_files,
  17. create_temp_file_list,
  18. collect_pid_files,
  19. )
  20. from .doc_utils import (
  21. load_images_from_pdf,
  22. fitz_doc_to_image,
  23. )
  24. from .normalize_financial_numbers import (
  25. normalize_financial_numbers,
  26. normalize_markdown_table,
  27. normalize_json_table,
  28. )
  29. __all__ = [
  30. # CUDA环境检测
  31. 'check_nvidia_environment',
  32. # CUDA工具
  33. 'monitor_gpu_memory',
  34. 'detect_available_gpus',
  35. # 文件工具
  36. 'get_image_files_from_dir',
  37. 'get_image_files_from_list',
  38. 'get_image_files_from_csv',
  39. 'split_files',
  40. 'create_temp_file_list',
  41. 'collect_pid_files',
  42. # 金融数字标准化
  43. 'normalize_financial_numbers',
  44. 'normalize_markdown_table',
  45. 'normalize_json_table',
  46. ]
  47. __version__ = "1.0.0"
  48. __author__ = "zhch158"
  49. __description__ = "PaddleX工具模块包,提供CUDA环境检测和文件处理功能"