Skip to content

jh941213/kaggle_NFL

Repository files navigation

๐Ÿˆ Kaggle_NFL

๐Ÿฅ‰Kaggle Bronze ํš๋“๐ŸŽ‰

  • Private Score private
  • Public Score public

๐Ÿ‘ฅ ํŒ€์›

๊น€์žฌํ˜„ ์ด์„ฑ์—ฐ ์ž„๋ณด๋ผ ์ •์œ ์„ ์ด์ฐฝ์žฌ
Team Member Team Member Team Leader Team Member Team Member

๐Ÿ’พ ์ปดํ“จํ„ฐ ํ™˜๊ฒฝ

๋น„๊ณ  AWS Server Google Colab Kaggle Notebook
GPU A10G T4 P100
RAM 16GB 13~52GB 13GB
Storage 250GB 166GB 73GB

๋ชฉ์ฐจ


๐Ÿˆ ๋Œ€ํšŒ์†Œ๊ฐœ

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-03-24 แ„‹แ…ฉแ„’แ…ฎ 3 05 59

NFL ์ด๋ž€?

๋ฏธ์‹์ถ•๊ตฌ(National Football League, NFL)๋Š” ๋ฏธ๊ตญ์—์„œ ๊ฐ€์žฅ ์ธ๊ธฐ ์žˆ๋Š” ํ”„๋กœํŽ˜์…”๋„ ๋ฆฌ๊ทธ ์ค‘ ํ•˜๋‚˜ ๋ฏธ์‹์ถ•๊ตฌ ๊ฒฝ๊ธฐ๋Š” ๊ณต์„ ๊ฐ€์ง€๊ณ  ์ƒ๋Œ€ํŽธ ๊ณจ๋Œ€๊นŒ์ง€ ์ „์ง„ํ•˜๋ฉฐ ์ ์ˆ˜๋ฅผ ์–ป๋Š” ๊ฒƒ์ด ๋ชฉ์  ์ด 32๊ฐœ์˜ ํŒ€์œผ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์œผ๋ฉฐ, ๋ฏธ๊ตญ๊ณผ ์„ธ๊ณ„ ๊ฐ์ง€์—์„œ ๋งค๋…„ ๋งค์šฐ ์ธ๊ธฐ ์žˆ๋Š” ๊ฒฝ๊ธฐ๋“ค์„ ๊ฐœ์ตœ ๋งค๋…„ 2์›” ์ดˆ์— ์—ด๋ฆฌ๋Š” NFL์˜ ๊ฒฐ์Šน์ „์ธ ์Šˆํผ๋ณผ์€ ๋‹จ์ผ ์Šคํฌ์ธ  ์ด๋ฒคํŠธ๋กœ์„œ๋Š” ์„ธ๊ณ„ ์ตœ๋Œ€ ๊ทœ๋ชจ์˜ ํฅํ–‰์„ ์ž๋ž‘

1st and Futre - Player Contact Detection by Kaggle

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-03-24 แ„‹แ…ฉแ„’แ…ฎ 3 14 38

NFL(The National Football League) & AWS์—์„œ ์ฃผ์ตœํ•œ ๋ฏธ์‹์ถ•๊ตฌ ๊ด€๋ จ ๋Œ€ํšŒ

VIDEO ๋ฐ ํ”Œ๋ ˆ์ด์–ด Tracking Data๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„ ์ˆ˜ ๋ถ€์ƒ ๊ฐ์‹œ ๋ฐ ์™„ํ™” ํ”„๋กœ๊ทธ๋žจ์„ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ๋ชฉ์ 

