# Path: lib/config.py
# def cfg_from_file(filename):
#     """Load a config file and merge it into the default options."""
#     import yaml
#     with open(filename, 'r') as f:
#         yaml_cfg = edict(yaml.load(f))
# 
#     _merge_a_into_b(yaml_cfg, __C)


from lib.config import cfg_from_file
from plate import *
import sys
import argparse
def parse_args():
    """
    Parse input arguments
    """
    parser = argparse.ArgumentParser(description='Func test ULPR')
    parser.add_argument('--cfg', dest='cfg_file',
                        help='must have a config file', default=None, type=str)
    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)

    args = parser.parse_args()
    return args


def main():
    while True:
        print(test_menu)
        select = input()
        test_op[select]()

test_op = {
    '1': test_plate_detect,
    '2': test_chars_recognize,
    '3': test_plate_recognize,
}

if __name__ == "__main__":
    args = parse_args()
    if args.cfg_file is not None:

# Path: lib/config.py
# def cfg_from_file(filename):
#     """Load a config file and merge it into the default options."""
#     import yaml
#     with open(filename, 'r') as f:
#         yaml_cfg = edict(yaml.load(f))
# 
#     _merge_a_into_b(yaml_cfg, __C)


# Path: func_test.py
from lib.config import cfg_from_file
from plate import *
import sys
import argparse

def parse_args():
    """
    Parse input arguments
    """
    parser = argparse.ArgumentParser(description='Func test ULPR')
    parser.add_argument('--cfg', dest='cfg_file',
                        help='must have a config file', default=None, type=str)
    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)

    args = parser.parse_args()
    return args


def main():
    while True:
        print(test_menu)
        select = input()
        test_op[select]()

test_op = {
    '1': test_plate_detect,
    '2': test_chars_recognize,
    '3': test_plate_recognize,
}

if __name__ == "__main__":
    args = parse_args()
    if args.cfg_file is not None:

        cfg_from_file(args.cfg_file)