Пример #1
0
import os
from subprocess import check_call
from funlib.run import run, run_singularity
import logging
import scipy.interpolate.interpnd # Workaround for cython __reduce_cython__ error
from micron import read_predict_config, read_worker_config, read_data_config, read_graph_config, read_solve_config

predict_config = read_predict_config("predict_config.ini")
worker_config = read_worker_config("worker_config.ini")
data_config = read_data_config("data_config.ini")
graph_config = read_graph_config("graph_config.ini")
solve_config = read_solve_config("solve_config.ini")

base_cmd = "python {} {} {} {} {} {}".format(solve_config["daisy_solve"],
                                             os.path.abspath("predict_config.ini"),
                                             os.path.abspath("worker_config.ini"),
                                             os.path.abspath("data_config.ini"),
                                             os.path.abspath("graph_config.ini"),
                                             os.path.abspath("solve_config.ini"))

check_call(base_cmd, shell=True)
Пример #2
0
    return 0


if __name__ == "__main__":
    #logger = logging.getLogger("daisy")
    #logger.setLevel(logging.DEBUG)

    predict_config = sys.argv[1]
    worker_config = sys.argv[2]
    data_config = sys.argv[3]
    graph_config = sys.argv[4]

    predict_config_dict = read_predict_config(predict_config)
    worker_config_dict = read_worker_config(worker_config)
    data_config_dict = read_data_config(data_config)
    graph_config_dict = read_graph_config(graph_config)

    full_config = predict_config_dict
    full_config.update(worker_config_dict)
    full_config.update(data_config_dict)
    full_config.update(graph_config_dict)

    full_config["soft_mask_container"] = data_config_dict["out_container"]
    full_config["soft_mask_dataset"] = data_config_dict["out_dataset"]
    full_config["roi_offset"] = data_config_dict["in_offset"]
    full_config["roi_size"] = data_config_dict["in_size"]

    start_time = time.time()
    extract_edges(**full_config)
    print(time.time() - start_time)