Skip to content

๐Ÿ˜ท ์ด๋ฏธ์ง€ ์ฒ˜๋ฆฌ ๋ฏธ๋‹ˆ ํ”„๋กœ์ ํŠธ :Facial mask-Area-Detection ์„ ํ™œ์šฉํ•œ ์˜ฌ๋ฐ”๋ฅธ ๋งˆ์Šคํฌ ์ฐฉ์šฉ ์—ฌ๋ถ€์— ๋”ฐ๋ผ ์ถœ์ž…์„ ํ†ต์ œํ•˜๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ชจ๋ธ๋ง ๐Ÿ”’ โ€‹

Notifications You must be signed in to change notification settings

ineed-coffee/covid19_mask_detection

ย 
ย 

Repository files navigation

๐Ÿ˜ท Facial mask-Area-Detection ์„ ํ™œ์šฉํ•œ ์˜ฌ๋ฐ”๋ฅธ ๋งˆ์Šคํฌ ์ฐฉ์šฉ ์—ฌ๋ถ€ ํŒ๋‹จ ๋ชจ๋ธ๋ง ๐Ÿ”’ โ€‹

+ ๋ฉ€ํ‹ฐ์บ ํผ์Šค ๋”ฅ๋Ÿฌ๋‹ ๊ธฐ๋ฐ˜ AI ์—”์ง€๋‹ˆ์–ด๋ง ์„ธ๋ฏธ 2์ฐจ ํ”„๋กœ์ ํŠธ (CNN)

โ€‹

  • ์ฐธ์—ฌ : ineed-coffee , cjlee0217 , okyou1000 , Parkjiwonha , ikeven94
  • ๊ธฐ๊ฐ„ : 2020.11.12~2020.11.23
  • ์ฃผ์ œ : Facial mask-Area-Detection ์„ ํ™œ์šฉํ•œ ์˜ฌ๋ฐ”๋ฅธ ๋งˆ์Šคํฌ ์ฐฉ์šฉ ์—ฌ๋ถ€ ํŒ๋‹จ
  • ๊ฒฐ๊ณผ๋ณด๊ณ ์„œ(์ „์ฒด ๋‚ด์šฉ) : Here

๊ฒฐ๊ณผ๋ณด๊ณ ์„œ ์š”์•ฝ

s1 s2


๋ถ„์„ ๊ฐœ์š” ๋ฐ ๋ชฉํ‘œ

  • ์ฝ”๋กœ๋‚˜19 2์ฐจ ๋Œ€์œ ํ–‰ ์ดํ›„ ๊นœ๊นœ์ด ํ™˜์ž , n์ฐจ ๊ฐ์—ผ ์˜ ํ‚ค์›Œ๋“œ๊ฐ€ ๋ฌธ์ œ๋กœ ๋– ์˜ฌ๋ž๋‹ค. ํŠน์ • ์ง€์—ญ์„ ์ค‘์‹ฌ์œผ๋กœ ๋ฐœ์ƒํ–ˆ๋˜ ์ง€๋‚œ 1,2์ฐจ ๋Œ€์œ ํ–‰์˜ ์„ฑ๊ฒฉ๊ณผ ๋‹ค๋ฅด๊ฒŒ ์ „๊ตญ์ ์œผ๋กœ ๋ถˆ๊ทœ์น™์ ์ธ ํ™•์ง„์ž ์ฆ๊ฐ€ ์ถ”์„ธ๋ฅผ ๋ณด์ด๋ฉฐ 3์ฐจ ๋Œ€์œ ํ–‰์ด ์‹œ์ž‘๋˜์—ˆ๊ณ , ์ด๋Ÿฌํ•œ ๋Œ€์œ ํ–‰์˜ ํฐ ์›์ธ์œผ๋กœ ์ผ๋ช… ์ฝ”์Šคํฌ , ํ„ฑ์Šคํฌ ์™€ ๊ฐ™์€ ๋ถ€์ ์ ˆํ•œ ๋งˆ์Šคํฌ ์ฐฉ์šฉ์ด ์–ธ๊ธ‰๋˜์—ˆ๋‹ค.
  • ์ •๋ถ€์—์„œ๋Š” ์ด๋Ÿฌํ•œ ์ž˜๋ชป๋œ ์ฐฉ์šฉ ์Šต๊ด€์„ ํ†ต์ œํ•˜๊ณ  ์˜ฌ๋ฐ”๋ฅธ ์ฐฉ์šฉ์„ ์œ ๋„ํ•˜๋Š” ํ–‰์ •๋ช…๋ น์„ ๋ฐœ๋ นํ•˜์˜€๊ณ  ๋ณธ ํ”„๋กœ์ ํŠธ ๋˜ํ•œ ์ด์™€ ๊ฐ™์€ ๋งˆ์Šคํฌ ์ฐฉ์šฉ๋ฒ•์— ๋”ฐ๋ฅธ ๋ถˆ๋Ÿ‰/์ ์ ˆ ํŒ๋ณ„ ๋ชจ๋ธ์„ ์ƒ์„ฑํ•˜์—ฌ ์˜ฌ๋ฐ”๋ฅธ ๋งˆ์Šคํฌ ์ฐฉ์šฉ ๋ฌธํ™”๋ฅผ ์œ ๋„ํ•˜๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•จ.
  • ๋ฐ์ดํ„ฐ์…‹์€ open face dataset ์„ ํ†ตํ•˜์—ฌ ๋งˆ์Šคํฌ ํ•ฉ์„ฑ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•˜์˜€๊ณ  , ์ฐฉ์šฉ ๋ฐฉ๋ฒ•์— ๋”ฐ๋ผ ํฌ๊ฒŒ 4๊ฐ€์ง€ ๋ถ„๋ฅ˜๋กœ ๊ตฌ๋ถ„ํ•˜์—ฌ ํŒ๋ณ„ ๋ชจ๋ธ์„ ํ•™์Šต ๋ฐ ์ƒ์„ฑํ•จ.
  • ๋ชจ๋ธ์€ ์ด 6๊ฐ€์ง€ CNN ๋ชจ๋ธ์„ ํ•™์Šตํ•˜์—ฌ ์„ฑ๋Šฅ์„ ๋น„๊ตํ•˜์˜€์Œ.

