cars 1.0.0a1__cp39-cp39-win_amd64.whl → 1.0.0a2__cp39-cp39-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cars might be problematic. Click here for more details.
- cars/__init__.py +6 -6
- cars/applications/dem_generation/dem_generation_wrappers.py +5 -1
- cars/applications/dem_generation/dichotomic_generation_app.py +21 -6
- cars/applications/dem_generation/rasterization_app.py +70 -27
- cars/applications/dense_match_filling/abstract_dense_match_filling_app.py +4 -0
- cars/applications/dense_match_filling/cpp/dense_match_filling_cpp.cp39-win_amd64.dll.a +0 -0
- cars/applications/dense_match_filling/cpp/dense_match_filling_cpp.cp39-win_amd64.pyd +0 -0
- cars/applications/dense_match_filling/fill_disp_algo.py +41 -12
- cars/applications/dense_match_filling/plane_app.py +11 -0
- cars/applications/dense_match_filling/zero_padding_app.py +11 -1
- cars/applications/dense_matching/census_mccnn_sgm_app.py +262 -545
- cars/applications/dense_matching/cpp/dense_matching_cpp.cp39-win_amd64.dll.a +0 -0
- cars/applications/dense_matching/cpp/dense_matching_cpp.cp39-win_amd64.pyd +0 -0
- cars/applications/dense_matching/dense_matching_algo.py +59 -11
- cars/applications/dense_matching/dense_matching_wrappers.py +51 -31
- cars/applications/dense_matching/disparity_grid_algo.py +572 -0
- cars/applications/grid_generation/grid_correction_app.py +0 -53
- cars/applications/grid_generation/transform_grid.py +5 -5
- cars/applications/point_cloud_fusion/pc_fusion_algo.py +17 -11
- cars/applications/point_cloud_fusion/pc_fusion_wrappers.py +3 -4
- cars/applications/rasterization/rasterization_algo.py +20 -27
- cars/applications/rasterization/rasterization_wrappers.py +6 -5
- cars/applications/rasterization/simple_gaussian_app.py +2 -14
- cars/applications/sparse_matching/sparse_matching_wrappers.py +0 -49
- cars/applications/triangulation/line_of_sight_intersection_app.py +1 -1
- cars/applications/triangulation/triangulation_wrappers.py +2 -1
- cars/bundleadjustment.py +51 -11
- cars/cars.py +15 -5
- cars/core/constants.py +1 -1
- cars/core/geometry/abstract_geometry.py +54 -11
- cars/core/geometry/shareloc_geometry.py +59 -14
- cars/orchestrator/registry/saver_registry.py +0 -78
- cars/pipelines/default/default_pipeline.py +23 -26
- cars/pipelines/parameters/depth_map_inputs.py +22 -67
- cars/pipelines/parameters/dsm_inputs.py +16 -29
- cars/pipelines/parameters/sensor_inputs.py +20 -21
- cars/pipelines/parameters/sensor_loaders/basic_sensor_loader.py +3 -3
- cars/pipelines/parameters/sensor_loaders/pivot_sensor_loader.py +2 -2
- cars/pipelines/parameters/sensor_loaders/sensor_loader.py +4 -6
- cars/pipelines/parameters/sensor_loaders/sensor_loader_template.py +2 -2
- cars/pipelines/pipeline.py +8 -8
- cars/pipelines/unit/unit_pipeline.py +103 -196
- cars/starter.py +20 -1
- cars-1.0.0a2.dist-info/DELVEWHEEL +2 -0
- {cars-1.0.0a1.dist-info → cars-1.0.0a2.dist-info}/METADATA +3 -2
- {cars-1.0.0a1.dist-info → cars-1.0.0a2.dist-info}/RECORD +49 -48
- cars-1.0.0a1.dist-info/DELVEWHEEL +0 -2
- {cars-1.0.0a1.dist-info → cars-1.0.0a2.dist-info}/WHEEL +0 -0
- {cars-1.0.0a1.dist-info → cars-1.0.0a2.dist-info}/entry_points.txt +0 -0
- cars.libs/{.load-order-cars-1.0.0a1 → .load-order-cars-1.0.0a2} +1 -1
|
@@ -42,14 +42,14 @@ from cars.pipelines.parameters.sensor_loaders.sensor_loader import SensorLoader
|
|
|
42
42
|
CARS_GEOID_PATH = "geoid/egm96.grd" # Path in cars package (pkg)
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
def sensors_check_inputs(conf,
|
|
45
|
+
def sensors_check_inputs(conf, config_dir=None): # noqa: C901
|
|
46
46
|
"""
|
|
47
47
|
Check the inputs given
|
|
48
48
|
|
|
49
49
|
:param conf: configuration of inputs
|
|
50
50
|
:type conf: dict
|
|
51
|
-
:param
|
|
52
|
-
:type
|
|
51
|
+
:param config_dir: path to dir containing json
|
|
52
|
+
:type config_dir: str
|
|
53
53
|
"""
|
|
54
54
|
|
|
55
55
|
overloaded_conf = conf.copy()
|
|
@@ -74,7 +74,7 @@ def sensors_check_inputs(conf, config_json_dir=None): # noqa: C901
|
|
|
74
74
|
checker_inputs = Checker(inputs_schema)
|
|
75
75
|
checker_inputs.validate(overloaded_conf)
|
|
76
76
|
|
|
77
|
-
check_sensors(conf, overloaded_conf,
|
|
77
|
+
check_sensors(conf, overloaded_conf, config_dir)
|
|
78
78
|
|
|
79
79
|
# Check srtm dir
|
|
80
80
|
check_srtm(overloaded_conf[sens_cst.INITIAL_ELEVATION][sens_cst.DEM_PATH])
|
|
@@ -82,7 +82,7 @@ def sensors_check_inputs(conf, config_json_dir=None): # noqa: C901
|
|
|
82
82
|
return overloaded_conf
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
def check_sensors(conf, overloaded_conf,
|
|
85
|
+
def check_sensors(conf, overloaded_conf, config_dir=None): # noqa: C901
|
|
86
86
|
"""
|
|
87
87
|
Check sensors
|
|
88
88
|
|
|
@@ -116,9 +116,7 @@ def check_sensors(conf, overloaded_conf, config_json_dir=None): # noqa: C901
|
|
|
116
116
|
loader_name = image.get("loader", "basic")
|
|
117
117
|
else:
|
|
118
118
|
raise TypeError(f"Image {image} is not of type str or dict")
|
|
119
|
-
image_loader = SensorLoader(
|
|
120
|
-
loader_name, image, "image", config_json_dir
|
|
121
|
-
)
|
|
119
|
+
image_loader = SensorLoader(loader_name, image, "image", config_dir)
|
|
122
120
|
image_as_pivot_format = (
|
|
123
121
|
image_loader.get_pivot_format() # pylint: disable=E1101
|
|
124
122
|
)
|
|
@@ -153,7 +151,7 @@ def check_sensors(conf, overloaded_conf, config_json_dir=None): # noqa: C901
|
|
|
153
151
|
else:
|
|
154
152
|
raise TypeError(f"Classif {classif} is not of type str or dict")
|
|
155
153
|
classif_loader = SensorLoader(
|
|
156
|
-
loader_name, classif, "classification",
|
|
154
|
+
loader_name, classif, "classification", config_dir
|
|
157
155
|
)
|
|
158
156
|
classif_as_pivot_format = (
|
|
159
157
|
classif_loader.get_pivot_format() # pylint: disable=E1101
|
|
@@ -172,8 +170,8 @@ def check_sensors(conf, overloaded_conf, config_json_dir=None): # noqa: C901
|
|
|
172
170
|
)
|
|
173
171
|
|
|
174
172
|
# Modify to absolute path
|
|
175
|
-
if
|
|
176
|
-
modify_to_absolute_path(
|
|
173
|
+
if config_dir is not None:
|
|
174
|
+
modify_to_absolute_path(config_dir, overloaded_conf)
|
|
177
175
|
|
|
178
176
|
# Check image, msk and color size compatibility
|
|
179
177
|
for sensor_image_key in overloaded_conf[sens_cst.SENSORS]:
|
|
@@ -220,8 +218,8 @@ def check_sensors(conf, overloaded_conf, config_json_dir=None): # noqa: C901
|
|
|
220
218
|
raise RuntimeError("{} not in sensors images".format(key2))
|
|
221
219
|
|
|
222
220
|
# Modify to absolute path
|
|
223
|
-
if
|
|
224
|
-
modify_to_absolute_path(
|
|
221
|
+
if config_dir is not None:
|
|
222
|
+
modify_to_absolute_path(config_dir, overloaded_conf)
|
|
225
223
|
else:
|
|
226
224
|
logging.debug(
|
|
227
225
|
"path of config file was not given,"
|
|
@@ -383,6 +381,7 @@ def generate_geometry_plugin_with_dem(
|
|
|
383
381
|
pairs_for_roi = None
|
|
384
382
|
|
|
385
383
|
# Initialize a second geometry plugin with elevation information
|
|
384
|
+
|
|
386
385
|
geom_plugin_with_dem_and_geoid = (
|
|
387
386
|
AbstractGeometry( # pylint: disable=abstract-class-instantiated
|
|
388
387
|
conf_geom_plugin,
|
|
@@ -396,12 +395,12 @@ def generate_geometry_plugin_with_dem(
|
|
|
396
395
|
return geom_plugin_with_dem_and_geoid
|
|
397
396
|
|
|
398
397
|
|
|
399
|
-
def modify_to_absolute_path(
|
|
398
|
+
def modify_to_absolute_path(config_dir, overloaded_conf):
|
|
400
399
|
"""
|
|
401
400
|
Modify input file path to absolute path
|
|
402
401
|
|
|
403
|
-
:param
|
|
404
|
-
:type
|
|
402
|
+
:param config_dir: directory of the json configuration
|
|
403
|
+
:type config_dir: str
|
|
405
404
|
:param overloaded_conf: overloaded configuration json
|
|
406
405
|
:dict overloaded_conf: dict
|
|
407
406
|
"""
|
|
@@ -414,11 +413,11 @@ def modify_to_absolute_path(config_json_dir, overloaded_conf):
|
|
|
414
413
|
]:
|
|
415
414
|
if isinstance(sensor_image[tag], dict):
|
|
416
415
|
sensor_image[tag]["path"] = make_relative_path_absolute(
|
|
417
|
-
sensor_image[tag]["path"],
|
|
416
|
+
sensor_image[tag]["path"], config_dir
|
|
418
417
|
)
|
|
419
418
|
elif sensor_image[tag] is not None:
|
|
420
419
|
sensor_image[tag] = make_relative_path_absolute(
|
|
421
|
-
sensor_image[tag],
|
|
420
|
+
sensor_image[tag], config_dir
|
|
422
421
|
)
|
|
423
422
|
for tag in [
|
|
424
423
|
sens_cst.INPUT_IMG,
|
|
@@ -429,14 +428,14 @@ def modify_to_absolute_path(config_json_dir, overloaded_conf):
|
|
|
429
428
|
sensor_image[tag]["bands"][band]["path"] = (
|
|
430
429
|
make_relative_path_absolute(
|
|
431
430
|
sensor_image[tag]["bands"][band]["path"],
|
|
432
|
-
|
|
431
|
+
config_dir,
|
|
433
432
|
)
|
|
434
433
|
)
|
|
435
434
|
|
|
436
435
|
if overloaded_conf[sens_cst.ROI] is not None:
|
|
437
436
|
if isinstance(overloaded_conf[sens_cst.ROI], str):
|
|
438
437
|
overloaded_conf[sens_cst.ROI] = make_relative_path_absolute(
|
|
439
|
-
overloaded_conf[sens_cst.ROI],
|
|
438
|
+
overloaded_conf[sens_cst.ROI], config_dir
|
|
440
439
|
)
|
|
441
440
|
|
|
442
441
|
for tag in [sens_cst.DEM_PATH, sens_cst.GEOID]:
|
|
@@ -447,7 +446,7 @@ def modify_to_absolute_path(config_json_dir, overloaded_conf):
|
|
|
447
446
|
overloaded_conf[sens_cst.INITIAL_ELEVATION][tag] = (
|
|
448
447
|
make_relative_path_absolute(
|
|
449
448
|
overloaded_conf[sens_cst.INITIAL_ELEVATION][tag],
|
|
450
|
-
|
|
449
|
+
config_dir,
|
|
451
450
|
)
|
|
452
451
|
)
|
|
453
452
|
|
|
@@ -53,7 +53,7 @@ class BasicSensorLoader(SensorLoaderTemplate):
|
|
|
53
53
|
"""
|
|
54
54
|
if isinstance(conf, str):
|
|
55
55
|
overloaded_conf = {}
|
|
56
|
-
image_path = make_relative_path_absolute(conf, self.
|
|
56
|
+
image_path = make_relative_path_absolute(conf, self.config_dir)
|
|
57
57
|
overloaded_conf["path"] = image_path
|
|
58
58
|
overloaded_conf["loader"] = "basic"
|
|
59
59
|
if self.input_type == "image":
|
|
@@ -63,7 +63,7 @@ class BasicSensorLoader(SensorLoaderTemplate):
|
|
|
63
63
|
elif isinstance(conf, dict):
|
|
64
64
|
overloaded_conf = conf.copy()
|
|
65
65
|
image_path = make_relative_path_absolute(
|
|
66
|
-
conf["path"], self.
|
|
66
|
+
conf["path"], self.config_dir
|
|
67
67
|
)
|
|
68
68
|
overloaded_conf["path"] = image_path
|
|
69
69
|
overloaded_conf["loader"] = conf.get("loader", "basic")
|
|
@@ -103,6 +103,6 @@ class BasicSensorLoader(SensorLoaderTemplate):
|
|
|
103
103
|
}
|
|
104
104
|
pivot_config["texture_bands"] = None
|
|
105
105
|
pivot_sensor_loader = PivotSensorLoader(
|
|
106
|
-
pivot_config, self.input_type, self.
|
|
106
|
+
pivot_config, self.input_type, self.config_dir
|
|
107
107
|
)
|
|
108
108
|
self.pivot_format = pivot_sensor_loader.get_pivot_format()
|
|
@@ -53,7 +53,7 @@ class PivotSensorLoader(SensorLoaderTemplate):
|
|
|
53
53
|
for band in overloaded_conf["bands"]:
|
|
54
54
|
overloaded_conf["bands"][band]["path"] = (
|
|
55
55
|
make_relative_path_absolute(
|
|
56
|
-
overloaded_conf["bands"][band]["path"], self.
|
|
56
|
+
overloaded_conf["bands"][band]["path"], self.config_dir
|
|
57
57
|
)
|
|
58
58
|
)
|
|
59
59
|
# Check consistency between files
|
|
@@ -92,7 +92,7 @@ class PivotSensorLoader(SensorLoaderTemplate):
|
|
|
92
92
|
]
|
|
93
93
|
else:
|
|
94
94
|
overloaded_conf["main_file"] = make_relative_path_absolute(
|
|
95
|
-
overloaded_conf["main_file"], self.
|
|
95
|
+
overloaded_conf["main_file"], self.config_dir
|
|
96
96
|
)
|
|
97
97
|
overloaded_conf["texture_bands"] = conf.get("texture_bands", None)
|
|
98
98
|
if overloaded_conf["texture_bands"] is not None:
|
|
@@ -39,7 +39,7 @@ class SensorLoader:
|
|
|
39
39
|
available_loaders = {}
|
|
40
40
|
|
|
41
41
|
def __new__(
|
|
42
|
-
cls, app_name: str, cfg: dict, input_type: str,
|
|
42
|
+
cls, app_name: str, cfg: dict, input_type: str, config_dir: str
|
|
43
43
|
):
|
|
44
44
|
"""
|
|
45
45
|
Return the instance of sensor loader associated with the sensor loader
|
|
@@ -51,12 +51,10 @@ class SensorLoader:
|
|
|
51
51
|
:type cfg: dictionary
|
|
52
52
|
"""
|
|
53
53
|
|
|
54
|
-
return cls.create_app(app_name, cfg, input_type,
|
|
54
|
+
return cls.create_app(app_name, cfg, input_type, config_dir)
|
|
55
55
|
|
|
56
56
|
@classmethod
|
|
57
|
-
def create_app(
|
|
58
|
-
cls, name: str, cfg: dict, input_type: str, config_json_dir: str
|
|
59
|
-
):
|
|
57
|
+
def create_app(cls, name: str, cfg: dict, input_type: str, config_dir: str):
|
|
60
58
|
"""
|
|
61
59
|
Factory command to create the sensor loader
|
|
62
60
|
Return the instance of sensor loader associated with the sensor loader
|
|
@@ -74,7 +72,7 @@ class SensorLoader:
|
|
|
74
72
|
except KeyError:
|
|
75
73
|
logging.error("No sensor loader named {0} supported".format(name))
|
|
76
74
|
return None
|
|
77
|
-
loader = loader_class(cfg, input_type,
|
|
75
|
+
loader = loader_class(cfg, input_type, config_dir)
|
|
78
76
|
return loader
|
|
79
77
|
|
|
80
78
|
@classmethod
|
|
@@ -30,7 +30,7 @@ class SensorLoaderTemplate:
|
|
|
30
30
|
Class for general specification of a sensor loader
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
|
-
def __init__(self, conf, input_type,
|
|
33
|
+
def __init__(self, conf, input_type, config_dir):
|
|
34
34
|
"""
|
|
35
35
|
Init function of SensorLoaderTemplate
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ class SensorLoaderTemplate:
|
|
|
38
38
|
:param input_type: type of input : image or classification
|
|
39
39
|
"""
|
|
40
40
|
self.input_type = input_type
|
|
41
|
-
self.
|
|
41
|
+
self.config_dir = config_dir
|
|
42
42
|
self.used_config = self.check_conf(conf)
|
|
43
43
|
|
|
44
44
|
self.pivot_format = None
|
cars/pipelines/pipeline.py
CHANGED
|
@@ -43,7 +43,7 @@ class Pipeline:
|
|
|
43
43
|
cls,
|
|
44
44
|
pipeline_name: str,
|
|
45
45
|
cfg: Dict[str, Union[str, int]],
|
|
46
|
-
|
|
46
|
+
config_dir,
|
|
47
47
|
):
|
|
48
48
|
"""
|
|
49
49
|
Return the instance of pipeline associated with the pipeline
|
|
@@ -53,15 +53,15 @@ class Pipeline:
|
|
|
53
53
|
:type pipeline_name: str
|
|
54
54
|
:param cfg: configuration {'matching_cost_method': value}
|
|
55
55
|
:type cfg: dictionary
|
|
56
|
-
:param
|
|
57
|
-
:type
|
|
56
|
+
:param config_dir: path to dir containing json or yaml file
|
|
57
|
+
:type config_dir: str
|
|
58
58
|
"""
|
|
59
59
|
|
|
60
|
-
return cls.create_pipeline(pipeline_name, cfg,
|
|
60
|
+
return cls.create_pipeline(pipeline_name, cfg, config_dir)
|
|
61
61
|
|
|
62
62
|
@classmethod
|
|
63
63
|
def create_pipeline(
|
|
64
|
-
cls, name: str, cfg: Dict[str, Union[str, int]],
|
|
64
|
+
cls, name: str, cfg: Dict[str, Union[str, int]], config_dir
|
|
65
65
|
):
|
|
66
66
|
"""Factory command to create the pipeline
|
|
67
67
|
Return the instance of pipeline associated with the pipeline
|
|
@@ -71,8 +71,8 @@ class Pipeline:
|
|
|
71
71
|
:type pipeline_name: str
|
|
72
72
|
:param cfg: cars input configuration
|
|
73
73
|
:type cfg: dictionary
|
|
74
|
-
:param
|
|
75
|
-
:type
|
|
74
|
+
:param config_dir: path to dir containing json
|
|
75
|
+
:type config_dir: str
|
|
76
76
|
"""
|
|
77
77
|
|
|
78
78
|
pipeline = None
|
|
@@ -85,7 +85,7 @@ class Pipeline:
|
|
|
85
85
|
"No pipeline named {0} supported".format(name)
|
|
86
86
|
) from kerr
|
|
87
87
|
|
|
88
|
-
pipeline = pipeline_class(cfg,
|
|
88
|
+
pipeline = pipeline_class(cfg, config_dir)
|
|
89
89
|
|
|
90
90
|
return pipeline
|
|
91
91
|
|