# CV-Image-Classification
**Repository Path**: xyfjason/cv-image-classification
## Basic Information
- **Project Name**: CV-Image-Classification
- **Description**: Reproduce image classification models with PyTorch.
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2022-03-08
- **Last Updated**: 2023-02-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Image-Backbones-Implementations
My implementations of image backbones with PyTorch.
## Training
```shell
python main.py [-n NAME] [-c FILE] [--opts KEY1 VALUE1 KEY2 VALUE2]
```
- To train on multiple GPUs, replace `python` with `torchrun --nproc_per_node NUM_GPUS`.
- An experiment directory will be created under `./runs/` for each run, which is named after `NAME`, or the current time if `NAME` is not specified. The directory contains logs, checkpoints, tensorboard, etc.
For example, to train resnet18 on CIFAR-10:
```shell
python main.py -c ./configs/resnet18_cifar10.yaml
```
## Results
### CIFAR-10
| models | #params | MACs | acc@1(%) |
|---|---|---|---|
| VGG-11 | 9.20M | 0.15G | 90.97 |
| VGG-19 (BN) | 20.0M | 0.40G | 94.00 |
| ResNet-18 | 11.2M | 5.59G | 95.64 |
| PreActResNet-18 | 11.2M | 5.59G | 95.45 |
| ResNeXt-29 (32x4d) | 4.78M | 6.90G | 95.16 |
| SE-ResNet-18 | 11.3M | 5.59G | 95.65 |
| CBAM-ResNet-18 | 11.3M | 5.59G | 95.49 |
| MobileNet | 3.22M | 0.48G | 92.09 |
| ShuffleNet 1x (g=8) | 0.91M | 0.50G | 92.82 |
| ViT-Tiny/4 | 5.36M | 0.37G | 85.66 |