Beispiel #1
0
                mb_records.append(record)
        else:
            raise Exception(
                "Unimplemented save type: " + str(config.test_save_type))
    if config.test_save_type == 'motherboard': #'coco':
        save_file.write(json.dumps(mb_records))

    save_file.close()
    return save_filename


def make_parser():
    parser = argparse.ArgumentParser('test network')
    parser.add_argument(
        '-d', '--devices', default='0', type=str, help='device for testing')
    parser.add_argument(
        '--show_image', '-s', default=False, action='store_true')
    parser.add_argument('--start_epoch', '-se', default=1, type=int)
    parser.add_argument('--end_epoch', '-ee', default=-1, type=int)
    return parser


if __name__ == '__main__':
    parser = make_parser()
    args = parser.parse_args()
    args.devices = misc.parse_devices(args.devices)
    if args.end_epoch == -1:
        args.end_epoch = args.start_epoch

    eval_all(args)
Beispiel #2
0
                coco_records.append(record)
        else:
            raise Exception(
                "Unimplemented save type: " + str(config.test_save_type))
    if config.test_save_type == 'coco':
        save_file.write(json.dumps(coco_records))

    save_file.close()
    return save_filename


def make_parser():
    parser = argparse.ArgumentParser('test network')
    parser.add_argument(
        '-d', '--devices', default='0', type=str, help='device for testing')
    parser.add_argument(
        '--show_image', '-s', default=False, action='store_true')
    parser.add_argument('--start_epoch', '-se', default=1, type=int)
    parser.add_argument('--end_epoch', '-ee', default=-1, type=int)
    return parser


if __name__ == '__main__':
    parser = make_parser()
    args = parser.parse_args()
    args.devices = misc.parse_devices(args.devices)
    if args.end_epoch == -1:
        args.end_epoch = args.start_epoch

    eval_all(args)