mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-30 01:25:30 +00:00
image cleaner
This commit is contained in:
42
scripts/ex/run.sh
Executable file
42
scripts/ex/run.sh
Executable 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
|
||||
Reference in New Issue
Block a user