-
Notifications
You must be signed in to change notification settings - Fork 0
/
spyder.py.txt
18 lines (15 loc) · 871 Bytes
/
spyder.py.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from keras.models import load_model
from keras.preprocessing import image
from keras.applications.vgg16 import preprocess_input
import numpy as np
model = load_model('C:\Users\MCHOME\Desktop\PBL B5\PBL_VGG16\\model_vgg16.h5')
img=image.load_img('E:\\chest_xray\\val\\NORMAL\\NORMAL2-IM1431-0001.jpeg',target_size=(224,224))
x=image.img_to_array(img)
x=np.expand_dims(x,axis=0)
img_data=preprocess_input(x)
classes=model.predict(img_data)
#model = load_model('C:\Users\MCHOME\Desktop\PBL B5\PBL_DenseNet121\\model_densenet121.h5')
#model = load_model('C:\Users\MCHOME\Desktop\PBL B5\PBL_InceptionV3\\model_inceptionV3.h5')
#model = load_model('C:\Users\MCHOME\Desktop\PBL B5\PBL_Resnet50\\model_resnet50.h5')
#model = load_model('C:\Users\MCHOME\Desktop\PBL B5\PBL_VGG16\\model_vgg16.h5')
#model = load_model('C:\Users\MCHOME\Desktop\PBL B5\PBL_VGG19\\model_vgg19.h5')