Commit b7c97332 authored by Christoph Sommer's avatar Christoph Sommer

add ntiles parameter for cmd line

parent 240266dc
import os
import sys
import json
import glob
import time
......@@ -436,9 +437,11 @@ def predict(files, n_tiles=(1,4,4), params=params):
'unit' : unit})
def cmd_line():
import argparse
from matplotlib import pyplot as plt
parser = argparse.ArgumentParser(description=description)
parser.add_argument('--n2v_project', type=str, nargs=1, help="BIF noise2void project file (.json)")
parser.add_argument('files', type=str, nargs="*", help="Files to process with noise2void")
parser.add_argument('--ntiles', nargs=3, type=int, default=[1, 8, 8])
args = parser.parse_args()
params.load(args.n2v_project[0])
......@@ -446,11 +449,14 @@ def cmd_line():
print("-"*50)
for k, v in params.items():
print("{:25s}: {}".format(k,v))
print("n-tiles:", args.ntiles)
print("\n")
files = args.files
if len(files) == 0:
files = None
train_predict(params=params, files=files)
plt.ion()
train_predict(params=params, files=files, n_tiles=tuple(args.ntiles))
sys.exit(0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment