https://github.com/boostcampaitech5/level1_imageclassification-cv-04
level1_imageclassification-cv-04 created by GitHub Classroom
https://github.com/boostcampaitech5/level1_imageclassification-cv-04
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.5%) to scientific vocabulary
Repository
level1_imageclassification-cv-04 created by GitHub Classroom
Basic Info
- Host: GitHub
- Owner: boostcampaitech5
- License: mit
- Language: Python
- Default Branch: main
- Size: 1.91 MB
Statistics
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
CV_classification
Classification Pipeline in Computer Vision (Pytorch)
Environments
Directory
bash
CV_classification
├── datasets
│ ├── __init__.py
│ ├── augmentation.py
│ └── factory.py
├── models
│ ├── __init__.py
│ ├── resnet.py
│ └── loss.py
├── log.py
├── main.py
├── train.py
├── run.sh
├── requirements.txt
├── README.md
└── LICENSE
Pipeline
- Set seed
- Make directory to save results
- Build model
- Build dataset with augmentations
- Train dataset
- Validation dataset (optional)
- Test dataset
- Make dataLoader
- Define optimizer (model parameters)
- Define loss function
- Training model
- Checkpoint model using evaluation on validation dataset
- Log training history using
loggingorwandbin save folder
- Testing model
Run
run.sh
```bash dataname=$1 numclasses=$2 optlist='SGD Adam' lrlist='0.1 0.01 0.001' auglist='default weak strong' bs_list='16 64 256'
for bs in $bslist do for opt in $optlist do for lr in $lrlist do for aug in $auglist do # use scheduler echo "bs: $bs, opt: $opt, lr: $lr, aug: $aug, usesched: True" EXPNAME="bs$bs-opt$opt-lr$lr-aug$aug-use_sched"
if [ -d "$EXP_NAME" ]
then
echo "$EXP_NAME is exist"
else
python main.py \
--exp-name $EXP_NAME \
--dataname $dataname \
--num-classes $num_classes \
--opt-name $opt \
--aug-name $aug \
--batch-size $bs \
--lr $lr \
--use_scheduler \
--epochs 50
fi
# not use scheduler
echo "bs: $bs, opt: $opt, lr: $lr, aug: $aug, use_sched: False"
EXP_NAME="bs_$bs-opt_$opt-lr_$lr-aug_$aug"
if [ -d "$EXP_NAME" ]
then
echo "$EXP_NAME is exist"
else
python main.py \
--exp-name $EXP_NAME \
--dataname $dataname \
--num-classes $num_classes \
--opt-name $opt \
--aug-name $aug \
--batch-size $bs \
--lr $lr \
--epochs 50
fi
done
done
done
done ```
example
bash
bash run.sh CIFAR10 10
Config Parameters
Wandb 관련 설정
|Argument|Description|Default|Possible value| |---|---|---|---| |usewandb|Wandb 사용 여부|True|True,False| |usecm|Confusion metrix 사용 여부|True|True,False| |entity|Wandb 엔티티 명|"connect-cv-04"|---| |projectname|Wandb 프로젝트 명|"Imageclassificationmask"|---| |expname|실험명|"exp"|---| |expnum|실험 번호|0|---| |username|실험자|"my_name"|"KDH","KJY","HJH","KDK"|
실험 관련 설정
|Argument|Description|Default|Possible value| |---|---|---|---| |datadir|input 경로|'../input|---| |trainfile|train csv 이름|"train.csv"|---| |validfile|valid csv 이름|"valid.csv"|---| |transform|Transform 목록|['resize','randomrotation', 'totensor', 'normalize']|---| |seed|Random seed|223|---| |modelname|Modelnames|“CustomModel”|---| |modelparam|Modelnames|{pretrained : True, backbone : "resnet18"}|---| |numclasses|Class 개수|18|---| |batchsize|Batch size|32|---| |optname|Optimizer|"Adam"|"Adam"| |loss|loss 종류|"crossentropy"|"crossentropy","focalloss","f1loss","bceloss","mseloss"| |lossparam|loss parm|"미정"|---| |lr|learning rate|5e-6|---| |lrsheduler|"Learning rate scheduler|"StepLR"|"StepLR","ReduceLROnPlateau"| |lrshedulerparam|Lr scheduler parameter|"미정"|---| |weightdecay|Weight Decay|5e-4|---| |epochs|epoch|100|---| |savedir|모델 저장 위치|"./checkpoint"|---| |gradaccumsteps|---|1|---| |mixed_precision|---|"fp16"|---| |patience|Early Stopping|100|---|
Contributors ✨
Thanks goes to these wonderful people (emoji key):
김대희 💬 🚧 💻 👀 🤔 |
김동규 💻 🚧 💬 🔬 🔧 |
김준영 💻 🚇 🤔 📆🔬 |
황준하 💻 🤔 💬 🎨 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Owner
- Name: 부스트캠프 AI Tech 5기
- Login: boostcampaitech5
- Kind: organization
- Email: boostcamp_ai@connect.or.kr
- Location: Korea, South
- Website: https://boostcamp.connect.or.kr/program_ai.html
- Repositories: 1
- Profile: https://github.com/boostcampaitech5
AI 엔지니어의 지속 가능한 성장을 위한 학습 커뮤니티, 부스트캠프 AI Tech입니다.
GitHub Events
Total
- Delete event: 1
- Push event: 1
- Pull request event: 2
- Create event: 1
Last Year
- Delete event: 1
- Push event: 1
- Pull request event: 2
- Create event: 1