์ฝ˜ํ…์ธ ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ

์ด๋ฏธ์ง€๋„ท ๋ฐ์ดํ„ฐ ์„ธํŠธ

์ด๋ฏธ์ง€๋„ท ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋” ํฐ ์ด๋ฏธ์ง€๋„ท ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ํ•˜์œ„ ์ง‘ํ•ฉ์ด์ง€๋งŒ, ์‰ฝ๊ฒŒ ๊ตฌ๋ถ„ํ•  ์ˆ˜ ์žˆ๋Š” 10๊ฐœ์˜ ํด๋ž˜์Šค๋งŒ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ๋ฐ ๊ต์œก์„ ์œ„ํ•ด ๋” ๋น ๋ฅด๊ณ  ์‚ฌ์šฉํ•˜๊ธฐ ์‰ฌ์šด ๋ฒ„์ „์˜ Imagenet์„ ์ œ๊ณตํ•˜๊ธฐ ์œ„ํ•ด ๋งŒ๋“ค์–ด์กŒ์Šต๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ

  • ์ด๋ฏธ์ง€๋„ท์—๋Š” ํ…์น˜, English ์Šคํ”„๋ง๊ฑฐ, ์นด์„ธํŠธ ํ”Œ๋ ˆ์ด์–ด, ์ฒด์ธํ†ฑ, ๊ตํšŒ, ํ”„๋ Œ์น˜ ํ˜ธ๋ฅธ, ์“ฐ๋ ˆ๊ธฐ ํŠธ๋Ÿญ, ์ฃผ์œ ๊ธฐ, ๊ณจํ”„๊ณต, ๋‚™ํ•˜์‚ฐ ๋“ฑ 10๊ฐ€์ง€ ํด๋ž˜์Šค์˜ ์ด๋ฏธ์ง€๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋‹ค์–‘ํ•œ ํฌ๊ธฐ์˜ ์ปฌ๋Ÿฌ ์ด๋ฏธ์ง€๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • ImageNette๋Š” ๋จธ์‹ ๋Ÿฌ๋‹ ๋ถ„์•ผ, ํŠนํžˆ ์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜ ์ž‘์—…์˜ ํ›ˆ๋ จ ๋ฐ ํ…Œ์ŠคํŠธ์— ๋„๋ฆฌ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

๋ฐ์ดํ„ฐ ์„ธํŠธ ๊ตฌ์กฐ

ImageNette ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋‘ ๊ฐœ์˜ ํ•˜์œ„ ์ง‘ํ•ฉ์œผ๋กœ ๋‚˜๋‰ฉ๋‹ˆ๋‹ค:

  1. ํ›ˆ๋ จ ์„ธํŠธ: ์ด ํ•˜์œ„ ์ง‘ํ•ฉ์—๋Š” ๋จธ์‹  ๋Ÿฌ๋‹ ๋ชจ๋ธ ํ•™์Šต์— ์‚ฌ์šฉ๋˜๋Š” ์ˆ˜์ฒœ ๊ฐœ์˜ ์ด๋ฏธ์ง€๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ •ํ™•ํ•œ ๊ฐœ์ˆ˜๋Š” ํด๋ž˜์Šค๋งˆ๋‹ค ๋‹ค๋ฆ…๋‹ˆ๋‹ค.
  2. ๊ฒ€์ฆ ์„ธํŠธ: ์ด ํ•˜์œ„ ์ง‘ํ•ฉ์€ ํ•™์Šต๋œ ๋ชจ๋ธ์„ ๊ฒ€์ฆํ•˜๊ณ  ๋ฒค์น˜๋งˆํ‚นํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ์ˆ˜๋ฐฑ ๊ฐœ์˜ ์ด๋ฏธ์ง€๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค. ๋‹ค์‹œ ๋งํ•˜์ง€๋งŒ, ์ •ํ™•ํ•œ ๊ฐœ์ˆ˜๋Š” ํด๋ž˜์Šค๋งˆ๋‹ค ๋‹ค๋ฆ…๋‹ˆ๋‹ค.

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜

