Enhancements to process images through PIL and also add RESNET50B

This commit is contained in:
2024-08-01 17:28:00 -04:00
parent c568cb8aaa
commit e69c8cd287
2 changed files with 72 additions and 23 deletions

View File

@@ -38,7 +38,7 @@ from matplotlib import pyplot
import numpy as np
import tensorflow
def resnet50(input_shape,classes):
def resnet50(input_shape,classes,model_name='resnet50'):
x_input=keras.Input(input_shape)
x=Conv2D(64,(7,7),strides=(2,2),name='conv1')(x_input)
@@ -74,7 +74,7 @@ def resnet50(input_shape,classes):
x=Dense(classes,activation='sigmoid',name='fc'+str(classes))(x)
else:
x=Dense(classes,activation='softmax',name='fc'+str(classes))(x)
model=keras.Model(inputs=x_input,outputs=x,name='resnet50')
model=keras.Model(inputs=x_input,outputs=x,name=model_name)
return model