1๏ธโƒฃ ์ฒซ๋ฒˆ์งธ ๋Œ€ํšŒ๋Š” ํ—ฌ๋ฉง ์ถฉ๋Œ ํƒ์ง€(Impact Detection) - ํ—ฌ๋ฉง ์ค‘ ์–ด๋–ค ๊ฒƒ์ด ์ถฉ๋Œ์„ ์ผ์œผํ‚ค๊ณ  ์žˆ๋Š”๊ฐ€?
2๏ธโƒฃ ๋‘๋ฒˆ์งธ ๋Œ€ํšŒ๋Š” ํ—ฌ๋ฉง ๋ฐฐ์ •(Helmet Assignment) - ์ถฉ๋Œํ•˜๋Š” ํ—ฌ๋ฉง์„ ์“ฐ๊ณ  ์žˆ๋Š” ์„ ์ˆ˜๋Š” ๋ˆ„๊ตฌ์ธ๊ฐ€?
3๏ธโƒฃ ์—ฌ๊ธฐ์— ์ด์–ด ์—ด๋ฆฐ 3๋ฒˆ์งธ ๋Œ€ํšŒ ์„ ์ˆ˜ ์ ‘์ด‰ ํƒ์ง€(Player Contact Detection) - ๊ฒฝ๊ธฐ ์ค‘์— ๋ˆ„๊ฐ€ ์ ‘์ด‰์„ ํ–ˆ๋Š”๊ฐ€?


๐Ÿ“Œ ๋Œ€ํšŒ๊ทœ์น™

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-03-24 แ„‹แ…ฉแ„’แ…ฎ 3 27 30


๐Ÿ“† ์ˆ˜ํ–‰์ผ์ •


๐Ÿ“ ๋ฐ์ดํ„ฐ

๋น„์ •ํ˜• ๋ฐ์ดํ„ฐ

โ–ถ๏ธ NFL ์˜์ƒ

NFL ์˜์ƒ Train Test
๊ฐฏ์ˆ˜ 720๊ฐœ 6๊ฐœ
  • 1280x720 ํ•ด์ƒ๋„
  • 60fps (Frame Per Second)
  • Video ๋‹น ์•ฝ 5~12์ดˆ ์ •๋„์˜ ๊ธธ์ด

๋‘ ๊ฐœ์˜ ๋ฉ”์ธ ๋ทฐ๋Š” Sideline ๋ฐ Endzone์—์„œ ์ดฌ์˜ โ†’ ๋น„๋””์˜ค ์Œ์€ ์‹œ๊ฐ„ ํ”„๋ ˆ์ž„๋ณ„๋กœ ์ผ์น˜
์˜์ƒ ๋ชจ๋‘ 59.94HZ์˜ ํ”„๋ ˆ์ž„ ์†๋„ (์ดˆ๋‹น ์•ฝ 60๊ฐœ์˜ ํ”„๋ ˆ์ž„(์ •ํ™•ํžˆ๋Š” 59.94๊ฐœ)์œผ๋กœ ๊ตฌ์„ฑ)

์ •ํ˜• ๋ฐ์ดํ„ฐ

๐Ÿ“„ CSV ํŒŒ์ผ
แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-03-24 แ„‹แ…ฉแ„’แ…ฎ 3 39 32


๐Ÿ‘ซ ์ˆ˜ํ–‰๊ณผ์ •

๐Ÿ’ป ๋จธ์‹ ๋Ÿฌ๋‹

๋ฐ์ดํ„ฐ ์ „์ฒ˜๋ฆฌ

1๏ธโƒฃ ๋ฐ์ดํ„ฐ ์žฌ๊ตฌ์„ฑ

train_labels.csv
แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 42 18

