vrm_system = VRMSimulationModel(assembly_type, assembly_kccs,
                                    assembly_kpis, part_name, part_type,
                                    voxel_dim, voxel_channels, point_dim,
                                    aritifical_noise)
    deploy_model = BayesDeployModel()

    #Generate Paths
    train_path = '../trained_models/' + part_type
    model_path = train_path + '/model' + '/Bayes_trained_model_0'
    logs_path = train_path + '/logs'
    deploy_path = train_path + '/deploy/'
    plots_path = train_path + '/plots/'

    #Voxel Mapping File

    get_data = GetTrainData()

    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)

    #Make an Object of the Measurement System Class
    measurement_system = HexagonWlsScanner(data_type, application,
                                           system_noise, part_type,
                                           data_format)
    #Make an Object of the Assembly System Class
    assembly_system = PartType(assembly_type, assembly_kccs, assembly_kpis,
                               part_name, part_type, voxel_dim, voxel_channels,
logs_path = train_path + '/logs'
pathlib.Path(logs_path).mkdir(parents=True, exist_ok=True)

plots_path = train_path + '/plots'
pathlib.Path(plots_path).mkdir(parents=True, exist_ok=True)

# In[7]:

#Objects of Measurement System, Assembly System, Get Inference Data
print('Initializing the Assembly System and Measurement System....')
measurement_system = HexagonWlsScanner(data_type, application, system_noise,
                                       part_type, data_format)
vrm_system = VRMSimulationModel(assembly_type, assembly_kccs, assembly_kpis,
                                part_name, part_type, voxel_dim,
                                voxel_channels, point_dim, aritifical_noise)
get_data = GetTrainData()

kcc_sublist = cftrain.encode_decode_params['kcc_sublist']
output_heads = cftrain.encode_decode_params['output_heads']
encode_decode_multi_output_construct = config.encode_decode_multi_output_construct

if (output_heads == len(encode_decode_multi_output_construct)):
    print("Valid Output Stages and heads")
else:
    print("Inconsistent model setting")

print("KCC sub-listing: ", kcc_sublist)

#Check for KCC sub-listing
if (kcc_sublist != 0):
    output_dimension = len(kcc_sublist)
Beispiel #3
0
    pathlib.Path(plots_path).mkdir(parents=True, exist_ok=True)

    deployment_path = train_path + '/deploy'
    pathlib.Path(deployment_path).mkdir(parents=True, exist_ok=True)

    #Objects of Measurement System, Assembly System, Get Inference Data
    print('Initializing the Assembly System and Measurement System....')

    measurement_system = HexagonWlsScanner(data_type, application,
                                           system_noise, part_type,
                                           data_format)
    vrm_system = VRMSimulationModel(assembly_type, assembly_kccs,
                                    assembly_kpis, part_name, part_type,
                                    voxel_dim, voxel_channels, point_dim,
                                    aritifical_noise)
    get_data = GetTrainData()

    #print(input_conv_data.shape,kcc_subset_dump.shape)
    print('Building Unet Model')

    kcc_sublist = cftrain.encode_decode_params['kcc_sublist']

    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)
Beispiel #4
0
    pathlib.Path(plots_path).mkdir(parents=True, exist_ok=True)

    deployment_path = train_path + '/deploy'
    pathlib.Path(deployment_path).mkdir(parents=True, exist_ok=True)

    #Objects of Measurement System, Assembly System, Get Inference Data
    print('Initializing the Assembly System and Measurement System....')

    measurement_system = HexagonWlsScanner(data_type, application,
                                           system_noise, part_type,
                                           data_format)
    vrm_system = VRMSimulationModel(assembly_type, assembly_kccs,
                                    assembly_kpis, part_name, part_type,
                                    voxel_dim, voxel_channels, point_dim,
                                    aritifical_noise)
    get_data = GetTrainData()

    #print(input_conv_data.shape,kcc_subset_dump.shape)
    print('Building 3D CNN model')

    output_dimension = assembly_kccs

    dl_model = Multi_Head_DLModel(model_type, assembly_stages,
                                  output_dimension, categorical_kccs)
    model = dl_model.multi_head_standard_cnn_model_3d(voxel_dim,
                                                      voxel_channels)

    print('Importing data')

    point_index = get_data.load_mapping_index(mapping_index)
    kcc_dataset = get_data.data_import(kcc_files, kcc_folder)