s4 s5


์ฐธ์—ฌ์ธ์› ์—ญํ• 

์ž‘์„ฑ์ž(์ด๋™์žฌ) ์ฃผ์š” ๋‹ด๋‹น ๋ถ€๋ถ„

  1. facial-mask area ์ถ”์ถœ ์ „์ฒ˜๋ฆฌ ๋กœ์ง ์ž‘์„ฑ
  2. thesis reference model ํ•™์Šต ๋ฐ ํ‰๊ฐ€
  3. Inception v3 ํ•™์Šต ๋ฐ ํ‰๊ฐ€
  4. ์‹œ๋ฎฌ๋ ˆ์ด์…˜ executable code ์ž‘์„ฑ ๋ฐ ์˜์ƒ ์ œ์ž‘

s6


๋ฐ์ดํ„ฐ ์ƒ์„ฑ ๋ฐ ์ „์ฒ˜๋ฆฌ ๊ณผ์ •

๋ฐ์ดํ„ฐ ์ƒ์„ฑ

  • ์‚ฌ์ง„์—์„œ ํŠน์ •๋ถ€๋ถ„(์˜ˆ์ƒ ๋งˆ์Šคํฌ ์ฐฉ์šฉ ๋ถ€์œ„)์„ ์ถ”์ถœํ•˜์—ฌ ์ž…๋ ฅ์œผ๋กœ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— rotation , warp , flip , translate ๊ณผ ๊ฐ™์€ ๊ธฐ๋ฒ•์œผ๋กœ ์ด๋ฏธ์ง€ ์ฆ์‹์˜ ํšจ๊ณผ๋ฅผ ๊ธฐ๋Œ€ํ•˜๊ธฐ ํž˜๋“ค๋‹ค๊ณ  ํŒ๋‹จํ•˜์—ฌ ๊ธฐ์กด ์‚ฌ๋žŒ ์–ผ๊ตด ์ด๋ฏธ์ง€์— ๋ถ„๋ฅ˜์— ๋งž๋Š” ๋งˆ์Šคํฌ ํ•ฉ์„ฑ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ํ™œ์šฉํ•˜๊ธฐ๋กœ ๊ฒฐ์ •
  • ์‚ฌ๋žŒ ์–ผ๊ตด์˜ ์ด๋ฏธ์ง€๋Š” Kaggle ์˜ FFHQ Face Data Set ์„ ํ™œ์šฉ
  • ์ด๋ฏธ์ง€ ํ•ฉ์„ฑ์€ ํŒŒ์ด์ฌ์˜ Face Recognition ํŒจํ‚ค์ง€์™€ ๋‘ ๊ฐ€์ง€ ๋งˆ์Šคํฌ ์‚ฌ์ง„์„ ํ†ตํ•ด ์ง„ํ–‰
  • ๋ถ„๋ฅ˜๋Š” ์ด 4๊ฐ€์ง€๋กœ ํ•ฉ์„ฑ์„ ์ง„ํ–‰ํ•˜์˜€์œผ๋ฉฐ ๋‹ค์Œ๊ณผ ๊ฐ™์Œ.
