12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- # erase "results/models_comparisons.csv" file and write new header
- file_path='results/models_comparisons_keras.csv'
- erased=$1
- if [ "${erased}" == "Y" ]; then
- echo "Previous data file erased..."
- rm ${file_path}
- mkdir -p models_info
- touch ${file_path}
- # add of header
- echo 'model_name; number_of_approximations; coeff_of_determination; MSE 10 samples; MSE 1000 samples;' >> ${file_path}
- fi
- for feature in {'variances','samples'}; do
- for n in {3,4,5,6,7,8,9,10,15,20,25,30}; do
- for row in {1,2,3,4,5}; do
- for column in {1,2,3,4,5}; do
- # Run creation of dataset and train model
- DATASET_NAME="data/dataset_${n}_${feature}_column_${column}_row_${row}.csv"
- MODEL_NAME="${n}_${feature}_column_${column}_row_${row}"
- IMAGE_RECONSTRUCTED="Sponza1_${n}_${feature}_${row}_${column}.png"
- DATA_INFO="${n}_${feature}_column_${column}_row_${row}"
- if grep -q "${MODEL_NAME}" "${file_path}"; then
- echo "${MODEL_NAME} results already computed.."
- else
- echo "Run computation for model ${MODEL_NAME}"
- # Already computed..
- python generate/make_dataset.py --n ${n} --feature ${feature} --each_row ${row} --each_column ${column}
- python train_model_keras.py --data ${DATASET_NAME} --model_name ${MODEL_NAME}
- # TODO : Add of reconstruct process for image ?
- python reconstruct/reconstruct_keras.py --n ${n} --feature ${feature} --model_path saved_models/${MODEL_NAME}.json --scene Sponza1 --image_name ${IMAGE_RECONSTRUCTED}
- python others/write_result_keras.py --n ${n} --model_path saved_models/${MODEL_NAME}.json --scene Sponza1 --image_path reconstructed/${IMAGE_RECONSTRUCTED} --data ${DATASET_NAME} --iqa mse &
- fi
- done
- done
- done
- done
|