ImageNette ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ์ปจ๋ณผ๋ฃจ์…˜ ์‹ ๊ฒฝ๋ง(CNN) ๋ฐ ๊ธฐํƒ€ ๋‹ค์–‘ํ•œ ๋จธ์‹  ๋Ÿฌ๋‹ ์•Œ๊ณ ๋ฆฌ์ฆ˜๊ณผ ๊ฐ™์€ ์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜ ์ž‘์—…์—์„œ ๋”ฅ ๋Ÿฌ๋‹ ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๊ณ  ํ‰๊ฐ€ํ•˜๋Š” ๋ฐ ๋„๋ฆฌ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ๊ฐ„๋‹จํ•œ ํ˜•์‹๊ณผ ์ž˜ ์„ ํƒ๋œ ํด๋ž˜์Šค๋Š” ๋จธ์‹  ๋Ÿฌ๋‹ ๋ฐ ์ปดํ“จํ„ฐ ๋น„์ „ ๋ถ„์•ผ์˜ ์ดˆ๋ณด์ž์™€ ์ˆ™๋ จ๋œ ์‹ค๋ฌด์ž ๋ชจ๋‘์—๊ฒŒ ํŽธ๋ฆฌํ•œ ๋ฆฌ์†Œ์Šค์ž…๋‹ˆ๋‹ค.

์‚ฌ์šฉ๋ฒ•

ํ‘œ์ค€ ์ด๋ฏธ์ง€ ํฌ๊ธฐ 224x224์˜ 100๊ฐœ ์‹œ๋Œ€์— ๋Œ€ํ•œ ImageNette ๋ฐ์ดํ„ฐ ์„ธํŠธ์—์„œ ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๋ ค๋ฉด ๋‹ค์Œ ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ธ์ˆ˜์˜ ์ „์ฒด ๋ชฉ๋ก์€ ๋ชจ๋ธ ํ›ˆ๋ จ ํŽ˜์ด์ง€๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

์—ด์ฐจ ์˜ˆ์‹œ

from ultralytics import YOLO

# Load a model
model = YOLO("yolov8n-cls.pt")  # load a pretrained model (recommended for training)

# Train the model
results = model.train(data="imagenette", epochs=100, imgsz=224)
# Start training from a pretrained *.pt model
yolo detect train data=imagenette model=yolov8n-cls.pt epochs=100 imgsz=224

์ƒ˜ํ”Œ ์ด๋ฏธ์ง€ ๋ฐ ์ฃผ์„

ImageNette ๋ฐ์ดํ„ฐ ์„ธํŠธ์—๋Š” ๋‹ค์–‘ํ•œ ๋ฌผ์ฒด์™€ ์žฅ๋ฉด์˜ ์ปฌ๋Ÿฌ ์ด๋ฏธ์ง€๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์–ด ์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜ ์ž‘์—…์„ ์œ„ํ•œ ๋‹ค์–‘ํ•œ ๋ฐ์ดํ„ฐ ์„ธํŠธ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ์€ ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ๋ช‡ ๊ฐ€์ง€ ์ด๋ฏธ์ง€ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค:

๋ฐ์ดํ„ฐ ์„ธํŠธ ์ƒ˜ํ”Œ ์ด๋ฏธ์ง€

์ด ์˜ˆ๋Š” ์ด๋ฏธ์ง€๋„ท ๋ฐ์ดํ„ฐ ์„ธํŠธ์— ํฌํ•จ๋œ ์ด๋ฏธ์ง€์˜ ๋‹ค์–‘์„ฑ๊ณผ ๋ณต์žก์„ฑ์„ ๋ณด์—ฌ์ฃผ๋ฉฐ, ๊ฐ•๋ ฅํ•œ ์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜ ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋‹ค์–‘ํ•œ ๋ฐ์ดํ„ฐ ์„ธํŠธ๊ฐ€ ์ค‘์š”ํ•˜๋‹ค๋Š” ์ ์„ ๊ฐ•์กฐํ•ฉ๋‹ˆ๋‹ค.

ImageNette160 ๋ฐ ImageNette320

