Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# ResNet50 ImageNet Classifier
|
3 |
+
|
4 |
+
## Model Description
|
5 |
+
This model is a ResNet50 architecture trained on ImageNet dataset.
|
6 |
+
|
7 |
+
## Performance
|
8 |
+
- Best Validation Accuracy: 0.00%
|
9 |
+
- Training Epochs: 42
|
10 |
+
|
11 |
+
## Training Details
|
12 |
+
- Framework: PyTorch
|
13 |
+
- Task: Image Classification
|
14 |
+
- Dataset: ImageNet
|
15 |
+
- Input Size: 224x224
|
16 |
+
- Number of Classes: 1000
|
17 |
+
|
18 |
+
## Usage
|
19 |
+
```python
|
20 |
+
from transformers import AutoImageProcessor, AutoModelForImageClassification
|
21 |
+
import torch
|
22 |
+
|
23 |
+
# Load model and processor
|
24 |
+
model = AutoModelForImageClassification.from_pretrained("jatingocodeo/ImageNet")
|
25 |
+
processor = AutoImageProcessor.from_pretrained("jatingocodeo/ImageNet")
|
26 |
+
|
27 |
+
# Prepare image
|
28 |
+
image = Image.open("path/to/image.jpg")
|
29 |
+
inputs = processor(image, return_tensors="pt")
|
30 |
+
|
31 |
+
# Get predictions
|
32 |
+
with torch.no_grad():
|
33 |
+
outputs = model(**inputs)
|
34 |
+
logits = outputs.logits
|
35 |
+
predicted_class = logits.argmax(-1).item()
|
36 |
+
```
|