example_script.sh 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #!/bin/bash
  2. export CUDA_VISIBLE_DEVICES=0
  3. SCRIPT="cont_ava.py"
  4. echo $SCRIPT
  5. BATCH_SIZE=128
  6. num_classes=11
  7. LOG="../example_LOG/"
  8. data_root="../data/data_stream_files/BW_stream_files/"
  9. images_root="/home/AMMOD_data/camera_traps/BayerWald/G-Fallen/MDcrops/"
  10. label_dict="../data/label_dictionaries/BIRDS_11_Species.pkl"
  11. #nested loop to iterate over all cross validations splits
  12. #
  13. # for eps in 5 # epochs
  14. # do
  15. # for exp_size in 128
  16. # do
  17. # for i in 0 1 2 3 4 # cross validation splits
  18. # do
  19. # FILE="cv${i}_expsize${exp_size}_crop"
  20. # for dr in 8 #data ratio
  21. # do
  22. #
  23. # cf => class inverse frequency rehearsal
  24. # python $SCRIPT --file $FILE --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm cf -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  25. # (shuffled)
  26. # python $SCRIPT --file $FILE --shuffle_stream --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm cf -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  27. #
  28. # rr => random rehearsal (nuiform samling)
  29. # python $SCRIPT --file $FILE --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm rr -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  30. # (shuffled)
  31. # python $SCRIPT --file $FILE --shuffle_stream --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm rr -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  32. #
  33. # mir => maximally intergfered retrieval based rehearsal
  34. # python $SCRIPT --file $FILE --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm mir -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  35. # (shuffled)
  36. # python $SCRIPT --file $FILE --shuffle_stream --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm mir -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  37. #
  38. # ce => class error based rehearsal (with eval_after_n_exp, i.e. ne equal to 5)
  39. # python $SCRIPT --file $FILE --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm ce -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 5 -tne 100 -temp $temp --label_dict $label_dict
  40. # (shuffled)
  41. # python $SCRIPT --file $FILE --shuffle_stream --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm ce -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 5 -tne 100 -temp $temp --label_dict $label_dict
  42. #
  43. # weighted moving average of class error based method with 18 past evaluations on the validation data influencing weights and weights drawn from a gaussian bell curve with sigma 9
  44. # python $SCRIPT --file $FILE --shuffle_stream --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm wce -nexp_avg 18 -sig 9 -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 5 -tne 100 --label_dict $label_dict
  45. # (shuffled)
  46. # python $SCRIPT --file $FILE --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm wce -nexp_avg 18 -sig 9 -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 5 -tne 100 --label_dict $label_dict
  47. #
  48. # done
  49. # done
  50. # done
  51. # done
  52. #
  53. # nested loop to perform experiments with limited memory and different memory filling strategies:
  54. for eps in 5 # epochs
  55. do
  56. for exp_size in 128
  57. do
  58. for i in 0 1 2 3 4 # cross validation split
  59. do
  60. FILE="cv${i}_expsize${exp_size}_crop"
  61. for dr in 2 8 # data ratio
  62. do
  63. for mem in 0.1 0.25 # memory size one tenth and one quatre of total stream data.
  64. do
  65. for memf_strategy in cbrs stdrs
  66. do
  67. python $SCRIPT --file $FILE --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm ce -memf $memf_strategy -mems $mem -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 5 -tne 100 --label_dict $label_dict
  68. python $SCRIPT --file $FILE --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm cf -memf $memf_strategy -mems $mem -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  69. python $SCRIPT --file $FILE --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm rr -memf $memf_strategy -mems $mem -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  70. python $SCRIPT --file $FILE --shuffle_stream --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm ce -memf $memf_strategy -mems $mem -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 5 --label_dict $label_dict
  71. python $SCRIPT --file $FILE --shuffle_stream --strategy naive --data_root $data_root --images_root $images_root -cnum_classes $num_classes -log $LOG -rm cf -memf $memf_strategy -mems $mem -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  72. python $SCRIPT --file $FILE --shuffle_stream --strategy naive --data_root $data_root --images_root $images_root --num_classes $num_classes -log $LOG -rm rr -memf $memf_strategy -mems $mem -dr $dr --batch_size $BATCH_SIZE --epochs $eps -ne 100 --label_dict $label_dict
  73. done
  74. done
  75. done
  76. done
  77. done
  78. done