player_tracking.csv
แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 43 01

  • ํ•œ ์„ ์ˆ˜์˜ ์ •๋ณด๋งŒ ๊ธฐ๋ก๋œ ๊ธฐ์กด ์ •๋ณด์—์„œ ๋‘ ์„ ์ˆ˜์˜ ์ •๋ณด๋ฅผ ๋ชจ๋‘ ๊ณ ๋ ค (8 * 2)
  • 'step'์„ ๊ธฐ์ค€์œผ๋กœ PLAYER 1๊ณผ PLAYER 2์˜ ์œ„์น˜(X, Y ์ขŒํ‘œ), ์ด๋™ ์†๋„, ๊ฑฐ๋ฆฌ, ๊ฐ€์†๋„, ์„ ์ˆ˜ ๋ฐฉํ–ฅ, ์„ ์ˆ˜๊ฐ€ ๋ฐ”๋ผ๋ณด๋Š” ๋ฐฉํ–ฅ ์ถ”๊ฐ€
  • ํ•œ ํŒ€๋‹น ์„ ์ˆ˜๋Š” 11๋ช… / ์ด 22๋ช…์˜ ์„ ์ˆ˜๋“ค ์‚ฌ์ด์˜ ๋ชจ๋“  ๊ฒฝ์šฐ์˜ ์ˆ˜ ๊ธฐ๋ก
  • ๋‘ ์„ ์ˆ˜์˜ ๊ฑฐ๋ฆฌ, nfl_player_id_1์˜ ๊ทธ๋ผ์šด๋“œ ์ถฉ๋Œ ์—ฌ๋ถ€ ์ถ”๊ฐ€

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 46 32

2๏ธโƒฃ ๋ฐ์ดํ„ฐ ํ•„ํ„ฐ๋ง

  • ๊ฑฐ๋ฆฌ 2์•ผ๋“œ ์ดํ•˜์ธ Feature๋งŒ ์„ ํƒ (2์•ผ๋“œ = ์•ฝ 1.8๋ฏธํ„ฐ)
    • ์„œ๋กœ ๊ฐ€๊นŒ์šด ์„ ์ˆ˜๋“ค๋งŒ ํฌํ•จํ•˜์—ฌ ์ ‘์ด‰ ๊ฐ€๋Šฅ์„ฑ์ด ๋†’์€ ๋ฐ์ดํ„ฐ์— ์ง‘์ค‘ํ•จ์œผ๋กœ์จ ๋” ์ •ํ™•ํ•œ ์ ‘์ด‰ ๊ฐ์ง€ ๋ชจ๋ธ์„ ํ•™์Šต
    • ์ ‘์ด‰ ๊ฐ€๋Šฅ์„ฑ์ด ๋‚ฎ์€ ๋ฐ์ดํ„ฐ๋ฅผ ์ œ๊ฑฐํ•จ์œผ๋กœ์จ, ๋ชจ๋ธ์ด ๋ถˆํ•„์š”ํ•œ ๋…ธ์ด์ฆˆ์— ์˜ํ–ฅ์„ ๋ฐ›์ง€ ์•Š๊ณ  ์ ‘์ด‰ ๊ฐ์ง€์— ์ง‘์ค‘
    • ํ•™์Šต ๋ฐ์ดํ„ฐ ํฌ๊ธฐ๊ฐ€ ์ค„์–ด๋“ค์–ด ๋ชจ๋ธ ํ•™์Šต ์‹œ๊ฐ„์ด ๋‹จ์ถ•

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 48 23

3๏ธโƒฃ ํŒŒ์ƒ๋ณ€์ˆ˜ ์ถ”๊ฐ€

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 48 51

  • ํ—ฌ๋ฉง Bounding Box ์ •๋ณด๋กœ ํด๋Ÿฌ์Šคํ„ฐ๋ง์„ ์ด์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ feature ์ฆ๊ฐ•
  • ๋ฐ์ดํ„ฐ ๊ฐ„์˜ ์ฐจ๋ฅผ ์ด์šฉํ•˜์—ฌ feature ์ฆ๊ฐ•
  • ๋ฐ์ดํ„ฐ ๊ฐ„์˜ ๊ณฑ์„ ์ด์šฉํ•˜์—ฌ feature ์ฆ๊ฐ•

4๏ธโƒฃ ๊ฒฐ์ธก์น˜ ์ฒ˜๋ฆฌ

  • ์„ ์ˆ˜๊ฐ€ ๋•…์— ๋ถ€๋”ชํž ๊ฒฝ์šฐ ๊ฒฐ์ธก์น˜๋ฅผ '0'์œผ๋กœ ์ฑ„์›€

