Update README.md
#1
by
dolaposalim
- opened
README.md
CHANGED
|
@@ -1,3 +1,70 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- yo
|
| 6 |
+
metrics:
|
| 7 |
+
- accuracy
|
| 8 |
+
pipeline_tag: image-classification
|
| 9 |
+
tags:
|
| 10 |
+
- Yoruba
|
| 11 |
+
- tradition
|
| 12 |
+
- cap
|
| 13 |
+
- fila
|
| 14 |
+
- gobi
|
| 15 |
+
- Nigeria
|
| 16 |
+
- Oodua
|
| 17 |
+
- gods
|
| 18 |
+
---
|
| 19 |
+
# Fila Yoruba Detector
|
| 20 |
+
|
| 21 |
+
## Model Description
|
| 22 |
+
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**.
|
| 23 |
+
|
| 24 |
+
## Intended Use
|
| 25 |
+
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.
|
| 26 |
+
|
| 27 |
+
## Training Data
|
| 28 |
+
The model was trained on a dataset of images containing two classes:
|
| 29 |
+
- **fila**: Images that contain the traditional Yoruba hat.
|
| 30 |
+
- **not-fila**: Images that do not contain the traditional Yoruba hat.
|
| 31 |
+
|
| 32 |
+
The training data consisted of a limited number of images and may not generalize well to other image sets outside of the Yoruba context.
|
| 33 |
+
|
| 34 |
+
## Evaluation Metrics
|
| 35 |
+
The model's performance was evaluated using standard classification metrics:
|
| 36 |
+
- **Accuracy**: 85%
|
| 37 |
+
- **Precision**: 88%
|
| 38 |
+
- **Recall**: 80%
|
| 39 |
+
- **F1 Score**: 84%
|
| 40 |
+
|
| 41 |
+
Note: These metrics may vary depending on the images it is tested on.
|
| 42 |
+
|
| 43 |
+
## Limitations
|
| 44 |
+
- The model was trained on a limited set of images, which might affect its generalization to other types of images.
|
| 45 |
+
- The model may have difficulty recognizing **fila** in images with poor lighting or obscured views of the hat.
|
| 46 |
+
- The performance may degrade if the model encounters images from other cultures or different types of headgear.
|
| 47 |
+
|
| 48 |
+
## Ethical Considerations
|
| 49 |
+
- Ensure that the model is used in contexts that respect cultural diversity and avoid reinforcing stereotypes.
|
| 50 |
+
- The model might not perform equally well across all demographic groups, and care should be taken to avoid misuse in sensitive contexts.
|
| 51 |
+
|
| 52 |
+
## How to Use
|
| 53 |
+
To use this model, you can load it from Hugging Face using the following code:
|
| 54 |
+
|
| 55 |
+
```python
|
| 56 |
+
from huggingface_hub import hf_hub_download
|
| 57 |
+
import tensorflow as tf
|
| 58 |
+
|
| 59 |
+
# Download and load the model
|
| 60 |
+
model_path = hf_hub_download(repo_id="dolaposalim/model-name", filename="filadentification.h5")
|
| 61 |
+
model = tf.keras.models.load_model(model_path)
|
| 62 |
+
|
| 63 |
+
# Predict function
|
| 64 |
+
def predict(image):
|
| 65 |
+
# Preprocess the image and make predictions
|
| 66 |
+
image = image.resize((256, 256)) # Resize to model input size
|
| 67 |
+
image = np.array(image) / 255.0 # Normalize
|
| 68 |
+
image = np.expand_dims(image, axis=0) # Add batch dimension
|
| 69 |
+
prediction = model.predict(image)
|
| 70 |
+
return prediction```
|