|
|
@@ -109,7 +109,7 @@ def process_images_single_process(image_paths: List[str],
|
|
|
|
|
|
# 记录处理结果
|
|
|
batch_results.append({
|
|
|
- "image_path": input_path.name,
|
|
|
+ "image_path": str(input_path),
|
|
|
"processing_time": batch_processing_time / len(batch), # 平均时间
|
|
|
"success": True,
|
|
|
"device": device,
|
|
|
@@ -121,7 +121,7 @@ def process_images_single_process(image_paths: List[str],
|
|
|
print(f"Error saving result for {result.get('input_path', 'unknown')}: {e}", file=sys.stderr)
|
|
|
traceback.print_exc()
|
|
|
batch_results.append({
|
|
|
- "image_path": Path(result["input_path"]).name,
|
|
|
+ "image_path": str(input_path),
|
|
|
"processing_time": 0,
|
|
|
"success": False,
|
|
|
"device": device,
|
|
|
@@ -151,7 +151,7 @@ def process_images_single_process(image_paths: List[str],
|
|
|
error_results = []
|
|
|
for img_path in batch:
|
|
|
error_results.append({
|
|
|
- "image_path": Path(img_path).name,
|
|
|
+ "image_path": str(img_path),
|
|
|
"processing_time": 0,
|
|
|
"success": False,
|
|
|
"device": device,
|
|
|
@@ -320,6 +320,6 @@ if __name__ == "__main__":
|
|
|
sys.argv.extend([f"--{key}", str(value)])
|
|
|
|
|
|
# 测试模式
|
|
|
- sys.argv.append("--test_mode")
|
|
|
+ # sys.argv.append("--test_mode")
|
|
|
|
|
|
sys.exit(main())
|