dataset.append(get_data.data_import(file_names_y, data_folder))
    dataset.append(get_data.data_import(file_names_z, data_folder))
    point_index = get_data.load_mapping_index(mapping_index)

    kcc_dataset = get_data.data_import(kcc_files, kcc_folder)
    input_conv_data, kcc_subset_dump, kpi_subset_dump = get_data.data_convert_voxel_mc(
        vrm_system, dataset, point_index, kcc_dataset)

    #Added Function to split KCCs to regression and classification
    kcc_regression, kcc_classification = hy_util.split_kcc(kcc_subset_dump)

    print('Building 3D CNN model')

    output_dimension = assembly_kccs

    dl_model_unet = Encode_Decode_Model(output_dimension)
    model = dl_model_unet.resnet_3d_cnn_hybrid(voxel_dim, voxel_channels,
                                               kcc_classification.shape[1])

    print(model.summary())
    #sys.exit()
    print('Training 3D CNN model')
    model_outputs = [kcc_regression, kcc_classification]

    train_model = TrainModel(batch_size, epocs, split_ratio)

    trained_model, accuracy_metrics_df_reg, accuracy_metrics_df_cla = train_model.run_train_model(
        model, input_conv_data, model_outputs, model_path, logs_path,
        plots_path, activate_tensorboard)

    accuracy_metrics_df_reg.to_csv(logs_path + '/metrics_train_regression.csv')
Exemplo n.º 2
0
    print("KCC sub-listing: ", kcc_sublist)

    #Check for KCC sub-listing
    if (kcc_sublist != 0):
        output_dimension = len(kcc_sublist)
    else:
        output_dimension = assembly_kccs

    print("Process Parameter Dimension: ", output_dimension)

    input_size = (voxel_dim, voxel_dim, voxel_dim, voxel_channels)

    model_depth = cftrain.encode_decode_params['model_depth']
    inital_filter_dim = cftrain.encode_decode_params['inital_filter_dim']

    dl_model_unet = Encode_Decode_Model(output_dimension)
    model = dl_model_unet.encode_decode_3d(inital_filter_dim, model_depth,
                                           input_size, voxel_channels)

    print(model.summary())
    #sys.exit()

    #importing file names for model input
    input_file_names_x = config.encode_decode_construct['input_data_files_x']
    input_file_names_y = config.encode_decode_construct['input_data_files_y']
    input_file_names_z = config.encode_decode_construct['input_data_files_z']

    test_input_file_names_x = config.encode_decode_construct[
        'input_test_data_files_x']
    test_input_file_names_y = config.encode_decode_construct[
        'input_test_data_files_y']
Exemplo n.º 3
0
    print("KCC sub-listing: ", kcc_sublist)

    #Check for KCC sub-listing
    if (kcc_sublist != 0):
        output_dimension = len(kcc_sublist)
    else:
        output_dimension = assembly_kccs

    print("Process Parameter Dimension: ", output_dimension)

    input_size = (voxel_dim, voxel_dim, voxel_dim, voxel_channels)

    model_depth = cftrain.encode_decode_params['model_depth']
    inital_filter_dim = cftrain.encode_decode_params['inital_filter_dim']

    dl_model_unet = Encode_Decode_Model(output_dimension)

    #changed to attention model
    model = dl_model_unet.encode_decode_3d_multi_output_attention(
        inital_filter_dim, model_depth, input_size, output_heads,
        voxel_channels)

    print(model.summary())
    #sys.exit()

    #importing file names for model input
    input_file_names_x = config.encode_decode_construct['input_data_files_x']
    input_file_names_y = config.encode_decode_construct['input_data_files_y']
    input_file_names_z = config.encode_decode_construct['input_data_files_z']

    test_input_file_names_x = config.encode_decode_construct[