-
Notifications
You must be signed in to change notification settings - Fork 9
/
run.py
executable file
·69 lines (61 loc) · 2.8 KB
/
run.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/python
import os
from pipes import quote
from opendm import log
from opendm import config
from opendm import system
from opendm import io
from opendm.progress import progressbc
from stages.dataset import DatasetStage
from stages.colmap import FeaturesStage, MatchingStage, SparseStage, GeoregisterStage, DenseStage
from stages.mesh import MeshStage
from stages.mvstex import TextureStage
from stages.dem import DEMStage
from stages.ortho import OrthoStage
from stages.georeferencing import GeoreferencingStage
if __name__ == '__main__':
args = config.config()
log.ODM_INFO('Initializing NodeCM app - %s' % system.now())
log.ODM_INFO(args)
if args.rerun_all:
log.ODM_INFO("Rerun all -- Removing old data")
os.system("rm -rf " +
" ".join([
quote(os.path.join(args.project_path, "dense")),
quote(os.path.join(args.project_path, "database.db")),
quote(os.path.join(args.project_path, "odm_dem")),
quote(os.path.join(args.project_path, "odm_georeferencing")),
quote(os.path.join(args.project_path, "odm_meshing")),
quote(os.path.join(args.project_path, "odm_texturing")),
quote(os.path.join(args.project_path, "entwine_pointcloud")),
quote(os.path.join(args.project_path, "odm_orthophoto")),
]))
progressbc.set_project_name(os.path.basename(args.project_path))
# Initializes the application and defines the pipeline stages
dataset = DatasetStage('dataset', args, progress=5.0)
features = FeaturesStage('features', args, progress=10.0)
matching = MatchingStage('matching', args, progress=15.0)
sparse = SparseStage('sparse', args, progress=30.0)
georegister = GeoregisterStage('georegister', args, progress=32.0)
dense = DenseStage('dense', args, progress=60.0)
georeferencing = GeoreferencingStage('georeferencing', args, progress=65.0)
dem = DEMStage('dem', args, progress=68.0)
mesh = MeshStage('mesh', args, progress=75.0)
texture = TextureStage('texture', args, progress=90.0)
ortho = OrthoStage('ortho', args, progress=100.0)
# Normal pipeline
dataset.connect(features) \
.connect(matching) \
.connect(sparse) \
.connect(georegister) \
.connect(dense) \
.connect(georeferencing) \
.connect(dem) \
.connect(mesh) \
.connect(texture) \
.connect(ortho)
# dataset.connect(split) \
dataset.run()
log.ODM_INFO("***************************************************")
log.ODM_INFO("NodeCM has ended! Woohoo! %s" % system.now())
log.ODM_INFO("***************************************************")