image cleaner

This commit is contained in:
Simon Martens
2025-09-15 18:32:13 +02:00
parent bcf11e4e11
commit 9960dc5e38
11 changed files with 1247 additions and 0 deletions

42
scripts/ex/run.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
# Convenience script to run the image cleaning pipeline with virtual environment
# Activate virtual environment
source venv/bin/activate
# Check if any arguments provided
if [ $# -eq 0 ]; then
echo "Historical Newspaper Image Cleaning Pipeline"
echo "Usage examples:"
echo " $0 demo # Run demo"
echo " $0 clean image.jpg # Clean single image"
echo " $0 batch # Process all images in directory"
echo " $0 tune image.jpg # Interactive parameter tuning"
echo " $0 python script.py [args] # Run custom Python script"
exit 1
fi
case "$1" in
"demo")
python demo.py
;;
"clean")
shift
python image_cleaner.py "$@"
;;
"batch")
shift
python batch_process.py "$@"
;;
"tune")
shift
python config_tuner.py "$@"
;;
"python")
shift
python "$@"
;;
*)
python "$@"
;;
esac