๋” ๋น ๋ฅธ ํ”„๋กœํ† ํƒ€์ดํ•‘๊ณผ ํŠธ๋ ˆ์ด๋‹์„ ์œ„ํ•ด ImageNette ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋‘ ๊ฐ€์ง€ ์ถ•์†Œ๋œ ํฌ๊ธฐ๋กœ๋„ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค: ImageNette160๊ณผ ImageNette320์ž…๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ์ „์ฒด ImageNette ๋ฐ์ดํ„ฐ ์„ธํŠธ์™€ ๋™์ผํ•œ ํด๋ž˜์Šค ๋ฐ ๊ตฌ์กฐ๋ฅผ ์œ ์ง€ํ•˜์ง€๋งŒ ์ด๋ฏธ์ง€์˜ ํฌ๊ธฐ๊ฐ€ ๋” ์ž‘์€ ํฌ๊ธฐ๋กœ ์กฐ์ •๋ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ด๋Ÿฌํ•œ ๋ฒ„์ „์˜ ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ์˜ˆ๋น„ ๋ชจ๋ธ ํ…Œ์ŠคํŠธ ๋˜๋Š” ์ปดํ“จํŒ… ๋ฆฌ์†Œ์Šค๊ฐ€ ์ œํ•œ๋˜์–ด ์žˆ๋Š” ๊ฒฝ์šฐ์— ํŠนํžˆ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.

์ด๋Ÿฌํ•œ ๋ฐ์ดํ„ฐ ์„ธํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ํŠธ๋ ˆ์ด๋‹ ๋ช…๋ น์—์„œ 'imagenette'๋ฅผ 'imagenette160' ๋˜๋Š” 'imagenette320'์œผ๋กœ ๋ฐ”๊พธ๊ธฐ๋งŒ ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์ด ์ด๋ฅผ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค:

ImageNette160์„ ์‚ฌ์šฉํ•œ ํ›ˆ๋ จ ์˜ˆ์ œ

from ultralytics import YOLO

# Load a model
model = YOLO("yolov8n-cls.pt")  # load a pretrained model (recommended for training)

# Train the model with ImageNette160
results = model.train(data="imagenette160", epochs=100, imgsz=160)
# Start training from a pretrained *.pt model with ImageNette160
yolo detect train data=imagenette160 model=yolov8n-cls.pt epochs=100 imgsz=160

ImageNette320์„ ์‚ฌ์šฉํ•œ ํ›ˆ๋ จ ์˜ˆ์ œ

from ultralytics import YOLO

# Load a model
model = YOLO("yolov8n-cls.pt")  # load a pretrained model (recommended for training)

# Train the model with ImageNette320
results = model.train(data="imagenette320", epochs=100, imgsz=320)
# Start training from a pretrained *.pt model with ImageNette320
yolo detect train data=imagenette320 model=yolov8n-cls.pt epochs=100 imgsz=320

์ด๋Ÿฌํ•œ ์ž‘์€ ๋ฒ„์ „์˜ ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๊ฐœ๋ฐœ ๊ณผ์ •์—์„œ ์‹ ์†ํ•œ ๋ฐ˜๋ณต ์ž‘์—…์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•˜๋Š” ๋™์‹œ์— ๊ฐ€์น˜ ์žˆ๊ณ  ์‚ฌ์‹ค์ ์ธ ์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜ ์ž‘์—…์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

์ธ์šฉ ๋ฐ ๊ฐ์‚ฌ

์—ฐ๊ตฌ ๋˜๋Š” ๊ฐœ๋ฐœ ์ž‘์—…์— ImageNette ๋ฐ์ดํ„ฐ์…‹์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ์ ์ ˆํ•œ ์ธ์ •์„ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ImageNette ๋ฐ์ดํ„ฐ ์„ธํŠธ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ImageNette ๋ฐ์ดํ„ฐ ์„ธํŠธ GitHub ํŽ˜์ด์ง€๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.



Created 2023-11-12, Updated 2024-06-02
Authors: glenn-jocher (5)

๋Œ“๊ธ€