Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -77,7 +77,7 @@ dice_loss = sm.losses.DiceLoss(class_weights = weights)
|
|
| 77 |
focal_loss = sm.losses.CategoricalFocalLoss()
|
| 78 |
total_loss = dice_loss + (1 * focal_loss)
|
| 79 |
|
| 80 |
-
satellite_model = tf.keras.models.load_model("satellite_segmentation_v3_full
|
| 81 |
|
| 82 |
def process_input_image(image_source):
|
| 83 |
image = np.expand_dims(image_source, 0)
|
|
|
|
| 77 |
focal_loss = sm.losses.CategoricalFocalLoss()
|
| 78 |
total_loss = dice_loss + (1 * focal_loss)
|
| 79 |
|
| 80 |
+
satellite_model = tf.keras.models.load_model("satellite_segmentation_v3_full", custom_objects=({'dice_loss_plus_1focal_loss': total_loss, 'jaccard_coef': jaccard_coef}))
|
| 81 |
|
| 82 |
def process_input_image(image_source):
|
| 83 |
image = np.expand_dims(image_source, 0)
|