Esempio n. 1
0
print(mconf_cremad_f.step)
print(mconf_cremad_f.classes)
print(mconf_cremad_f.features_save_name)
print(mconf_cremad_f.model_config_save_name)
print(mconf_cremad_f.training_log_name)
print(mconf_cremad_f.model_save_name)
print(mconf_cremad_f.model_h5_save_name)
print(mconf_cremad_f.model_tflite_save_name)
print(mconf_cremad_f.feature_path)
print(mconf_cremad_f.model_config_path)
print(mconf_cremad_f.training_log_path)
print(mconf_cremad_f.model_path)
print(mconf_cremad_f.model_h5_path)
print(mconf_cremad_f.model_tflite_path)
rfpconf_cremad_f = confc.RandFeatParams(df=data_info_cremad_df_f,
                                        database=confv.database_cremad,
                                        gender=confv.gender_female)
X, y = bf.build_random_features(modelconfig=mconf_cremad_f,
                                randfeatparams=rfpconf_cremad_f)
print(
    "--------------------Finished building features for adjusted and {gender} isolated dataset: {name}--------------------"
    .format(gender=confv.gender_female, name=confv.dataset_cremad_female))

# MODEL & TRAINING
print(
    "\n\n--------------------Started model training for adjusted and {gender} isolated dataset: {name}--------------------"
    .format(gender=confv.gender_female, name=confv.dataset_cremad_female))
input_shape = (X.shape[1], X.shape[2], 1)
model = mdl.get_cremad_female_model(input_shape)

y_flat = np.argmax(y, axis=1)
print(mconf_ravdess_f.step)
print(mconf_ravdess_f.classes)
print(mconf_ravdess_f.features_save_name)
print(mconf_ravdess_f.model_config_save_name)
print(mconf_ravdess_f.training_log_name)
print(mconf_ravdess_f.model_save_name)
print(mconf_ravdess_f.model_h5_save_name)
print(mconf_ravdess_f.model_tflite_save_name)
print(mconf_ravdess_f.feature_path)
print(mconf_ravdess_f.model_config_path)
print(mconf_ravdess_f.training_log_path)
print(mconf_ravdess_f.model_path)
print(mconf_ravdess_f.model_h5_path)
print(mconf_ravdess_f.model_tflite_path)
rfpconf_ravdess_f = confc.RandFeatParams(df=data_info_ravdess_df_f,
                                         database=confv.database_ravdess,
                                         gender=confv.gender_female)
X, y = bf.build_random_features(modelconfig=mconf_ravdess_f,
                                randfeatparams=rfpconf_ravdess_f)
print(
    "--------------------Finished building features for adjusted and {gender} isolated dataset: {name}--------------------"
    .format(gender=confv.gender_female, name=confv.dataset_ravdess_female))

# MODEL & TRAINING
print(
    "\n\n--------------------Started model training for adjusted and {gender} isolated dataset: {name}--------------------"
    .format(gender=confv.gender_female, name=confv.dataset_ravdess_female))
input_shape = (X.shape[1], X.shape[2], 1)
model = mdl.get_ravdess_female_model(input_shape)

y_flat = np.argmax(y, axis=1)
print(mconf_shemo_f.step)
print(mconf_shemo_f.classes)
print(mconf_shemo_f.features_save_name)
print(mconf_shemo_f.model_config_save_name)
print(mconf_shemo_f.training_log_name)
print(mconf_shemo_f.model_save_name)
print(mconf_shemo_f.model_h5_save_name)
print(mconf_shemo_f.model_tflite_save_name)
print(mconf_shemo_f.feature_path)
print(mconf_shemo_f.model_config_path)
print(mconf_shemo_f.training_log_path)
print(mconf_shemo_f.model_path)
print(mconf_shemo_f.model_h5_path)
print(mconf_shemo_f.model_tflite_path)
rfpconf_shemo_f = confc.RandFeatParams(df=data_info_shemo_df_f,
                                       database=confv.database_shemo,
                                       gender=confv.gender_female)
X, y = bf.build_random_features(modelconfig=mconf_shemo_f,
                                randfeatparams=rfpconf_shemo_f)
print(
    "--------------------Finished building features for adjusted and {gender} isolated dataset: {name}--------------------"
    .format(gender=confv.gender_female, name=confv.dataset_shemo_female))

# MODEL & TRAINING
print(
    "\n\n--------------------Started model training for adjusted and {gender} isolated dataset: {name}--------------------"
    .format(gender=confv.gender_female, name=confv.dataset_shemo_female))
input_shape = (X.shape[1], X.shape[2], 1)
model = mdl.get_shemo_female_model(input_shape)

y_flat = np.argmax(y, axis=1)
print(mconf_emodb_m.step)
print(mconf_emodb_m.classes)
print(mconf_emodb_m.features_save_name)
print(mconf_emodb_m.model_config_save_name)
print(mconf_emodb_m.training_log_name)
print(mconf_emodb_m.model_save_name)
print(mconf_emodb_m.model_h5_save_name)
print(mconf_emodb_m.model_tflite_save_name)
print(mconf_emodb_m.feature_path)
print(mconf_emodb_m.model_config_path)
print(mconf_emodb_m.training_log_path)
print(mconf_emodb_m.model_path)
print(mconf_emodb_m.model_h5_path)
print(mconf_emodb_m.model_tflite_path)
rfpconf_emodb_m = confc.RandFeatParams(df=data_info_emodb_df_m,
                                       database=confv.database_emodb,
                                       gender=confv.gender_male)
X, y = bf.build_random_features(modelconfig=mconf_emodb_m,
                                randfeatparams=rfpconf_emodb_m)
print(
    "--------------------Finished building features for adjusted and {gender} isolated dataset: {name}--------------------"
    .format(gender=confv.gender_male, name=confv.dataset_emodb_male))

# MODEL & TRAINING
print(
    "\n\n--------------------Started model training for adjusted and {gender} isolated dataset: {name}--------------------"
    .format(gender=confv.gender_male, name=confv.dataset_emodb_male))
input_shape = (X.shape[1], X.shape[2], 1)
model = mdl.get_emodb_male_model(input_shape)

y_flat = np.argmax(y, axis=1)