예제 #1
0
파일: eval.py 프로젝트: jtpils/DeepLidar
    
    mode = mode_parser.parse_args()

    #set experiment and log configs
    experiment = Experiment(api_key="ypQZhYfs3nSyKzOfz13iuJpj2",project_name='deeplidar',log_code=True)

    DeepForest_config = load_config()

    #Log parameters
    experiment.log_parameter("Start Time", mode.dir)
    experiment.log_parameter("Training Mode", mode.mode)
    experiment.log_parameters(DeepForest_config)
    
    DeepForest_config["mode"] = mode.mode
    if mode.mode == "train":
        data = load_training_data(DeepForest_config)

    if mode.mode == "retrain":
        data = load_retraining_data(DeepForest_config)
        for x in DeepForest_config["evaluation_site"]:
            DeepForest_config[x]["h5"] = os.path.join(DeepForest_config[x]["h5"],"hand_annotations")
            
    #pass an args object instead of using command line        
    args = [
        "--batch-size", str(DeepForest_config['batch_size']),
        '--score-threshold', str(DeepForest_config['score_threshold']),
        '--suppression-threshold', '0.1', 
        '--save-path', 'snapshots/images/', 
        '--model', mode.saved_model, 
        '--convert-model'
    ]
예제 #2
0
def test_train():
    data = load_training_data(DeepForest_config)    
    print("Data shape is {}".format(data.shape))
    assert data.shape[0] > 0, "Data is empty"