Example #1
0
def main():
    # Get parameters from arguments
    parser = argparse.ArgumentParser(description='Semantic segmentation')

    parser.add_argument(
        '-c',
        '--config_path',
        type=str,
        default=
        '/home/stevenwudi/PycharmProjects/autonomous_driving/code_base/config/synthia_segmentation.py'
    )
    arguments = parser.parse_args()
    assert arguments.config_path is not None, 'Please provide a configuration path using -c config/pathname'

    # Start Time
    print('\n > Start Time:')
    print('   ' + datetime.now().strftime('%a, %d %b %Y-%m-%d %H:%M:%S'))
    start_time = time.time()

    # Load configuration files
    configuration = Configuration(arguments.config_path)
    cf = configuration.load()
    configurationPATH(cf)

    # Train /test/predict with the network, depending on the configuration
    process(cf)

    # End Time
    end_time = time.time()
    print('\n > End Time:')
    print('   ' + datetime.now().strftime('%a, %d %b %Y-%m-%d %H:%M:%S'))
    print('\n   ET: ' + HMS(end_time - start_time))  # -> H:M:S
def main():
    # Get parameters from arguments
    parser = argparse.ArgumentParser(description='Model training')
    parser.add_argument(
        '-c',
        '--config_path',
        type=str,
        default=
        '/home/wzn/PycharmProjects/autonomous_driving/code_base/config/synthia_car_trajectory.py',
        help='Configuration file')
    arguments = parser.parse_args()
    assert arguments.config_path is not None, 'Please provide a path using -c config/pathname in the command line'
    print('\n > Start Time:')
    print('   ' + datetime.now().strftime('%a, %d %b %Y-%m-%d %H:%M:%S'))
    start_time = time.time()
    # Define the user paths

    # Load configuration files
    configuration = Configuration(arguments.config_path)
    cf = configuration.load()
    configurationPATH(cf)

    # Train /test/predict with the network, depending on the configuration
    process(cf)

    # End Time
    end_time = time.time()
    print('\n > End Time:')
    print('   ' + datetime.now().strftime('%a, %d %b %Y-%m-%d %H:%M:%S'))
    print('\n   ET: ' + HMS(end_time - start_time))
def main():
    # Get parameters from arguments
    parser = argparse.ArgumentParser(description='Semantic segmentation')
    parser.add_argument(
        '-c',
        '--config_path',
        type=str,
        default=
        '/home/ty/code/autonomous_driving/code_base/config/cityscapes_segmentation.py',
        help='Configuration file')
    parser.add_argument('-e',
                        '--exp_name',
                        type=str,
                        default='cityscape_segmentation',
                        help='Name of the experiment')
    parser.add_argument('-s',
                        '--shared_path',
                        type=str,
                        default='/home/public',
                        help='Path to shared data folder')
    parser.add_argument('-l',
                        '--local_path',
                        type=str,
                        default='/home/ty/code/autonomous_driving',
                        help='Path to local data folder')

    arguments = parser.parse_args()

    assert arguments.config_path is not None, 'Please provide a configuration path using -c config/pathname'
    assert arguments.exp_name is not None, 'Please provide a name for the experiment using -e name in the command line'

    # Start Time
    print('\n > Start Time:')
    print('   ' + datetime.now().strftime('%a, %d %b %Y-%m-%d %H:%M:%S'))
    start_time = time.time()

    # Define the user paths
    shared_path = arguments.shared_path
    local_path = arguments.local_path
    dataset_path = os.path.join(local_path, 'Datasets')
    shared_dataset_path = os.path.join(shared_path)
    experiments_path = os.path.join(local_path, 'Experiments')
    shared_experiments_path = os.path.join(shared_path, 'Experiments')

    # Load configuration files
    configuration = Configuration(arguments.config_path)
    cf = configuration.load()
    configurationPATH(cf)

    # Train /test/predict with the network, depending on the configuration
    process(cf)

    # End Time
    end_time = time.time()
    print('\n > End Time:')
    print('   ' + datetime.now().strftime('%a, %d %b %Y-%m-%d %H:%M:%S'))
    print('\n   ET: ' + HMS(end_time - start_time))  # -> H:M:S