-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (28 loc) · 980 Bytes
/
Copy pathmain.py
File metadata and controls
34 lines (28 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os, glob
import tensorflow as tf
from jarvis.utils import io
from jarvis.utils.general import tools as jtools
from jarvis.auto.predict import JarvisPipeline
def run(data='/data', main='./main.py', verbose='1', **kwargs):
# --- Set verbose
tf.autograph.set_verbosity(0)
# --- Set Jarvis paths
code = os.path.abspath(os.path.dirname(main))
jtools.set_paths(code, project_id='flame')
# --- Set arrs / sids
arrs = sorted(glob.glob('{}/*/*.tif'.format(data)))
sids = [a.split('/')[-2].replace('.tif', '') for a in arrs]
# --- Create pipeline
pipeline = JarvisPipeline(
yml='{}/comp/ymls/db-v05.yml'.format(code),
ignore_proc=True,
save_funcs=io.save_funcs)
# --- Run pipeline
db = pipeline.run(
arrs=arrs,
sids=sids,
cols=['hst-raw', 'rpn-raw', 'fpr-raw', 'msk-png'],
output_dir=data,
stepwise=True,
skip_existing=False,
align_with=False)