train_model.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. set -e # exit when any command fails
  3. if [ "$1" == "dev" ]; then
  4. doc_dataset_train="dataset/selfCollectedData_DocCyclic"
  5. doc_dataset_test="dataset/my_doc_test"
  6. corner_dataset_train="dataset/my_corner_train"
  7. corner_dataset_test="dataset/my_corner_test"
  8. else
  9. doc_dataset_train="dataset/selfCollectedData_DocCyclic dataset/smartdocData_DocTrainC dataset/my_doc_train dataset/sythetic_doc_train"
  10. doc_dataset_test="dataset/smartDocData_DocTestC dataset/my_doc_test dataset/sythetic_doc_test"
  11. corner_dataset_train="dataset/cornerTrain64 dataset/my_corner_train dataset/sythetic_corner_train"
  12. corner_dataset_test="dataset/selfCollectedData_CornDetec dataset/my_corner_test dataset/sythetic_corner_test"
  13. fi
  14. # echo "doc_dataset_train=$doc_dataset_train corner_dataset_test=$corner_dataset_test"
  15. # 1、resnet model
  16. python train_model.py --name DocModel -i $doc_dataset_train \
  17. --lr 0.5 --schedule 20 30 35 -v $doc_dataset_test --batch-size 8 --model-type resnet --loader ram
  18. python train_model.py --name CornerModel -i $corner_dataset_train \
  19. --lr 0.5 --schedule 20 30 35 -v $corner_dataset_test --batch-size 8 --model-type resnet --loader ram --dataset corner
  20. # 2、mobile_net model
  21. # python train_model.py --name DocModel -i $doc_dataset_train \
  22. # --lr 0.5 --schedule 20 30 35 -v $doc_dataset_test --batch-size 16 --model-type shallow --loader ram
  23. # python train_model.py --name CornerModel -i $corner_dataset_train \
  24. # --lr 0.5 --schedule 20 30 35 -v $corner_dataset_test --batch-size 16 --model-type shallow --loader ram --dataset corner