tensorboard_str = 'tensorboard' + '--logdir ' + logs_path print('Visualize at Tensorboard using ', tensorboard_str) print('Importing and Preprocessing Cloud-of-Point Data') dataset = [] dataset.append(get_data.data_import(file_names_x, data_folder)) 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)
test_input_conv_data=test_input_conv_data[test_kpi_subset_dump,:,:,:,:] #Test output files deploy_output=1 if(deploy_output==1): test_kcc_dataset=get_data.data_import(test_kcc_files,kcc_folder) if(kcc_sublist!=0): print("Sub-setting Process Parameters: ",kcc_sublist) test_kcc_dataset=test_kcc_dataset[:,kcc_sublist] else: print("Using all Process Parameters") test_kcc_subset_dump=test_kcc_subset_dump[test_kpi_subset_dump,:] kcc_regression_test,kcc_classification_test=hy_util.split_kcc(test_kcc_subset_dump) Y_out_test_list=[] Y_out_test_list.append(kcc_regression_test) Y_out_test_list.append(kcc_classification_test) y_shape_error_test_list=[] for encode_decode_construct in encode_decode_multi_output_construct: #importing file names for model output print("Importing output data for stage: ",encode_decode_construct) test_output_file_names_x=encode_decode_construct['output_test_data_files_x'] test_output_file_names_y=encode_decode_construct['output_test_data_files_y'] test_output_file_names_z=encode_decode_construct['output_test_data_files_z'] test_output_dataset=[]