iSushant commited on
Commit
c455ae0
·
verified ·
1 Parent(s): 2e137d9

Upload 3 files

Browse files
Files changed (3) hide show
  1. metrics.py +14 -0
  2. model.h5 +3 -0
  3. requirements.txt +4 -0
metrics.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import numpy as np
3
+ import tensorflow as tf
4
+ from tensorflow.keras import backend as K
5
+
6
+ smooth = 1e-15
7
+ def dice_coef(y_true, y_pred):
8
+ y_true = tf.keras.layers.Flatten()(y_true)
9
+ y_pred = tf.keras.layers.Flatten()(y_pred)
10
+ intersection = tf.reduce_sum(y_true * y_pred)
11
+ return (2. * intersection + smooth) / (tf.reduce_sum(y_true) + tf.reduce_sum(y_pred) + smooth)
12
+
13
+ def dice_loss(y_true, y_pred):
14
+ return 1.0 - dice_coef(y_true, y_pred)
model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e5e8d360f3a8491706de152a15faa88c9cb7c9152481ec4560e1bb457421b94
3
+ size 372932920
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ streamlit
2
+ opencv-python
3
+ matplotlib
4
+ tensorflow==2.15.0