This model is a binary classification model that detects whether an image contains a traditional Yoruba people's fila (hat) or not. It was trained on a small set of images to recognize two classes: fila and not-fila.
This model is designed to classify images of traditional Yoruba attire, specifically detecting the presence of a fila. It can be used in applications where recognizing this cultural item is important, such as in cultural heritage analysis or fashion recognition.
The training data consisted of a limited number of images and may not generalize well to other image sets outside of the Yoruba context. You can test the model here:
here
Note: These metrics may vary depending on the images it is tested on.
1from huggingface_hub import hf_hub_download
2import tensorflow as tf
3
4# Download and load the model
5model_path = hf_hub_download(repo_id="dolaposalim/model-name", filename="filadentification.h5")
6model = tf.keras.models.load_model(model_path)
7
8# Predict function
9def predict(image):
10 # Preprocess the image and make predictions
11 image = image.resize((256, 256)) # Resize to model input size
12 image = np.array(image) / 255.0 # Normalize
13 image = np.expand_dims(image, axis=0) # Add batch dimension
14 prediction = model.predict(image)
15 return prediction```