Skip to content

๐ŸฆทTrack1.์‚ฌ๋ž‘๋‹ˆ ๋ฐœ์น˜ ํ›„ ์œ„ํ—˜๋„ ์˜ˆ์ธก ๋ชจ๋ธ ๊ฐœ๋ฐœ๐Ÿฆท

License

Notifications You must be signed in to change notification settings

jinseok19/2023_BioHealth_Data_Contest

Repository files navigation

2023 ๋ฐ”์ด์˜คํ—ฌ์Šค ๋ฐ์ดํ„ฐ ๊ฒฝ์ง„๋Œ€ํšŒ - ์น˜์˜ํ•™ ๋ถ„์•ผ (๋ฐ”์ด์˜คํ—ฌ์Šค ํ˜์‹ ์œตํ•ฉ๋Œ€ํ•™ 7๊ฐœ ๋Œ€ํ•™ ์žฌํ•™์ƒ ๋ถ€๋ฌธ)

[์ปดํ“จํ„ฐ๋น„์ „] ์‚ฌ๋ž‘๋‹ˆ ๋ฐœ์น˜ ์ˆ˜์ˆ  ํ›„ ์œ„ํ—˜๋„ ์˜ˆ์ธก ๋ชจ๋ธ ๊ฐœ๋ฐœ!

์ฝ”๋“œ ๊ตฌ์กฐ

$USER/RESULT
โ”œโ”€โ”€โ”€โ”€TRAIN/
โ”‚   โ”œโ”€โ”€ TL_AdamW.py
โ”‚   โ””โ”€โ”€ FT_RMSprop.py 
โ”œโ”€โ”€โ”€โ”€TEST/
โ”‚   โ”œโ”€โ”€ predict_AdamWRMSprop.py
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ FT_RMSdragon.pth
โ”œโ”€โ”€ BEST_TL_AdamWdragon.pth
โ””โ”€โ”€ fin_tuned_model_AdamWRMSdragon2.csv

โ”œโ”€โ”€ TRAIN : ํ•™์Šต์— ํ•„์š”ํ•œ TL_AdamW.py, FT_RMSprop.py ํŒŒ์ผ์„ ๋‹ด์€ ํด๋”
โ”‚    โ”œโ”€โ”€ TL_AdamW.py :
โ”‚    โ”‚		AdamW optimizer๋ฅผ ์ด์šฉํ•ด Transfer learning์„ ์ง„ํ–‰(๊ณต์‹๋ฌธ์„œ์ฐธ๊ณ  ๋ฐ ์‹คํ—˜์ ์œผ๋กœ ํŒŒ๋ผ๋ฏธํ„ฐ ๊ฒฐ์ •)**
โ”‚    โ”‚				1. classification layer์— ์ด์ง„๋ถ„๋ฅ˜ ๊ฒฐ๊ณผ๋ฅผ ๋„์ถœํ•˜๋„๋ก layer๋ฅผ ์ถ”๊ฐ€
โ”‚    โ”‚				2. 150 epoch ์ค‘ f1-score๊ฐ€ ๊ฐ€์žฅ ๋†’์„ ๋•Œ์˜ pth ์ €์žฅ
โ”‚    โ””โ”€โ”€ FT_RMSprop.py :
โ”‚		TL_AdamW.py์—์„œ ์–ป์€ pth์™€ RMSprop optimizer๋ฅผ ์ด์šฉํ•ด ๋ฏธ์„ธ์กฐ์ •**
โ”‚				1. densenet121์˜ ๋ชจ๋“  ํŒŒ๋ผ๋ฏธํ„ฐ ๋™๊ฒฐ(freeze) ํ›„ classification layer๋งŒ ๋™๊ฒฐํ•ด์ œ
โ”‚				2. ๊ณต์‹๋ฌธ์„œ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์‹คํ—˜์ ์œผ๋กœ ์–ป์€ ํŒŒ๋ผ๋ฏธํ„ฐ์™€ ํ•™์Šต๋ฅ ์„ ํ†ตํ•ด scheduler ์„ธํŒ…
โ”‚				3. ์ตœ์ข…์ ์œผ๋กœ ์–ป์€ pth ์ƒ์„ฑ
โ”‚
โ”œโ”€โ”€ TEST : ์ถ”๋ก ์— ํ•„์š”ํ•œ predict_AdamWRMSprop.py ํŒŒ์ผ์„ ๋‹ด์€ ํด๋”
โ”‚    โ””โ”€โ”€  predict_AdamWRMSprop.py:
โ”‚		baseline predict.py์™€ ๋™์ผ. (๊ฒฝ๋กœ๋งŒ ๋‹ค๋ฆ„)**
โ”‚			1. TRAIN์˜ ๋‘ ํŒŒ์ผ์„ ํ†ตํ•ด ์ตœ์ข…์ ์œผ๋กœ ์–ป์€ pth๋กœ ์ƒˆ๋กœ์šด ๋ฐ์ดํ„ฐ์— ๋Œ€ํ•œ ์˜ˆ์ธก ์ˆ˜ํ–‰
โ”‚			2. ์˜ˆ์ธก ๊ฒฐ๊ณผ 0/1์„ low/high๋กœ ๋ฐ”๊พธ์–ด csv ํ˜•ํƒœ๋กœ ์ €์žฅ
โ”‚  				(fin_tuned_model_AdamWRMSdragon2.csv)
โ”‚
โ”œโ”€โ”€ FT_RMSdragon.pth : ์ตœ์ข…์ ์œผ๋กœ ํ•™์Šต๋œ ๋ชจ๋ธ
โ”œโ”€โ”€ BEST_TL_AdamWdragon.pth : ์ตœ์  ์„ฑ๋Šฅ์ผ๋•Œ ์ €์žฅ๋œ ๋ชจ๋ธ
โ””โ”€โ”€ fin_tuned_model_AdamWRMSdragon2.csv : ์ถ”๋ก ์„ ๋Œ๋ฆฐ ๊ฒฐ๊ณผ

