Download scripts/run_full_data.sh from zhiqing0205/LogSAD: direct link, hf CLI and curl.
- Browser
- Download file 2.3 kB
-
https://huggingface.co/zhiqing0205/LogSAD/resolve/main/scripts/run_full_data.sh
- Command line
-
hf download hf://zhiqing0205/LogSAD/scripts/run_full_data.sh
-
curl -L -o run_full_data.sh https://huggingface.co/zhiqing0205/LogSAD/resolve/main/scripts/run_full_data.sh
2.3 kB
| # Full-data Protocol Evaluation Script for LogSAD | |
| # This script first computes coreset and then runs evaluation for all categories in the MVTEC LOCO dataset | |
| # Dataset path | |
| DATASET_PATH="/root/autodl-tmp/datasets/mvtec_loco_anomaly_detection" | |
| # Categories to evaluate | |
| # CATEGORIES=("breakfast_box" "juice_bottle" "pushpins" "screw_bag" "splicing_connectors") | |
| CATEGORIES=("splicing_connectors") | |
| echo "Starting Full-data Protocol Evaluation..." | |
| echo "Dataset path: $DATASET_PATH" | |
| echo "Categories: ${CATEGORIES[@]}" | |
| echo "==================================" | |
| # Main loop to iterate through all categories | |
| for i in "${!CATEGORIES[@]}"; do | |
| category="${CATEGORIES[$i]}" | |
| current=$((i + 1)) | |
| total=${#CATEGORIES[@]} | |
| echo "[$current/$total] Processing category: $category" | |
| # Step 1: Compute coreset for full-data scenarios | |
| echo "Step 1: Computing coreset for $category" | |
| echo "Command: python compute_coreset.py --module_path model_ensemble --category $category --dataset_path $DATASET_PATH" | |
| python compute_coreset.py --module_path model_ensemble --category "$category" --dataset_path "$DATASET_PATH" | |
| if [ $? -eq 0 ]; then | |
| echo "✓ Successfully computed coreset for $category" | |
| else | |
| echo "✗ Failed to compute coreset for $category" | |
| exit 1 | |
| fi | |
| # Step 2: Run evaluation for full-data protocol | |
| echo "Step 2: Running evaluation for $category" | |
| echo "Command: python evaluation.py --module_path model_ensemble --category $category --dataset_path $DATASET_PATH --viz" | |
| python evaluation.py --module_path model_ensemble --category "$category" --dataset_path "$DATASET_PATH" --viz | |
| if [ $? -eq 0 ]; then | |
| echo "✓ Successfully completed evaluation for $category" | |
| else | |
| echo "✗ Failed to evaluate $category" | |
| exit 1 | |
| fi | |
| echo "==================================" | |
| done | |
| echo "All categories processing completed!" | |
| echo "" | |
| echo "Results saved in results/ directory:" | |
| echo " - Combined results: results/full_data_results.md" | |
| echo "==================================" | |
| echo "Computing average metrics across all categories..." | |
| # Run the average computation script | |
| python scripts/compute_averages.py | |
| echo "✓ Average metrics computation completed" |