cross_run_sobel.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. metric="sobel_based_filter"
  2. scenes="A,B,D,G,H,I"
  3. all_scenes="A,B,C,D,E,F,G,H,I"
  4. # file which contains model names we want to use for simulation
  5. file_path="results/models_comparisons.csv"
  6. stride=1
  7. window=3
  8. for pixel in {30,40,50,60,70,80}; do
  9. echo python generate/generate_reconstructed_data.py --features ${metric} --params ${window},${pixel} --size 100,100 --scenes ${all_scenes} --replace 0
  10. done
  11. for scene in {"A","B","D","G","H","I"}; do
  12. # remove current scene test from dataset
  13. s="${scenes//,${scene}}"
  14. s="${s//${scene},}"
  15. for zone in {10,11,12}; do
  16. for pixel in {30,40,50,60,70,80}; do
  17. for balancing in {0,1}; do
  18. OUTPUT_DATA_FILE="${metric}_nb_zones_${zone}_K${window}_P${pixel}_balancing${balancing}_without_${scene}"
  19. OUTPUT_DATA_FILE_TEST="${metric}_nb_zones_${zone}_K${window}_P${pixel}_balancing${balancing}_scene_${scene}"
  20. if grep -q "${OUTPUT_DATA_FILE}" "${file_path}"; then
  21. echo "SVD model ${OUTPUT_DATA_FILE} already generated"
  22. else
  23. #echo "Run computation for SVD model ${OUTPUT_DATA_FILE}"
  24. echo python generate/generate_dataset.py --output data/${OUTPUT_DATA_FILE_TEST} --features ${metric} --scenes ${scene} --params ${window},${pixel} --nb_zones ${zone} --random 1 --size 100,100
  25. echo python generate/generate_dataset.py --output data/${OUTPUT_DATA_FILE} --features ${metric} --scenes ${s} --params ${window},${pixel} --nb_zones ${zone} --random 1 --size 100,100
  26. echo python train_model.py --data data/${OUTPUT_DATA_FILE} --output ${OUTPUT_DATA_FILE} --balancing ${balancing}
  27. echo python prediction_model.py --data data/${OUTPUT_DATA_FILE_TEST}.train --model saved_models/${OUTPUT_DATA_FILE}.json
  28. fi
  29. done
  30. done
  31. done
  32. done