https://github.com/gigio1023/boostcamp-pstage-image
Naver boostcamp Ai tech 2기 이미지 분류 대회
https://github.com/gigio1023/boostcamp-pstage-image
Last synced: 3 months ago
JSON representation
Naver boostcamp Ai tech 2기 이미지 분류 대회
- Host: GitHub
- URL: https://github.com/gigio1023/boostcamp-pstage-image
- Owner: gigio1023
- Created: 2021-08-23T04:04:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-03T13:16:10.000Z (almost 4 years ago)
- Last Synced: 2025-03-12T17:43:40.605Z (3 months ago)
- Language: Python
- Homepage:
- Size: 123 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Classification
Focus on how to make pipeline.
Testing many method of CNN, Ensemble and creating simple MLops.
- Model
- ResNet18
- EfficientNet-b4, b7
- ViT
- BiT
- CaiT
- Volo
- MobilenetV2
- Augmentation
- CutMix
- Albumentation
- Ensemble
- Voting
- Method
- Early stopping
- Ray tune
- Wandb
## Requirement
```shell
pip install -r requirements.txt
```## config.py
create config.py on your root directory.```
# test_dir = "/opt/ml/input/data/eval/images"
# train_dir = "/opt/ml/input/data/train/images"
train_dir = '/opt/ml/train_crop_images'
test_dir = '/opt/ml/eval_crop_images'test_csv = "/opt/ml/input/data/eval/info.csv"
train_csv = "/opt/ml/input/data/train/train.csv"with_system_path_csv = "/opt/ml/crop-train-with-system-path.csv"
# with_system_path_csv = "/opt/ml/crop-train-with-system-path.csv"model_dir = "/opt/ml/repo/sungho/saved_model"
BATCH_SIZE = 256NUM_EPOCH = 100
k_split = 1
model_name = "resnet18"
ensemble = Falseif model_name == "deit":
LEARNING_RATE = 0.0005
else:
LEARNING_RATE = 0.001ray_tune = False
loss = "LabelSmoothing"
predict_dir = "2021-08-30T19-32-30.131418"
features = [
"mask",
"gender",
"age",
]pretrained_path = ''
merge_feature = False
merge_feature_name = 'merged_feature'
cutmix = True
curmix_vertical = True
cutmix_vertical_half = True
cutmix_alpha = 1.0
wandb_api_key = ''
```## Run
```shell
# generate train csv file
python train.py -g-path# train
python train.py
```