flower-classifier / README.md
lucypatrice's picture
Upload README.md with huggingface_hub
cd01eb6 verified
---
library_name: fastai
tags:
- image-classification
- fastai
- computer-vision
---
# flower-classifier
This is an image classification model trained using fastai. It classifies images into the following categories:
`['golden_dewdrop', 'peepal_tree']`
## Model Details
- **Architecture**: `<function resnet34 at 0x7a5c724aa2a0>`
- **Image Size**: `224`
- **Training Data**: Custom dataset (flower images)
## How to use this model
```python
from fastai.vision.all import *
from huggingface_hub import hf_hub_download
# Download the model file
model_path = hf_hub_download(repo_id='lucypatrice/flower-classifier', filename='model.pkl')
# Load the fastai learner
learn = load_learner(model_path)
# Example prediction
img = PILImage.create('your_image.jpg') # Replace with your image path
pred, pred_idx, probs = learn.predict(img)
print(f"Prediction: {pred} (confidence {probs[pred_idx]:.2%})")
```
## Training Metrics
(You can add more detailed metrics, confusion matrices, etc. here after evaluating.)