Преглед на файлове

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

zhch158_admin преди 1 месец
родител
ревизия
458dd422fb
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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,