๋ชจ๋ธ ์„ ์ • ๋ฐ ํ•™์Šต

  • Pycaret ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ชจ๋ธ์„ ์ • XGboost, LGBM

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 39 24

ํ•˜์ดํผ ํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹

  • Optuna frame work ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ชจ๋ธ์˜ ์ตœ์ ์˜ ํŒŒ๋ผ๋ฏธํ„ฐ ๊ฐ’ ์ฐพ๊ธฐ

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 40 23

Group K-fold

  • 'game_play' ์˜์ƒ๋ฐ์ดํ„ฐ๋ฅผ frame ๋‹จ์œ„๋กœ ๊ตฌ๋ถ„ํ•œ ์‹œ๊ณ„์—ด ๋ฐ์ดํ„ฐ์ด๋ฏ€๋กœ Group K-fold ๊ต์ฐจ ๊ฒ€์ฆ ์ˆ˜ํ–‰

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 40 43


๐Ÿง˜ ๋”ฅ๋Ÿฌ๋‹

๋ฐ์ดํ„ฐ ์ „์ฒ˜๋ฆฌ

  1. Video ์˜์ƒ ํŒŒ์ผ์„ ์ด๋ฏธ ํŒŒ์ผ๋กœ ๋ณ€ํ™˜ -> ๋ณ€ํ™˜ ํ›„ ์ด๋ฏธ์ง€ ์ด 372,506 ์žฅ
    โ‡’ 2.5D ๋ชจ๋ธ๋กœ ํ•™์Šต(์—ฐ์‚ฐ๋Ÿ‰์„ ๋‚ฎ์ถ”๊ณ , ํ•™์Šต์‹œ๊ฐ„์„ ๋‚ฎ์ถ˜๋‹ค) ์‹œ๊ฐ„์ •๋ณด๋ฅผ ๋ฐ˜์˜ํ•˜์˜€๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ ํ”ฝ์…€์˜ ๊ณต๊ฐ„์  ์ •๋ณด๋ฅผ ์œ ์ง€ํ•จ์œผ๋กœ์จ ์–‘์งˆ์˜ ๋ฐ์ดํ„ฐ

  2. Feature Selection

  • ๊ฑฐ๋ฆฌ 2์•ผ๋“œ ์ดํ•˜์ธ Feature ๋งŒ ์„ ํƒ
  • ๋ฐ์ดํ„ฐํ”„๋ ˆ์ž„์— ์ƒˆ๋กœ์šด ์—ด 'frame' ์ถ”๊ฐ€
  • NFL Video ๋ณด๋‹ค Tracking Data์˜ Frame ์˜ ๊ธธ์ด๊ฐ€ ๊น€
  • ๋‘ Dataset ์„ ball snap ์ด ๋ฐœ์ƒํ•˜๋Š” ์‹œ์ ์— ์ •๋ณด๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋งตํ•‘
  1. ๊ฒฐ์ธก์น˜ ์ฒ˜๋ฆฌ
  • ํ—ฌ๋ฉง ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์™€ PlayerID์— ๋”ฐ๋ผ ๊ทธ๋ฃนํ™” โ†’ ๊ฐ ํ”„๋ ˆ์ž„๋ณ„๋กœ BBox ๊ณ„์‚ฐ
  • ๋ˆ„๋ฝ๋œ ํ”„๋ ˆ์ž„์˜ ๊ฒฝ์šฐ, ๋ฐ์ดํ„ฐ์˜ ์–‘๋ฐฉํ–ฅ์œผ๋กœ ์„ ํ˜• ๋ณด๊ฐ„
  • ์ฃผ๋ณ€ ์ •๋ณด๋ฅผ ์ถฉ๋ถ„ํžˆ ๊ณ ๋ คํ•˜๊ธฐ ์œ„ํ•ด window ๊ฐ’์„ 24๋กœ ์„ค์ • (์•ฝ 0.4์ดˆ)
  • ๋ˆ„๋ฝ๋œ Frame ์ •๋ณด๊ฐ€ ์ธ์ ‘ํ•œ frame ์ •๋ณด๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ ์ ˆํ•˜๊ฒŒ ์ƒ์„ฑ๋˜์–ด ํ’ˆ์งˆ ๊ฐœ์„ 
  1. Image Transform
  • ์ž˜๋ผ๋‚ธ ๋ถ€๋ถ„ ์ด๋ฏธ์ง€๋Š” ๋‹ค์Œ ๋‹จ๊ณ„์—์„œ ๋ชจ๋ธ์— input์œผ๋กœ ์‚ฌ์šฉ
    โ‡’ ์ด๋ฏธ์ง€์—์„œ ์„ ์ˆ˜๋ผ๋ฆฌ ์ถฉ๋Œํ•˜๋Š” ์˜์—ญ์— ์ง‘์ค‘ ๊ฐ€๋Šฅ
  1. Data Transformation
  • Geometric Transformations, Color Transformations, Blur, Noise, Crop and Pad, Optical Distortion, Grid Distortion ๋“ฑ ๋‹ค์–‘ํ•œ ๊ธฐ๋ฒ•๋“ค์„ ๊ณ ๋ คํ•ด๋ณด์•˜์œผ๋‚˜

  • ๐Ÿ“Š ์ตœ์ข…๋ฐ์ดํ„ฐ ์‹œ๊ฐํ™”

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 28 05

