update batch loader

This commit is contained in:
2025-09-04 12:11:50 +00:00
parent 44febd7d2e
commit 116ab04283
8 changed files with 3949 additions and 5 deletions

30
main.py
View File

@@ -32,6 +32,9 @@ Examples:
# Run analysis and save to custom output directory
python main.py --output-dir custom_results
# Run with memory-efficient batch processing
python main.py --deqa-only --batch-size 4 --max-image-size 512 512
"""
)
@@ -101,6 +104,28 @@ Examples:
action='store_true',
help='Use only DeQA metric (disable traditional metrics)'
)
parser.add_argument(
'--batch-size',
type=int,
default=8,
help='Batch size for memory-efficient processing (default: 8)'
)
parser.add_argument(
'--max-image-size',
type=int,
nargs=2,
default=[1024, 1024],
metavar=('WIDTH', 'HEIGHT'),
help='Maximum image dimensions for preprocessing (default: 1024 1024)'
)
parser.add_argument(
'--disable-memory-monitoring',
action='store_true',
help='Disable memory usage monitoring'
)
args = parser.parse_args()
@@ -150,7 +175,10 @@ Examples:
enable_deqa=enable_deqa,
enable_traditional=enable_traditional,
enable_pyiqa=enable_pyiqa_flag,
pyiqa_selected_metrics=(selected_top20 if args.pyiqa_top20 else None)
pyiqa_selected_metrics=(selected_top20 if args.pyiqa_top20 else None),
batch_size=args.batch_size,
max_image_size=tuple(args.max_image_size),
enable_memory_monitoring=not args.disable_memory_monitoring
)
results, report = analyzer.run_analysis()