File size: 1,121 Bytes
b1f36e1
 
 
 
 
 
 
 
 
 
 
321cccd
b1f36e1
321cccd
b1f36e1
 
 
 
 
 
 
 
321cccd
 
 
 
 
 
 
 
 
b1f36e1
 
 
 
 
 
321cccd
b1f36e1
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
language: en
tags:
- image-classification
- fastai
- vision
datasets:
- cats
license: mit
library_name: fastai
---

# Cat Image Classifier

## Model Description
This model classifies whether an input image contains a cat or not using FastAI.

## Intended uses
- Detecting cats in photographs
- Educational purposes for learning FastAI and image classification

## How to use

```python
from fastai.learner import load_learner
from huggingface_hub import hf_hub_download

# Download the model
model_path = hf_hub_download(repo_id="RamyKhorshed/Lesson2FastAi", filename="model.pkl")
model = load_learner(model_path)

# Make a prediction
# Replace with your image path
img_path = "path/to/your/image.jpg"
pred, pred_idx, probs = model.predict(img_path)
print(f"Prediction: {pred}")
print(f"Confidence: {probs[pred_idx]:.4f}")
```

## Limitations
- Works best with clear, front-facing photos of cats
- May not perform well with unusual angles or partially visible cats
- Designed for general cat detection, not breed identification

## Training
This model was trained using FastAI on a dataset of cat and non-cat images.