Skip to content
Snippets Groups Projects
Select Git revision
  • a0f7c96f51b3e1575f6db1b704579b0cf1042c42
  • master default protected
  • correlation
  • 24-non-negative-omp
  • 15-integration-sota
  • 20-coherence-des-arbres-de-predictions
  • 19-add-some-tests
  • 13-visualization
  • 17-adding-new-datasets
  • 12-experiment-pipeline
  • 14-correction-of-multiclass-classif
  • archive/10-gridsearching-of-the-base-forest
  • archive/farah_notation_and_related_work
  • archive/wip_clean_scripts
  • archive/4-implement-omp_forest_classifier
  • archive/5-add-plots-2
  • archive/Leo_Add_first_notebook
17 results

train.py

Blame
  • PyAVA.py 1.08 KiB
    ##### IMPORTATIONS #####
    import os
    import json
    from tkinter import *
    from interface import FileExplorer, App
    from args import fetch_inputs
    
    
    ##### MAIN #####
    if __name__ == '__main__':
        # fetching inputs.
        dir_explore, max_traj, new_sr, output, modify, initial_basename, parameters = fetch_inputs()
    
        if modify:
            with open(os.path.join(output, modify), "r") as f:
                coords_to_change = json.load(f)
    
            MainWindow = App(
                dir_explore, 
                max_traj, 
                new_sr, 
                output, 
                os.path.join(dir_explore, initial_basename),
                coords_to_change,
                parameters)
    
        else:
            # open explorer to select first file
            groot = Tk()
            initial_file = FileExplorer(dir_explore).file
            groot.quit()
            groot.destroy()
    
            if len(initial_file) > 0:
                # launch UI
                MainWindow = App(
                    dir_explore, 
                    max_traj, 
                    new_sr, 
                    output, 
                    initial_file,
                    overwrite_parameters=parameters)