Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: pytorch
|
| 3 |
+
pipeline_tag: image-classification
|
| 4 |
+
tags:
|
| 5 |
+
- pytorch
|
| 6 |
+
- resnet
|
| 7 |
+
- cifar100
|
| 8 |
+
- image-classification
|
| 9 |
+
- computer-vision
|
| 10 |
+
datasets:
|
| 11 |
+
- cifar100
|
| 12 |
+
metrics:
|
| 13 |
+
- accuracy
|
| 14 |
+
model-index:
|
| 15 |
+
- name: ResNet34-CIFAR100
|
| 16 |
+
results:
|
| 17 |
+
- task:
|
| 18 |
+
type: image-classification
|
| 19 |
+
name: Image Classification
|
| 20 |
+
dataset:
|
| 21 |
+
type: cifar100
|
| 22 |
+
name: CIFAR-100
|
| 23 |
+
metrics:
|
| 24 |
+
- type: accuracy
|
| 25 |
+
value: 73.09
|
| 26 |
+
name: Top-1 Accuracy
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
# ResNet34 for CIFAR-100 Classification
|
| 30 |
+
|
| 31 |
+
This model is a ResNet34 architecture trained from scratch on CIFAR-100 dataset, achieving **73.09%** top-1 accuracy.
|
| 32 |
+
|
| 33 |
+
## Model Details
|
| 34 |
+
|
| 35 |
+
- **Architecture**: ResNet34 with BasicBlock residual structure
|
| 36 |
+
- **Parameters**: 21,328,292
|
| 37 |
+
- **Dataset**: CIFAR-100 (100 classes)
|
| 38 |
+
- **Training Epochs**: 83
|
| 39 |
+
- **Target Accuracy**: 73.0% (✅ Achieved!)
|
| 40 |
+
- **Final Accuracy**: **73.09%**
|
| 41 |
+
|
| 42 |
+
## Training Configuration
|
| 43 |
+
|
| 44 |
+
- **Optimizer**: SGD with Nesterov momentum (0.9)
|
| 45 |
+
- **Learning Rate**: OneCycleLR (max_lr=0.1)
|
| 46 |
+
- **Weight Decay**: 5e-4
|
| 47 |
+
- **Batch Size**: 128
|
| 48 |
+
- **Loss Function**: CrossEntropyLoss with Label Smoothing (0.1)
|
| 49 |
+
- **Data Augmentation**: Heavy augmentation with Albumentations
|
| 50 |
+
|
| 51 |
+
## Usage
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
import torch
|
| 55 |
+
from model import ResNet34 # You'll need the model definition
|
| 56 |
+
|
| 57 |
+
# Load the model
|
| 58 |
+
model = ResNet34(num_classes=100)
|
| 59 |
+
checkpoint = torch.load('best_model.pth', map_location='cpu')
|
| 60 |
+
model.load_state_dict(checkpoint['model_state_dict'])
|
| 61 |
+
model.eval()
|
| 62 |
+
|
| 63 |
+
# For inference, use the transforms from the training
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## CIFAR-100 Classes
|
| 67 |
+
|
| 68 |
+
The model can classify images into 100 classes from CIFAR-100 dataset, including animals, vehicles, objects, and natural scenes.
|
| 69 |
+
|
| 70 |
+
## Performance
|
| 71 |
+
|
| 72 |
+
- **Top-1 Accuracy**: 73.09%
|
| 73 |
+
- **Training Time**: ~3.75 hours on GPU
|
| 74 |
+
- **Model Size**: ~81MB
|
| 75 |
+
|
| 76 |
+
## Repository
|
| 77 |
+
|
| 78 |
+
- **GitHub**: [https://github.com/chethan180/ciphar-100](https://github.com/chethan180/ciphar-100)
|
| 79 |
+
- **Training Logs**: See TRAINING_LOGS.md for detailed epoch-by-epoch progress
|