๋ชจ๋ธ๋ง

  • ๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-04-04 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 11 27 50

์•™์ƒ๋ธ”

  • Stacking

  • Hard Voting

  • Soft Voting

  • Attempts

๐Ÿ† ํ”„๋กœ์ ํŠธํ‰๊ฐ€

  1. ๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ์„ ์‚ฌ์šฉํ•ด ๋ด„์œผ๋กœ์จ ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ค๋ฃฐ ์ˆ˜ ์žˆ๋Š” ๊ด€์ ์ด ํ™•๋Œ€
  2. 3D์˜์ƒ ๋ฐ์ดํ„ฐ์˜ ๋”ฅ๋Ÿฌ๋‹ ๊ธฐ์ˆ ๊ณผ ์ •ํ˜•๋ฐ์ดํ„ฐ์˜ ๋จธ์‹ ๋Ÿฌ๋‹ ๊ธฐ์ˆ ์„ ์•™์ƒ๋ธ”ํ•˜์—ฌ ๋ชจ๋ธ ํ•ธ๋“ค๋ง์— ๋Œ€ํ•œ ์‹œ๊ฐ์„ ๋„“ํž˜
  3. ๋ฏธ์‹์ถ•๊ตฌ์— ๋Œ€ํ•œ ์ดํ•ด๊ฐ€ ๋ถ€์กฑํ•ด์„œ ์–ด๋ ค์šด ๋Œ€ํšŒ์˜€์ง€๋งŒ, ๋Œ€ํšŒ๋ฅผ ์ฐธ์—ฌํ•˜๋ฉฐ ๋ฏธ์‹์ถ•๊ตฌ์— ๋Œ€ํ•œ ์ง€์‹์„ ์Œ“์„ ์ˆ˜ ์žˆ๋Š” ์ข‹์€ ๊ธฐํšŒ
  4. Score๋ฅผ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค๊ณผ ๋น„๊ตํ•˜๋ฉฐ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ์ ์—์„œ ๋ชฐ์ž…๊ฐ ์ƒ์Šน
  5. ์ด๋ฒˆ ๋Œ€ํšŒ๋ฅผ ํ†ตํ•ด ๋ฐฐ์šด ์ตœ์‹  ๊ธฐ์ˆ ๊ณผ ๊ฒฝํ—˜๋“ค์„ ๋”์šฑ ๋ฐœ์ „์‹œ์ผœ ์•ž์œผ๋กœ์˜ ํ”„๋กœ์ ํŠธ์— ์ ์šฉ ๊ฐ€๋Šฅ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published