Spaces:
Sleeping
Sleeping
Guillermo Uribe Vicencio
commited on
Commit
·
0420d82
1
Parent(s):
72d6082
app.py
CHANGED
@@ -57,7 +57,7 @@ cdl_color_map = [{'value': 1, 'label': 'Natural vegetation', 'rgb': (233,255,190
|
|
57 |
{'value': 12, 'label': 'Sorghum', 'rgb':(255,158,15), 'qtt': 0},
|
58 |
{'value': 13, 'label': 'Other', 'rgb':(0,175,77), 'qtt': 0}]
|
59 |
|
60 |
-
def apply_color_map(rgb, color_map
|
61 |
|
62 |
rgb_mapped = rgb.copy()
|
63 |
|
@@ -214,7 +214,7 @@ def inference_on_file(target_image, model, custom_test_pipeline, map_resume):
|
|
214 |
output = np.vstack([output[None], output[None], output[None]]).astype(np.uint8)
|
215 |
|
216 |
|
217 |
-
output=apply_color_map(output).transpose((1,2,0)
|
218 |
|
219 |
return rgb1,rgb2,rgb3,output
|
220 |
|
|
|
57 |
{'value': 12, 'label': 'Sorghum', 'rgb':(255,158,15), 'qtt': 0},
|
58 |
{'value': 13, 'label': 'Other', 'rgb':(0,175,77), 'qtt': 0}]
|
59 |
|
60 |
+
def apply_color_map(rgb, color_map, map_resume):
|
61 |
|
62 |
rgb_mapped = rgb.copy()
|
63 |
|
|
|
214 |
output = np.vstack([output[None], output[None], output[None]]).astype(np.uint8)
|
215 |
|
216 |
|
217 |
+
output=apply_color_map(output,map_resume).transpose((1,2,0))
|
218 |
|
219 |
return rgb1,rgb2,rgb3,output
|
220 |
|