-
Notifications
You must be signed in to change notification settings - Fork 0
/
new_predict.py
28 lines (19 loc) · 845 Bytes
/
new_predict.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from all import *
import matplotlib.pyplot as plt
################################ Predict Single Image ######################
out_single = predict(
inp="Images/images_test/4_resized.png",
out_fname="Images/out_pre.png",
checkpoints_path = "Images/checkpoint/vgg_unet_1"
)
plt.imshow(out_single)
plt.show()
################################ Predict Complete test Folder and saving output ######################
out_folder = predict_multiple(
inp_dir="Images/images_test/",
out_dir="Images/out/",
checkpoints_path = "Images/checkpoint/vgg_unet_1"
)
########################## Evaluating the model #####################
model = vgg_unet(n_classes=200 , input_height=416, input_width=608 )
print(model.evaluate_segmentation( inp_images_dir="Images/images_test/" , annotations_dir="Images/annotation_test/" ) )