Exemplo n.º 1
0
    subprocess.call(
        "cd  /home/andrew/code/tmp/facedet-profile && rm -rf cache",
        shell=True)
    subprocess.check_output(
        "cd /home/andrew/code/tmp/facedet-profile  && python3 get_roc.py > {}/log.txt"
        .format(directory),
        shell=True)
    print("copyinig")
    src = "/home/andrew/code/tmp/facedet-profile/roc.png"
    dst = "{}/{}-roc.png".format(directory, version)
    time.sleep(0.5)
    shutil.copyfile(src, dst)

if options.test_type != 'verify':
    values = "{0}{1}{2}-values.csv".format(directory, os.sep, version)
    maps = data_common.concat_file(new_result, file_name, sep=',')
    data_common.output_file(values, maps)

if options.test_type == 'liveness':
    new_result_ = "{0}{1}{2}-result_.csv".format(directory, os.sep, version)
    shutil.copyfile(result, new_result_)
    cmd = "sed -i  's#-1#1#' {}".format(new_result_)
    subprocess.call(cmd, shell=True)
    time.sleep(3)

    if options.data_type == 'base':
        replace = '/home/andrew/code/data/tof/base_test_data/vivo-liveness/'
    else:
        replace = ''
    servers.get_liveness_server_result(new_result,
                                       file_name,
Exemplo n.º 2
0
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author:    xurongzhong#126.com 
# CreateDate: 2018-3-31

import os
import argparse
from pathlib import Path

import data_common 

parser = argparse.ArgumentParser()
parser.add_argument('file1', action="store")
parser.add_argument('file2', action='store', help='测试类型')
parser.add_argument('-s', action='store', dest='sep', default=' ',
                    help='分隔符')
parser.add_argument('--version', action='version',
                    version='%(prog)s 1.0 Rongzhong xu 2018 03 31')
options = parser.parse_args()

new = data_common.concat_file(options.file1,options.file2,options.sep)
data_common.output_file(options.file1, new)