Allow different thresholds per features

This commit is contained in:
Florent Guiotte 2020-05-31 17:57:58 +02:00
parent 06357dc873
commit 8eed99109b

View File

@ -28,9 +28,10 @@ def run(gt, rasters, coords, remove, attributes, adjacency='4', filtering='direc
for i, (gti, rastersi, coordsi) in enumerate(zip(gt, rasters, coords)): for i, (gti, rastersi, coordsi) in enumerate(zip(gt, rasters, coords)):
# Compute EAP # Compute EAP
attributes = [attributes] * len(rastersi) if isinstance(attributes, dict) else attributes
eap = [] eap = []
for name, raster in rastersi.items(): for (name, raster), attribute in zip(rastersi.items(), attributes):
eap += [_attribute_profiles(raster, attributes, adjacency, name, filtering)] eap += [_attribute_profiles(raster, attribute, adjacency, name, filtering)]
eap = sap.concatenate(eap) eap = sap.concatenate(eap)
Xn = [' '.join((a['tree']['image_name'], Xn = [' '.join((a['tree']['image_name'],