Views
No views yet

1git clone https://huggingface.co/alokpandey/DermaNet
2cd DermaNetpip install -r requirements.txtDermaNet.h5. You can load it as follows:1from tensorflow.keras.models import load_model
2model = load_model('DermaNet.h5')1from tensorflow.keras.preprocessing import image
2import numpy as np
3
4img_path = 'path_to_image.jpg'
5img = image.load_img(img_path, target_size=(256, 256))
6img_array = image.img_to_array(img) / 255.0
7img_array = np.expand_dims(img_array, axis=0)
8
9age_pred, gender_pred = model.predict(img_array)
10print(f"Predicted Age: {age_pred}")
11print(f"Predicted Gender: {['Male', 'Female', 'Unknown'][np.argmax(gender_pred)]}")