No mask Chin mask Nose mask Full mask
๋ฏธ์ฐฉ์šฉ ํ„ฑ์Šคํฌ ์ฝ”์Šคํฌ ์˜ฌ๋ฐ”๋ฅธ ์ฐฉ์šฉ

s8 s9

ํ•ฉ์„ฑ์— ์“ฐ์ธ ๋‘ ๋งˆ์Šคํฌ ์ด๋ฏธ์ง€

s10


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

  • ํ•ฉ์„ฑ ์ด๋ฏธ์ง€์—์„œ ๋งˆ์Šคํฌ ์ฐฉ์šฉ ์˜ˆ์ƒ ์˜์—ญ์— ํ•ด๋‹นํ•˜๋Š” ๋ถ€๋ถ„๋งŒ ์ถ”์ถœํ•˜๋Š” ์ „์ฒ˜๋ฆฌ๋ฅผ ์ง„ํ–‰ (openCV)

  • ํ•ด๋‹น ์ „์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•ด ๊ด€๋ จ ๋…ผ๋ฌธ ์ถœ์ž… ํ†ต์ œ์— ํ™œ์šฉ ๊ฐ€๋Šฅํ•œ ๋”ฅ๋Ÿฌ๋‹ ๊ธฐ๋ฐ˜ ๋งˆ์Šคํฌ ์ฐฉ์šฉ ํŒ๋ณ„ ์„ ์ฐธ๊ณ ํ•˜์—ฌ ์ „์ฒ˜๋ฆฌ๋ฅผ ์ง„ํ–‰

    • eye-detection ์ˆ˜ํ–‰ ํ›„ ๋‘ ๋ˆˆ์ด ์ˆ˜ํ‰์„ ์— ์œ„์น˜ํ•˜๋„๋ก rotating
    • ๋ˆˆ ์‚ฌ์ด์˜ ๊ฑฐ๋ฆฌ(L) ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์ขŒ์šฐ/์ƒํ•˜ ๊ฐ๊ฐ 2.2L , 2.4L ์˜์—ญ์— ๋Œ€ํ•˜์—ฌ resizing & crop

eye detection

s13

rotate image

s14

extract ROI

s15

Resize & Crop

s16

Result

s17


๋ชจ๋ธ ํ•™์Šต ๋ฐ ํ‰๊ฐ€ (์ผ๋ถ€ ์˜ˆ์‹œ)

  • ์ด 6๊ฐ€์ง€์˜ CNN ๋ชจ๋ธ์„ ํ†ตํ•ด ํŒ๋ณ„ ๋ชจ๋ธ์„ ์ƒ์„ฑ ๋ฐ ์„ฑ๋Šฅ ๋น„๊ต๋ฅผ ์ง„ํ–‰

s18

Basic CNN (thesis reference)

s19 s20


Inception v3

s23 s24


VGGNET (vgg16)

s27 s28 s29


์ตœ์ข… ๋ชจ๋ธ ์„ ์ • ๋ฐ ์‹œ์—ฐ ์˜์ƒ

์ตœ์ข… ๋ชจ๋ธ ์„ ์ •

s33

์‹œ์—ฐ ์˜์ƒ


About

๐Ÿ˜ท ์ด๋ฏธ์ง€ ์ฒ˜๋ฆฌ ๋ฏธ๋‹ˆ ํ”„๋กœ์ ํŠธ :Facial mask-Area-Detection ์„ ํ™œ์šฉํ•œ ์˜ฌ๋ฐ”๋ฅธ ๋งˆ์Šคํฌ ์ฐฉ์šฉ ์—ฌ๋ถ€์— ๋”ฐ๋ผ ์ถœ์ž…์„ ํ†ต์ œํ•˜๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ชจ๋ธ๋ง ๐Ÿ”’ โ€‹

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.8%
  • Python 0.2%