- κΉνλ―Ό, μμν: MPRNet, 26.3(PSNR) github
- μ μν, μ΄μ€ν: Restomer, 21.2(PSNR) github
- λ°μ΄ν° λΆμ λ° λ°μ΄ν° μ
μ¬κ΅¬μ±
- PSNR μ μλ‘ νμ΅ λ°μ΄ν°μ λΆν¬λ₯Ό νμΈνμ 2400μ₯μΌλ‘ μ¬κ΅¬μ±.
- νμ²λ¦¬
- Restomerμ pretrained Deblurring model μ¬μ©ν΄ PSNR 0.5μ λμ.
νλͺ : μ€μν 건 κΊΎλ λ§μ
νμ: μ μν(νμ₯), μ΄μ€ν, κΉνλ―Ό, μμν
sh2298, jjuun, taemin6697, μ리λ₯μ
- μ μν: λͺ¨λΈ νμ΄νλΌμΈ κ΅¬μΆ λ° μ΄κ΄
- μ΄μ€ν: λ°μ΄ν° λΆμ λ° λΆκ· ν λ°μ΄ν° μ¦κ°(cutmix, transform(flip, rotate, crop, gausian blur))
- κΉνλ―Ό, μμν: λͺ¨λΈ μ μ λ° tunning(learning rate, batch)
- νμ΅ λ°μ΄ν° κ²½λ‘:
./data
- κ³΅κ° Pretrained λͺ¨λΈ κΈ°λ°μΌλ‘ μΆκ° Fine Tuning νμ΅μ ν νλΌλ―Έν° 1κ°
./results/train/final-submission
- νμ΅ λ©μΈ μ½λ:
./train.py
- ν
μ€νΈ λ©μΈ μ½λ:
./predict.py
- ν
μ€νΈ μ΄λ―Έμ§, λ§μ€ν¬ κ²½λ‘:
./results/pred/final-submission/mask
νμ΅ μ§ννκΈ° μ μ΄λ―Έμ§ μ¦κ°μ λ¨Όμ μ€ννμ¬ νμ΅ μκ° λ¨μΆ
-
μ μ²λ¦¬ Get 1, 2 Labeled Image path
python ./modules/get_class_path.py
Data Upsampling via ChangeFormer Augmentation Methods :
./preprocess/augmentation.py
python ./preprocess/augmentation.py
Data Upsampling via Cutmix using DFS Algorithm only for Label 1, 2 Mixing :
./preprocess/cutmix.py
python ./preprocess/cutmix.py
μ΅μ’ νμ΅ μ¬μ© λ°μ΄ν° (μ΄ 17559 μ₯μ μ΄λ―Έμ§ μ¬μ©)
./data/train
./data/up
./data/cut
-
λͺ¨λΈ
nvidia/segformer-b4-finetuned-cityscapes-1024-1024λ₯Ό μ¬μ©νμ¬ νμ΅ λ° ν μ€νΈν¨.
Pretrained Model URLHyper-paramerter
- batch:4
- val_size: 0.3
- learning_rate=0.00005
- eval_accumulation_steps=10
- epoch : 6
μ΅μ’ μ¬μ© λͺ¨λΈ : nvidia/segformer-b4-finetuned-cityscapes-1024-1024 (Transfer Learning in 18000 steps lr 0.00005)
-
predict
python predict.py
-
μ΅μ’ μ μΆ νμΌ : ./results/pred/final-submission/mask
-
νμ΅λ κ°μ€μΉ νμΌ : ./results/train/final-submission (Huggingface νΉμ±μ ν΄λ μ 체λ₯Ό λΆλ¬μ λͺ¨λΈμ μ°κ²°μν΄)
- torch==1.12.1
- torchvision==0.13.1
- transformers
- datasets
- pickle5
- pyyaml
- scikit-learn
- numpy
- pandas
- evaluate
- pillow
- opencv-python
- matplotlib
data ν΄λ μμ train, test μ΄λ―Έμ§ λ£κΈ°
pip install -r requirements.txt
python ./modules/get_class_path.py
python ./preprocess/augmentation.py
python ./preprocess/cutmix.py
./config/train.yaml μμ train_folder λ₯Ό μνλ μ΄λ¦μΌλ‘ μμ
./config/predict.yaml μμ train_folder λ₯Ό μμ κ°μ μ΄λ¦μΌλ‘ μμ
python train.py
νμ΅μ΄ μ λΆ λλ ν
python predict.py
μ½λ μμ μμ΄
data ν΄λ μμ train, test μ΄λ―Έμ§ λ£κΈ°
pip install -r requirements.txt
python ./modules/get_class_path.py
python ./preprocess/augmentation.py
python ./preprocess/cutmix.py
python predict.py
army-ai
ββ config
β ββ predict.yaml
β ββ train.yaml
| data
| ββ up
| ββ cut
| ββ train
| ββ pickle
| ββ test
ββ models
β ββ utils.py
ββ modules
β ββ EDA.py
β ββ datasets.py
β ββ earlystoppers.py
β ββ get_class_path.py
β ββ losses.py
β ββ metrics.py
β ββ optimizers.py
β ββ recorders.py
β ββ scalers.py
β ββ schedulers.py
β ββ trainer.py
β ββ utils.py
ββ preprocess
β ββ augmentation.py
β ββ class1.csv
β ββ class2.csv
β ββ cutmix.py
ββ results
β ββ pred
β β ββ final-submission
β β ββ mask
β β ββ pred.log
β β ββ predict_config.yml
β β ββ train_config.yml
β ββ train
β ββ final-submission
β ββ checkpoint-18000
β ββ config.json
β ββ optimizer.pt
β ββ pytorch_model.bin
β ββ rng_state.pth
β ββ scheduler.pt
β ββ trainer_state.json
β ββ training_args.bin
ββ Final-submit-mask.zip
ββ README.md
ββ predict.py
ββ requirements.txt
ββ train.py