ํ•™์Šต(TRAIN) ์ˆœ์„œ ๋ฐ ๋ฐฉ๋ฒ•

  1. 'python3.9 TL_AdamW.py' ํŒŒ์ผ ์‹คํ–‰(๋จผ์ € ์ˆ˜ํ–‰)
  2. 'python3.9 FT_RMSprop.py' ํŒŒ์ผ ์‹คํ–‰
  3. 'USER/RESULT' ๋‚ด์— ๊ฒฐ๊ณผ๊ฐ€ ์ €์žฅ๋จ

์ถ”๋ก (PREDICT) ์ˆœ์„œ ๋ฐ ๋ฐฉ๋ฒ•

  1. 'python3.9 predict_AdamWRMSprop.py' ์‹คํ–‰
  2. 'USER/RESULT/' ๋‚ด์— ๊ฒฐ๊ณผ ํŒŒ์ผ(fin_tuned_model_AdamWRMSdragon2.csv)์ด ์ €์žฅ๋จ

Architecture

์•„ํ‚คํ…์ฒ˜

Summary

'AdamW'๋ฅผ ์‚ฌ์šฉํ•œ ์ดˆ๊ธฐ ํ•™์Šต ๋‹จ๊ณ„๋ถ€ํ„ฐ ์‹œ์ž‘ํ•œ ๋‹ค์Œ 'RMSprop'์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ฏธ์„ธ ์กฐ์ •ํ•˜๋Š” ์ด ํ”„๋กœ์„ธ์Šค์˜ ์ตœ์ข… ๊ฒฐ๊ณผ๋Š” ์ด๋ก ์ ์œผ๋กœ ์›๋ž˜ ๋ชจ๋ธ์˜ ํ•™์Šต์„ ๊ณ„์†ํ•˜๋Š” ๊ฒƒ๊ณผ ์œ ์‚ฌํ•˜์ง€๋งŒ ์˜ตํ‹ฐ๋งˆ์ด์ €๋ฅผ ์ค‘๊ฐ„์— ์ „ํ™˜ํ•œ๋‹ค๋Š” ์ฐจ๋ณ„์ ์ด ์žˆ๋‹ค.

๊ณต์‹ URL

์‚ฌ์šฉ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ฐ ํ™˜๊ฒฝ

  • ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

    • torch
    • torchvision
    • torch.optim์˜ RMSprop, lr_scheduler
    • PIL
    • tqdm
    • sklearn
    • pandas
    • numpy
  • ํ™˜๊ฒฝ

    • python : 3.9.18
    • cuda : runtimeAPI 11.3, driverAPI 11.7
    • os : Ubuntu 20.04 LTS

About

๐ŸฆทTrack1.์‚ฌ๋ž‘๋‹ˆ ๋ฐœ์น˜ ํ›„ ์œ„ํ—˜๋„ ์˜ˆ์ธก ๋ชจ๋ธ ๊ฐœ๋ฐœ๐Ÿฆท

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages