following model change
Browse files
app.py
CHANGED
|
@@ -70,7 +70,8 @@ def damage_classification(SEM_image,image_threshold, model1_threshold, model2_th
|
|
| 70 |
images_model1 = utils.prepare_classifier_input(SEM_image, all_centroids, window_size=model1_windowsize)
|
| 71 |
|
| 72 |
logging.debug('---------------: run model 1 :=====================')
|
| 73 |
-
y1_pred = model1.predict(np.asarray(images_model1, float))
|
|
|
|
| 74 |
|
| 75 |
logging.debug('---------------: model1 threshold :=====================')
|
| 76 |
inclusions = y1_pred[:,0].reshape(len(y1_pred),1)
|
|
@@ -103,7 +104,8 @@ def damage_classification(SEM_image,image_threshold, model1_threshold, model2_th
|
|
| 103 |
logging.debug(images_model2)
|
| 104 |
|
| 105 |
logging.debug('---------------: run model 2 :=====================')
|
| 106 |
-
y2_pred = model2.predict(np.asarray(images_model2, float))
|
|
|
|
| 107 |
|
| 108 |
damage_index = np.asarray(y2_pred > model2_threshold).nonzero()
|
| 109 |
|
|
|
|
| 70 |
images_model1 = utils.prepare_classifier_input(SEM_image, all_centroids, window_size=model1_windowsize)
|
| 71 |
|
| 72 |
logging.debug('---------------: run model 1 :=====================')
|
| 73 |
+
#y1_pred = model1.predict(np.asarray(images_model1, float))
|
| 74 |
+
y1_pred = model1(np.asarray(images_model1, float))
|
| 75 |
|
| 76 |
logging.debug('---------------: model1 threshold :=====================')
|
| 77 |
inclusions = y1_pred[:,0].reshape(len(y1_pred),1)
|
|
|
|
| 104 |
logging.debug(images_model2)
|
| 105 |
|
| 106 |
logging.debug('---------------: run model 2 :=====================')
|
| 107 |
+
#y2_pred = model2.predict(np.asarray(images_model2, float))
|
| 108 |
+
y2_pred = model2(np.asarray(images_model2, float))
|
| 109 |
|
| 110 |
damage_index = np.asarray(y2_pred > model2_threshold).nonzero()
|
| 111 |
|