Beispiel #5
0
    kmc_path = train_path + '/kmc'
    pathlib.Path(kmc_path).mkdir(parents=True, exist_ok=True)

    kmc_plot_path = kmc_path + '/plots'
    pathlib.Path(kmc_plot_path).mkdir(parents=True, exist_ok=True)

    print('Initializing the Assembly System and Measurement System....')

    measurement_system = HexagonWlsScanner(data_type, application,
                                           system_noise, part_type,
                                           data_format)
    vrm_system = VRMSimulationModel(assembly_type, assembly_kccs,
                                    assembly_kpis, part_name, part_type,
                                    voxel_dim, voxel_channels, point_dim,
                                    aritifical_noise)
    get_data = GetTrainData()

    print('Importing and preprocessing Cloud-of-Point Data')

    dataset = []
    dataset.append((get_data.data_import(file_names_x,
                                         data_folder)).iloc[:, 0:point_dim])
    dataset.append((get_data.data_import(file_names_y,
                                         data_folder)).iloc[:, 0:point_dim])
    dataset.append((get_data.data_import(file_names_z,
                                         data_folder)).iloc[:, 0:point_dim])
    kcc_dataset = get_data.data_import(kcc_files, kcc_folder)
    point_index = get_data.load_mapping_index(mapping_index)

    point_data = pd.concat([dataset[0], dataset[1], dataset[2]],
                           axis=1,
Beispiel #6
0
    system_noise = config.assembly_system['system_noise']
    aritifical_noise = config.assembly_system['aritifical_noise']
    data_folder = config.assembly_system['data_folder']
    kcc_folder = config.assembly_system['kcc_folder']
    kcc_files = config.assembly_system['test_kcc_files']

    print('Initializing the Assembly System and Measurement System....')
    measurement_system = HexagonWlsScanner(data_type, application,
                                           system_noise, part_type,
                                           data_format)
    vrm_system = VRMSimulationModel(assembly_type, assembly_kccs,
                                    assembly_kpis, part_name, part_type,
                                    voxel_dim, voxel_channels, point_dim,
                                    aritifical_noise)
    deploy_model = DeployModel()
    get_data = GetTrainData()

    #Generate Paths
    train_path = '../trained_models/' + part_type
    model_path = train_path + '/model' + '/trained_model_0.h5'
    logs_path = train_path + '/logs'
    deploy_path = train_path + '/deploy/'

    #Import all static resources
    #import Model
    inference_model = deploy_model.get_model(model_path)
    point_index = get_data.load_mapping_index(mapping_index)
    cop_file_name = vc.voxel_parameters['nominal_cop_filename']
    file_path = '../resources/nominal_cop_files/' + cop_file_name
    #Read cop from csv file
    nominal_cop = vrm_system.get_nominal_cop(file_path)
Beispiel #7
0
	pathlib.Path(logs_path).mkdir(parents=True, exist_ok=True)

	plots_path=train_path+'/plots'
	pathlib.Path(plots_path).mkdir(parents=True, exist_ok=True)

	deployment_path=train_path+'/deploy'
	pathlib.Path(deployment_path).mkdir(parents=True, exist_ok=True)

	print('Initializing....')
	measurement_system=HexagonWlsScanner(data_type,application,system_noise,part_type,data_format)
	print('Measurement system initialized')
	vrm_system=VRMSimulationModel(assembly_type,assembly_kccs,assembly_kpis,part_name,part_type,voxel_dim,voxel_channels,point_dim,aritifical_noise)
	
	
	print('Assembly and simulation system initialized')
	get_data=GetTrainData();

	metrics_eval=MetricsEval();
	
	point_index=get_data.load_mapping_index(mapping_index)

	print('Support systems initialized')
	

	kcc_struct=kcc_config.kcc_struct
	sampling_config=sampling_config.sampling_config
	adaptive_sampling=AdaptiveSampling(sampling_config['sample_dim'],sampling_config['sample_type'],sampling_config['adaptive_sample_dim'],sampling_config['adaptive_runs'])
	

	output_dimension=assembly_kccs
	eval_metrics_type= ["Mean Absolute Error","Mean Squared Error","Root Mean Squared Error","R Squared"]
    deployment_path = train_path + '/deploy'
    pathlib.Path(deployment_path).mkdir(parents=True, exist_ok=True)

    print('Initializing....')
    measurement_system = HexagonWlsScanner(data_type, application,
                                           system_noise, part_type,
                                           data_format)
    print('Measurement system initialized')
    vrm_system = VRMSimulationModel(assembly_type, assembly_kccs,
                                    assembly_kpis, part_name, part_type,
                                    voxel_dim, voxel_channels, point_dim,
                                    aritifical_noise)

    print('Assembly and simulation system initialized')
    get_data = GetTrainData()

    metrics_eval = MetricsEval()

    point_index = get_data.load_mapping_index(mapping_index)

    print('Support systems initialized')

    kcc_struct = kcc_config.kcc_struct
    sampling_config = sampling_config.sampling_config
    adaptive_sampling = AdaptiveSampling(
        sampling_config['sample_dim'], sampling_config['sample_type'],
        sampling_config['adaptive_sample_dim'],
        sampling_config['adaptive_runs'])

    output_dimension = assembly_kccs