medid_1_fracture / model.py
kumar989's picture
Update model.py
28d2d38
raw
history blame contribute delete
414 Bytes
import cv2
import numpy as np
import tensorflow as tf
def bone_frac(img):
img = cv2.resize(img,(224,224))
model = tf.keras.models.load_model("best_model.h5")
result = model.predict(np.array([img]))
op=""
if result[0]<0.5:
op="Normal"
return op
# img = cv2.imread(r"C:\Users\kumar\Downloads\WhatsApp Image 2023-04-17 at 7.20.40 PM.jpeg")
# print(bone_frac(img))
# # bone_frac(img)