train_cunet_art.sh 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/bin/sh
  2. MODEL_DIR=models/test/cunet_release/
  3. THREADS=16
  4. mkdir -p ${MODEL_DIR}
  5. # convert data
  6. th convert_data.lua -max_training_image_size 1600
  7. # scale
  8. th train.lua -method scale -save_history 1 -model upcunet -downsampling_filters "Box,Box,Box,Box,Sinc,Sinc,Sinc,Sinc,Catrom" -model_dir ${MODEL_DIR} -test query/scale_test.png -thread ${THREADS} -backend cudnn -oracle_rate 0.0 -max_size 512 -loss aux_lbp -update_criterion loss -crop_size 104 -validation_crops 64 -inner_epoch 2 -epoch 200 -patches 32 -batch_size 8 > ${MODEL_DIR}/train.log 2>&1
  9. # noise scale 0
  10. th train.lua -save_history 1 -model upcunet -method noise_scale -noise_level 0 -style art \
  11. -downsampling_filters "Box,Box,Box,Box,Sinc,Sinc,Sinc,Sinc,Catrom" -model_dir ${MODEL_DIR} -test query/noise_test.jpg -thread ${THREADS} -backend cudnn -oracle_rate 0.1 -max_size 512 -loss aux_lbp -update_criterion loss -crop_size 104 -validation_crops 64 -inner_epoch 4 -epoch 30 -patches 32 -batch_size 8 \
  12. -resume ${MODEL_DIR}/scale2.0x_model.t7 \
  13. > ${MODEL_DIR}/train_noise_scale0.log 2>&1
  14. # noise scale 1
  15. th train.lua -save_history 1 -model upcunet -method noise_scale -noise_level 1 -style art \
  16. -downsampling_filters "Box,Box,Box,Box,Sinc,Sinc,Sinc,Sinc,Catrom" -model_dir ${MODEL_DIR} -test query/noise_test.jpg -thread ${THREADS} -backend cudnn -oracle_rate 0.1 -max_size 512 -loss aux_lbp -update_criterion loss -crop_size 104 -validation_crops 64 -inner_epoch 4 -epoch 30 -patches 32 -batch_size 8 \
  17. -resume ${MODEL_DIR}/scale2.0x_model.t7 \
  18. > ${MODEL_DIR}/train_noise_scale1.log 2>&1
  19. # noise scale 2
  20. th train.lua -save_history 1 -model upcunet -method noise_scale -noise_level 2 -style art \
  21. -downsampling_filters "Box,Box,Box,Box,Sinc,Sinc,Sinc,Sinc,Catrom" -model_dir ${MODEL_DIR} -test query/noise_test.jpg -thread ${THREADS} -backend cudnn -oracle_rate 0.1 -max_size 512 -loss aux_lbp -update_criterion loss -crop_size 104 -validation_crops 64 -inner_epoch 4 -epoch 30 -patches 32 -batch_size 8 \
  22. -resume ${MODEL_DIR}/scale2.0x_model.t7 \
  23. > ${MODEL_DIR}/train_noise_scale2.log 2>&1
  24. # noise scale 3
  25. th train.lua -save_history 1 -model upcunet -method noise_scale -noise_level 3 -style art \
  26. -downsampling_filters "Box,Box,Box,Box,Sinc,Sinc,Sinc,Sinc,Catrom" -model_dir ${MODEL_DIR} -test query/noise_test.jpg -thread ${THREADS} -backend cudnn -oracle_rate 0.1 -max_size 512 -loss aux_lbp -update_criterion loss -crop_size 104 -validation_crops 64 -inner_epoch 4 -epoch 30 -patches 32 -batch_size 8 -nr_rate 1 \
  27. -resume ${MODEL_DIR}/scale2.0x_model.t7 \
  28. > ${MODEL_DIR}/train_noise_scale3.log 2>&1
  29. # noise 0
  30. th train.lua -save_history 1 -model cunet -method noise -noise_level 0 -model_dir ${MODEL_DIR} -test query/noise_test.jpg -backend cudnn -thread ${THREADS} -style art \
  31. -crop_size 88 -validation_crops 64 -patches 16 -batch_size 8 -epoch 50 -max_size 512 \
  32. -loss aux_lbp -update_criterion loss \
  33. -oracle_rate 0.1 \
  34. > ${MODEL_DIR}/train_noise0.log 2>&1
  35. # noise 1
  36. th train.lua -save_history 1 -model cunet -method noise -noise_level 1 -model_dir ${MODEL_DIR} -test query/noise_test.jpg -backend cudnn -thread ${THREADS} -style art \
  37. -crop_size 88 -validation_crops 64 -patches 16 -batch_size 8 -epoch 50 -max_size 512 \
  38. -loss aux_lbp -update_criterion loss \
  39. -oracle_rate 0.1 \
  40. > ${MODEL_DIR}/train_noise1.log 2>&1
  41. # noise 2
  42. th train.lua -save_history 1 -model cunet -method noise -noise_level 2 -model_dir ${MODEL_DIR} -test query/noise_test.jpg -backend cudnn -thread ${THREADS} -style art \
  43. -crop_size 88 -validation_crops 64 -patches 16 -batch_size 8 -epoch 50 -max_size 512 \
  44. -loss aux_lbp -update_criterion loss \
  45. -oracle_rate 0.1 \
  46. > ${MODEL_DIR}/train.log 2>&1
  47. # noise3
  48. th train.lua -save_history 1 -model cunet -method noise -noise_level 3 -model_dir ${MODEL_DIR} -test query/noise_test.jpg -backend cudnn -thread ${THREADS} -style art -nr_rate 1 \
  49. -crop_size 88 -validation_crops 64 -patches 16 -batch_size 8 -epoch 50 -max_size 512 \
  50. -loss aux_lbp -update_criterion loss \
  51. -oracle_rate 0.1 \
  52. > ${MODEL_DIR}/train_noise3.log 2>&1