kerzel commited on
Commit
b94e2bc
·
1 Parent(s): 3c5471d

change to TFSMLayer for legacy models

Browse files
.gitattributes CHANGED
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.png filter=lfs diff=lfs merge=lfs -text
37
  *.keras filter=lfs diff=lfs merge=lfs -text
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.png filter=lfs diff=lfs merge=lfs -text
37
  *.keras filter=lfs diff=lfs merge=lfs -text
38
+ *.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -11,6 +11,14 @@ import logging
11
  logging.getLogger().setLevel(logging.INFO)
12
 
13
  from tensorflow import keras
 
 
 
 
 
 
 
 
14
 
15
  #image_threshold = 20
16
 
@@ -23,7 +31,8 @@ DEFAULT_IMAGE_PATH = "SE_001_cut.png"
23
  model1_windowsize = [250,250]
24
  #model1_threshold = 0.7
25
 
26
- model1 = keras.models.load_model('rwthmaterials_dp800_network1_inclusion.keras')
 
27
  #model1.compile()
28
 
29
  damage_classes = {3: "Martensite",2: "Interface",0:"Notch",1:"Shadowing"}
@@ -31,7 +40,8 @@ damage_classes = {3: "Martensite",2: "Interface",0:"Notch",1:"Shadowing"}
31
  model2_windowsize = [100,100]
32
  #model2_threshold = 0.5
33
 
34
- model2 = keras.models.load_model('rwthmaterials_dp800_network2_damage.keras')
 
35
  #model2.compile()
36
 
37
 
 
11
  logging.getLogger().setLevel(logging.INFO)
12
 
13
  from tensorflow import keras
14
+ #import keras
15
+ # print(keras.__version__)
16
+ # print(keras.__file__)
17
+
18
+ from keras.layers import TFSMLayer
19
+
20
+
21
+
22
 
23
  #image_threshold = 20
24
 
 
31
  model1_windowsize = [250,250]
32
  #model1_threshold = 0.7
33
 
34
+ #model1 = keras.models.load_model('rwthmaterials_dp800_network1_inclusion_converted.h5')
35
+ model1 = TFSMLayer('rwthmaterials_dp800_network1_inclusion', call_endpoint='serving_default')
36
  #model1.compile()
37
 
38
  damage_classes = {3: "Martensite",2: "Interface",0:"Notch",1:"Shadowing"}
 
40
  model2_windowsize = [100,100]
41
  #model2_threshold = 0.5
42
 
43
+ #model2 = keras.models.load_model('rwthmaterials_dp800_network2_damage_converted.h5')
44
+ model2 = TFSMLayer('rwthmaterials_dp800_network2_damage', call_endpoint='serving_default')
45
  #model2.compile()
46
 
47
 
rwthmaterials_dp800_network1_inclusion.tgz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d843991369e131a8c64ba940af0fe20153bfce7007ea9c7cbec72d0a51840f41
3
+ size 80797599
rwthmaterials_dp800_network1_inclusion/fingerprint.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57b8d8b676d4741833a4beb4ada458f5c1a28e9b1f863f3f0fdd6d8855ce5978
3
+ size 59
rwthmaterials_dp800_network1_inclusion/keras_metadata.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31748d6ef966ff219c619426c0a8abaa1119ff3fb94ec82780ecd6f172e1bc0c
3
+ size 996985
rwthmaterials_dp800_network1_inclusion/saved_model.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c68a435188d78853d9f5e39d8f496204f36a8e03beb471013f3af4e4b1b5d538
3
+ size 4482438
rwthmaterials_dp800_network1_inclusion/variables/variables.data-00000-of-00001 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f65b218b3718aac76d545ebef2d6a6ef9b4c2d7e22e7885bc3dd91836563f5ca
3
+ size 87475223
rwthmaterials_dp800_network1_inclusion/variables/variables.index ADDED
Binary file (21.7 kB). View file
 
rwthmaterials_dp800_network1_inclusion_converted.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c60b8f982fdecb38d644e54bfc9adc87a4461b5e96815847aa7a48f8479ac78
3
+ size 87796432
rwthmaterials_dp800_network2_damage.tgz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0b85a55ba6f970661ae81eb14063dd157538d310ca4aa3288e9f263f58b6749
3
+ size 80796486
rwthmaterials_dp800_network2_damage/fingerprint.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42b75267132948545aba844b272093f741daea371271c5adca0122be1bfb91cf
3
+ size 59
rwthmaterials_dp800_network2_damage/keras_metadata.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31748d6ef966ff219c619426c0a8abaa1119ff3fb94ec82780ecd6f172e1bc0c
3
+ size 996985
rwthmaterials_dp800_network2_damage/saved_model.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8644d5da2015e6a2ce6fd4181ede406e98171e7fa170ab256411a639b1bbb014
3
+ size 4482600
rwthmaterials_dp800_network2_damage/variables/variables.data-00000-of-00001 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f65b218b3718aac76d545ebef2d6a6ef9b4c2d7e22e7885bc3dd91836563f5ca
3
+ size 87475223
rwthmaterials_dp800_network2_damage/variables/variables.index ADDED
Binary file (21.7 kB). View file
 
rwthmaterials_dp800_network2_damage_converted.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c60b8f982fdecb38d644e54bfc9adc87a4461b5e96815847aa7a48f8479ac78
3
+ size 87796432