Ver código fonte

feat: 优化输入文件列表返回,确保唯一性并排序

zhch158_admin 1 mês atrás
pai
commit
458dd422fb
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      zhch/ppstructurev3_utils.py

+ 1 - 1
zhch/ppstructurev3_utils.py

@@ -127,7 +127,7 @@ def get_input_files(args) -> List[str]:
     print(f"  Image files found: {image_count}")
     print(f"  Total image files to process: {len(input_files)}")
     
-    return input_files
+    return sorted(list(set(str(f) for f in input_files)))
 
 def convert_pruned_result_to_json(pruned_result: Dict[str, Any], 
                               input_image_path: str,