12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #!/usr/bin/env python3
- __author__ = "Olivier Vu thanh"
- __email__ = "olivier.vu-thanh@grenoble-inp.org"
- '''
- Run "python main.py --config_file=config.json"
- Available calibration methods are : emwnenmf (EM-W-NeNMF from [quote paper])
- : coming soon...
- '''
- import numpy as np
- import argparse
- import json
- import matplotlib.pyplot as plt
- from dataCreator import dataCreator
- from calibrationStatistics import calibrationStatistics
- from calibrationMethods.emwnenmf import emwnenmf
- print('Work in progress')
- '''
- Get the config (json) file, see "config.json" for default one
- '''
- parser = argparse.ArgumentParser(description='Parse location of config file (json).')
- parser.add_argument('--config_file', type=str, default='config.json',
- help='path to json config file, see config.json for default')
- args = parser.parse_args()
- with open(args.config_file) as json_data_file:
- config = json.load(json_data_file)
- '''
- Main loop
- '''
- data = dataCreator(config['sceneWidth'],
- config['sceneLength'],
- config['sensorR'],
- config['refR'],
- config['rdvR'],
- config['mvR'],
- config['phenLowerBound'],
- config['phenUpperBound'],
- config['Mu_beta'],
- config['Mu_alpha'],
- config['Bound_beta'],
- config['Bound_alpha'])
- m = data.numArea
- n = data.numSensor+1
- Res = {}
- for run in range(config['numRuns']):
- data.create_scene(run)
- data.show_scene()
- # print(data.W)
|