cross_run_nl_mean.sh 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. metric="nl_mean_noise_mask"
  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=6
  8. # for kernel in {3,5,7}; do
  9. # echo python generate/generate_reconstructed_data.py --features ${metric} --params ${kernel},${dist_patch} --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 kernel in {3,5,7}; do
  17. # for balancing in {0,1}; do
  18. # OUTPUT_DATA_FILE="${metric}_nb_zones_${zone}_W${window}_K${kernel}_balancing${balancing}_without_${scene}"
  19. # OUTPUT_DATA_FILE_TEST="${metric}_nb_zones_${zone}_W${window}_K${kernel}_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 ${kernel},${dist_patch} --nb_zones ${zone} --random 1 --size 200,200
  25. # echo python generate/generate_dataset.py --output data/${OUTPUT_DATA_FILE} --features ${metric} --scenes ${s} --params ${kernel},${dist_patch} --nb_zones ${zone} --random 1 --size 200,200
  26. # echo python train_model.py --data data/${OUTPUT_DATA_FILE} --output ${OUTPUT_DATA_FILE} --balancing ${balancing} --chanels 3
  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
  33. s="A,D,G,H"
  34. for zone in {10,11,12}; do
  35. for kernel in {3,5,7}; do
  36. for balancing in {0,1}; do
  37. OUTPUT_DATA_FILE="${metric}_nb_zones_${zone}_W${window}_K${kernel}_balancing${balancing}_maxwell"
  38. if grep -q "${OUTPUT_DATA_FILE}" "${file_path}"; then
  39. echo "SVD model ${OUTPUT_DATA_FILE} already generated"
  40. else
  41. #echo "Run computation for SVD model ${OUTPUT_DATA_FILE}"
  42. echo python generate/generate_dataset.py --output data/${OUTPUT_DATA_FILE} --features ${metric} --scenes ${s} --params ${kernel},${dist_patch} --nb_zones ${zone} --random 1 --size 200,200
  43. echo python train_model.py --data data/${OUTPUT_DATA_FILE} --output ${OUTPUT_DATA_FILE} --balancing ${balancing} --chanels 3
  44. echo python prediction_model.py --data data/${OUTPUT_DATA_FILE_TEST}.test --model saved_models/${OUTPUT_DATA_FILE}.json
  45. fi
  46. done
  47. done
  48. done