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

Ultralytics YOLO ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ๊ฐ€์ด๋“œ

์†Œ๊ฐœ

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

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋ž€ ๋ฌด์—‡์ธ๊ฐ€์š”?

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋Œ€ํ•œ ๋†’์€ ์ˆ˜์ค€์˜ ๊ตฌ์กฐ์  ์„ค์ •์ž…๋‹ˆ๋‹ค. ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋Š” ํ•™์Šต ๋‹จ๊ณ„ ์ „์— ์„ค์ •๋˜๋ฉฐ ํ•™์Šต ๋‹จ๊ณ„ ๋™์•ˆ ์ผ์ •ํ•˜๊ฒŒ ์œ ์ง€๋ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ์€ Ultralytics YOLO ์—์„œ ์ผ๋ฐ˜์ ์œผ๋กœ ์กฐ์ •๋˜๋Š” ๋ช‡ ๊ฐ€์ง€ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ์ž…๋‹ˆ๋‹ค:

  • ํ•™์Šต ์†๋„ lr0: ์—์„œ ์ตœ์†Œ๊ฐ’์„ ํ–ฅํ•ด ์ด๋™ํ•˜๋ฉด์„œ ๊ฐ ๋ฐ˜๋ณต์—์„œ ๋‹จ๊ณ„ ํฌ๊ธฐ๋ฅผ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค. ์†์‹ค ๊ธฐ๋Šฅ.
  • ๋ฐฐ์น˜ ํฌ๊ธฐ batch: ํฌ์›Œ๋“œ ํŒจ์Šค์—์„œ ๋™์‹œ์— ์ฒ˜๋ฆฌ๋˜๋Š” ์ด๋ฏธ์ง€ ์ˆ˜์ž…๋‹ˆ๋‹ค.
  • ์—ํฌํฌ ์ˆ˜ epochs: ํ•œ ์—ํฌํฌ๋Š” ๋ชจ๋“  ํ›ˆ๋ จ ์˜ˆ์ œ์˜ ์™„์ „ํ•œ ์ „์ง„ ๋ฐ ํ›„์ง„ ํŒจ์Šค๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
  • ์•„ํ‚คํ…์ฒ˜ ์„ธ๋ถ€ ์ •๋ณด: ์ฑ„๋„ ์ˆ˜, ๋ ˆ์ด์–ด ์ˆ˜, ํ™œ์„ฑํ™” ๊ธฐ๋Šฅ์˜ ์œ ํ˜• ๋“ฑ.

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

YOLO11 ์—์„œ ์‚ฌ์šฉ๋˜๋Š” ์ฆ๊ฐ• ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ์˜ ์ „์ฒด ๋ชฉ๋ก์€ ์„ค์ • ํŽ˜์ด์ง€๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

์œ ์ „์  ์ง„ํ™”์™€ ๋Œ์—ฐ๋ณ€์ด

Ultralytics YOLO ๋Š” ์œ ์ „ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์‚ฌ์šฉํ•˜์—ฌ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ตœ์ ํ™”ํ•ฉ๋‹ˆ๋‹ค. ์œ ์ „ ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ์ž์—ฐ ์„ ํƒ๊ณผ ์œ ์ „ํ•™์˜ ๋ฉ”์ปค๋‹ˆ์ฆ˜์—์„œ ์˜๊ฐ์„ ์–ป์—ˆ์Šต๋‹ˆ๋‹ค.

  • ๋Œ์—ฐ๋ณ€์ด: Ultralytics YOLO ์˜ ๋งฅ๋ฝ์—์„œ ๋Œ์—ฐ๋ณ€์ด๋Š” ๊ธฐ์กด ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ์— ์ž‘์€ ๋ฌด์ž‘์œ„ ๋ณ€๊ฒฝ์„ ์ ์šฉํ•˜์—ฌ ํ‰๊ฐ€ํ•  ์ƒˆ๋กœ์šด ํ›„๋ณด๋ฅผ ์ƒ์„ฑํ•จ์œผ๋กœ์จ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ๊ณต๊ฐ„์„ ๋กœ์ปฌ๋กœ ๊ฒ€์ƒ‰ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.
  • ํฌ๋กœ์Šค์˜ค๋ฒ„: ํฌ๋กœ์Šค์˜ค๋ฒ„๋Š” ๋„๋ฆฌ ์‚ฌ์šฉ๋˜๋Š” ์œ ์ „ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๊ธฐ๋ฒ•์ด์ง€๋งŒ, ํ˜„์žฌ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹์„ ์œ„ํ•ด Ultralytics YOLO ์—์„œ ์‚ฌ์šฉ๋˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค. ์ฃผ๋กœ ์ƒˆ๋กœ์šด ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์„ธํŠธ๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•œ ๋Œ์—ฐ๋ณ€์ด์— ์ดˆ์ ์„ ๋งž์ถ”๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

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

ํŠœ๋‹ ํ”„๋กœ์„ธ์Šค๋ฅผ ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— ๋‹ค์Œ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค:

  1. ๋ฉ”ํŠธ๋ฆญ์„ ์‹๋ณ„ํ•ฉ๋‹ˆ๋‹ค: ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์„ ํ‰๊ฐ€ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉํ•  ์ง€ํ‘œ๋ฅผ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค. AP50, F1 ์ ์ˆ˜ ๋“ฑ์ด ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  2. ํŠœ๋‹ ์˜ˆ์‚ฐ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค: ํ• ๋‹นํ•  ์ปดํ“จํŒ… ๋ฆฌ์†Œ์Šค์˜ ์–‘์„ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹์€ ๊ณ„์‚ฐ ์ง‘์•ฝ์ ์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ด€๋ จ ๋‹จ๊ณ„

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์ดˆ๊ธฐํ™”

ํ•ฉ๋ฆฌ์ ์ธ ์ดˆ๊ธฐ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์„ธํŠธ๋กœ ์‹œ์ž‘ํ•˜์„ธ์š”. Ultralytics YOLO ์—์„œ ์„ค์ •ํ•œ ๊ธฐ๋ณธ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ ๋„๋ฉ”์ธ ์ง€์‹ ๋˜๋Š” ์ด์ „ ์‹คํ—˜์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ๋ฎคํ…Œ์ด์…˜

์‚ฌ์šฉ _mutate ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ธฐ์กด ์ง‘ํ•ฉ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์ƒˆ๋กœ์šด ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์ง‘ํ•ฉ์„ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ธฐ์ฐจ ๋ชจ๋ธ

ํ›ˆ๋ จ์€ ๋ณ€ํ˜•๋œ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์„ธํŠธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ˆ˜ํ–‰๋ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ๋‹ค์Œ ํ›ˆ๋ จ ์„ฑ๋Šฅ์„ ํ‰๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

๋ชจ๋ธ ํ‰๊ฐ€

AP50, F1 ์ ์ˆ˜ ๋˜๋Š” ์‚ฌ์šฉ์ž ์ง€์ • ์ง€ํ‘œ์™€ ๊ฐ™์€ ์ง€ํ‘œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์„ ํ‰๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

๋กœ๊ทธ ๊ฒฐ๊ณผ

๋‚˜์ค‘์— ์ฐธ์กฐํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ฑ๋Šฅ ์ง€ํ‘œ์™€ ํ•ด๋‹น ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ๋ชจ๋‘ ๊ธฐ๋กํ•ด ๋‘๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค.

๋ฐ˜๋ณต

์ด ๊ณผ์ •์€ ์„ค์ •๋œ ๋ฐ˜๋ณต ํšŸ์ˆ˜์— ๋„๋‹ฌํ•˜๊ฑฐ๋‚˜ ์„ฑ๋Šฅ ์ง€ํ‘œ๊ฐ€ ๋งŒ์กฑ์Šค๋Ÿฌ์›Œ์งˆ ๋•Œ๊นŒ์ง€ ๋ฐ˜๋ณต๋ฉ๋‹ˆ๋‹ค.

์‚ฌ์šฉ ์˜ˆ

์‚ฌ์šฉ ๋ฐฉ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. model.tune() ๋ฉ”์„œ๋“œ๋ฅผ ํ™œ์šฉํ•˜๋ ค๋ฉด Tuner ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ 30๊ฐœ ์—ํฌํฌ์— ๋Œ€ํ•œ COCO8์˜ YOLO11n ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹์„ ์œ„ํ•ด AdamW ์˜ตํ‹ฐ๋งˆ์ด์ €๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์ตœ์ข… ์—ํฌํฌ ์ด์™ธ์˜ ํ”Œ๋กœํŒ…, ์ฒดํฌํฌ์ธํŠธ ๋ฐ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ๋ฅผ ์ƒ๋žตํ•˜์—ฌ ๋” ๋น ๋ฅด๊ฒŒ ํŠœ๋‹ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์˜ˆ

from ultralytics import YOLO

# Initialize the YOLO model
model = YOLO("yolo11n.pt")

# Tune hyperparameters on COCO8 for 30 epochs
model.tune(data="coco8.yaml", epochs=30, iterations=300, optimizer="AdamW", plots=False, save=False, val=False)

๊ฒฐ๊ณผ

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ํ”„๋กœ์„ธ์Šค๋ฅผ ์„ฑ๊ณต์ ์œผ๋กœ ์™„๋ฃŒํ•˜๋ฉด ํŠœ๋‹ ๊ฒฐ๊ณผ๋ฅผ ์บก์Šํ™”ํ•œ ์—ฌ๋Ÿฌ ํŒŒ์ผ๊ณผ ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์–ป๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ์€ ๊ฐ๊ฐ์— ๋Œ€ํ•œ ์„ค๋ช…์ž…๋‹ˆ๋‹ค:

ํŒŒ์ผ ๊ตฌ์กฐ

๊ฒฐ๊ณผ์˜ ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ต์œก ๋””๋ ‰ํ„ฐ๋ฆฌ train1/ ์—๋Š” ๊ฐœ๋ณ„ ํŠœ๋‹ ๋ฐ˜๋ณต, ์ฆ‰ ํ•˜๋‚˜์˜ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์„ธํŠธ๋กœ ํ•™์Šต๋œ ํ•˜๋‚˜์˜ ๋ชจ๋ธ์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  tune/ ๋””๋ ‰ํ„ฐ๋ฆฌ์—๋Š” ๋ชจ๋“  ๊ฐœ๋ณ„ ๋ชจ๋ธ ํŠธ๋ ˆ์ด๋‹์˜ ํŠœ๋‹ ๊ฒฐ๊ณผ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค:

runs/
โ””โ”€โ”€ detect/
    โ”œโ”€โ”€ train1/
    โ”œโ”€โ”€ train2/
    โ”œโ”€โ”€ ...
    โ””โ”€โ”€ tune/
        โ”œโ”€โ”€ best_hyperparameters.yaml
        โ”œโ”€โ”€ best_fitness.png
        โ”œโ”€โ”€ tune_results.csv
        โ”œโ”€โ”€ tune_scatter_plots.png
        โ””โ”€โ”€ weights/
            โ”œโ”€โ”€ last.pt
            โ””โ”€โ”€ best.pt

ํŒŒ์ผ ์„ค๋ช…

best_hyperparameters.yaml

์ด YAML ํŒŒ์ผ์—๋Š” ํŠœ๋‹ ๊ณผ์ •์—์„œ ๋ฐœ๊ฒฌ๋œ ๊ฐ€์žฅ ์„ฑ๋Šฅ์ด ์ข‹์€ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ตœ์ ํ™”๋œ ์„ค์ •์œผ๋กœ ํ–ฅํ›„ ํŠธ๋ ˆ์ด๋‹์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • ํ˜•์‹: YAML
  • ์‚ฌ์šฉ๋ฒ•: ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ๊ฒฐ๊ณผ
  • ์˜ˆ์‹œ:

    # 558/900 iterations complete โœ… (45536.81s)
    # Results saved to /usr/src/ultralytics/runs/detect/tune
    # Best fitness=0.64297 observed at iteration 498
    # Best fitness metrics are {'metrics/precision(B)': 0.87247, 'metrics/recall(B)': 0.71387, 'metrics/mAP50(B)': 0.79106, 'metrics/mAP50-95(B)': 0.62651, 'val/box_loss': 2.79884, 'val/cls_loss': 2.72386, 'val/dfl_loss': 0.68503, 'fitness': 0.64297}
    # Best fitness model is /usr/src/ultralytics/runs/detect/train498
    # Best fitness hyperparameters are printed below.
    
    lr0: 0.00269
    lrf: 0.00288
    momentum: 0.73375
    weight_decay: 0.00015
    warmup_epochs: 1.22935
    warmup_momentum: 0.1525
    box: 18.27875
    cls: 1.32899
    dfl: 0.56016
    hsv_h: 0.01148
    hsv_s: 0.53554
    hsv_v: 0.13636
    degrees: 0.0
    translate: 0.12431
    scale: 0.07643
    shear: 0.0
    perspective: 0.0
    flipud: 0.0
    fliplr: 0.08631
    mosaic: 0.42551
    mixup: 0.0
    copy_paste: 0.0
    

best_fitness.png

์ด๊ฒƒ์€ ๋ฐ˜๋ณต ํšŸ์ˆ˜์— ๋Œ€ํ•œ ์ ํ•ฉ์„ฑ(์ผ๋ฐ˜์ ์œผ๋กœ AP50๊ณผ ๊ฐ™์€ ์„ฑ๋Šฅ ์ง€ํ‘œ)์„ ํ‘œ์‹œํ•˜๋Š” ํ”Œ๋กฏ์ž…๋‹ˆ๋‹ค. ์‹œ๊ฐ„์ด ์ง€๋‚จ์— ๋”ฐ๋ผ ์œ ์ „ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์–ผ๋งˆ๋‚˜ ์ž˜ ์ˆ˜ํ–‰๋˜์—ˆ๋Š”์ง€ ์‹œ๊ฐํ™”ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.

  • ํ˜•์‹: ํ˜•์‹: PNG
  • ์‚ฌ์šฉ๋ฒ•: ์„ฑ๋Šฅ ์‹œ๊ฐํ™”

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ์ ํ•ฉ์„ฑ ๋Œ€ ๋ฐ˜๋ณต

tune_results.csv

ํŠœ๋‹ ์ค‘ ๊ฐ ๋ฐ˜๋ณต์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๊ฒฐ๊ณผ๊ฐ€ ํฌํ•จ๋œ CSV ํŒŒ์ผ์ž…๋‹ˆ๋‹ค. ํŒŒ์ผ์˜ ๊ฐ ํ–‰์€ ํ•˜๋‚˜์˜ ๋ฐ˜๋ณต์„ ๋‚˜ํƒ€๋‚ด๋ฉฐ, ์‚ฌ์šฉ๋œ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์ ํ•ฉ๋„ ์ ์ˆ˜, ์ •ํ™•๋„, ์žฌ์ ‘์†๋ฅ ๊ณผ ๊ฐ™์€ ๋ฉ”ํŠธ๋ฆญ์ด ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.

  • ํ˜•์‹: CSV
  • ์‚ฌ์šฉ๋ฒ•: ๋ฐ˜๋ณต๋‹น ๊ฒฐ๊ณผ ์ถ”์ .
  • ์˜ˆ:
      fitness,lr0,lrf,momentum,weight_decay,warmup_epochs,warmup_momentum,box,cls,dfl,hsv_h,hsv_s,hsv_v,degrees,translate,scale,shear,perspective,flipud,fliplr,mosaic,mixup,copy_paste
      0.05021,0.01,0.01,0.937,0.0005,3.0,0.8,7.5,0.5,1.5,0.015,0.7,0.4,0.0,0.1,0.5,0.0,0.0,0.0,0.5,1.0,0.0,0.0
      0.07217,0.01003,0.00967,0.93897,0.00049,2.79757,0.81075,7.5,0.50746,1.44826,0.01503,0.72948,0.40658,0.0,0.0987,0.4922,0.0,0.0,0.0,0.49729,1.0,0.0,0.0
      0.06584,0.01003,0.00855,0.91009,0.00073,3.42176,0.95,8.64301,0.54594,1.72261,0.01503,0.59179,0.40658,0.0,0.0987,0.46955,0.0,0.0,0.0,0.49729,0.80187,0.0,0.0
    

ํŠ _๋ถ„์‚ฐ_ํ”Œ๋กฏ.png

์ด ํŒŒ์ผ์—๋Š” ๋‹ค์Œ์—์„œ ์ƒ์„ฑ๋œ ๋ถ„์‚ฐํ˜• ์ฐจํŠธ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. tune_results.csv๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์–‘ํ•œ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ์™€ ์„ฑ๋Šฅ ์ง€ํ‘œ ๊ฐ„์˜ ๊ด€๊ณ„๋ฅผ ์‹œ๊ฐํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 0์œผ๋กœ ์ดˆ๊ธฐํ™”๋œ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์กฐ์ •๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. degrees ๊ทธ๋ฆฌ๊ณ  shear ์•„๋ž˜์— ์žˆ์Šต๋‹ˆ๋‹ค.

  • ํ˜•์‹: ํ˜•์‹: PNG
  • ์‚ฌ์šฉ๋ฒ•: ํƒ์ƒ‰์  ๋ฐ์ดํ„ฐ ๋ถ„์„

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

๊ฐ€์ค‘์น˜/

์ด ๋””๋ ‰ํ„ฐ๋ฆฌ์—๋Š” ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ํ”„๋กœ์„ธ์Šค ์ค‘ ๋งˆ์ง€๋ง‰ ๋ฐ˜๋ณต์— ๋Œ€ํ•ด ์ €์žฅ๋œ PyTorch ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ํ”„๋กœ์„ธ์Šค ์ค‘ ๋งˆ์ง€๋ง‰ ๋ฐ ์ตœ์ƒ์˜ ๋ฐ˜๋ณต์— ๋Œ€ํ•œ ๋ชจ๋ธ์ด ์ €์žฅ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

  • last.pt: ๋งˆ์ง€๋ง‰.pt๋Š” ํ›ˆ๋ จ์˜ ๋งˆ์ง€๋ง‰ ์‹œ๊ธฐ์˜ ์›จ์ดํŠธ์ž…๋‹ˆ๋‹ค.
  • best.pt: ์ตœ๊ณ ์˜ ํ”ผํŠธ๋‹ˆ์Šค ์ ์ˆ˜๋ฅผ ๋‹ฌ์„ฑํ•œ ๋ฐ˜๋ณต์— ๋Œ€ํ•œ best.pt ๊ฐ€์ค‘์น˜์ž…๋‹ˆ๋‹ค.

์ด๋Ÿฌํ•œ ๊ฒฐ๊ณผ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ–ฅํ›„ ๋ชจ๋ธ ํ›ˆ๋ จ ๋ฐ ๋ถ„์„์— ๋Œ€ํ•ด ๋ณด๋‹ค ์ •ํ™•ํ•œ ์ •๋ณด๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์˜์‚ฌ ๊ฒฐ์ •์„ ๋‚ด๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์•„ํ‹ฐํŒฉํŠธ๋ฅผ ์ฐธ์กฐํ•˜์—ฌ ๋ชจ๋ธ์ด ์–ผ๋งˆ๋‚˜ ์ž˜ ์ˆ˜ํ–‰๋˜์—ˆ๋Š”์ง€, ์–ด๋–ป๊ฒŒ ๋” ๊ฐœ์„ ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์•Œ์•„๋ณด์„ธ์š”.

๊ฒฐ๋ก 

Ultralytics YOLO ์˜ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ํ”„๋กœ์„ธ์Šค๋Š” ๋Œ์—ฐ๋ณ€์ด์— ์ดˆ์ ์„ ๋งž์ถ˜ ์œ ์ „ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๊ธฐ๋ฐ˜ ์ ‘๊ทผ ๋ฐฉ์‹ ๋•๋ถ„์— ๋‹จ์ˆœํ•˜๋ฉด์„œ๋„ ๊ฐ•๋ ฅํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ฐ€์ด๋“œ์— ์„ค๋ช…๋œ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ฅด๋ฉด ๋ชจ๋ธ์„ ์ฒด๊ณ„์ ์œผ๋กœ ํŠœ๋‹ํ•˜์—ฌ ๋” ๋‚˜์€ ์„ฑ๋Šฅ์„ ๋‹ฌ์„ฑํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.

์ถ”๊ฐ€ ์ฝ๊ธฐ

  1. ์œ„ํ‚คํ”ผ๋””์•„์˜ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์ตœ์ ํ™”
  2. YOLOv5 ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์ง„ํ™” ๊ฐ€์ด๋“œ
  3. ๋ ˆ์ด ํŠ ์„ ํ†ตํ•œ ํšจ์œจ์ ์ธ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ๋ฐ YOLO11

๋” ๊นŠ์€ ์ธ์‚ฌ์ดํŠธ๋ฅผ ์–ป์œผ๋ ค๋ฉด ๋‹ค์Œ์„ ์‚ดํŽด๋ณด์„ธ์š”. Tuner ํด๋ž˜์Šค ์†Œ์Šค ์ฝ”๋“œ์™€ ํ•จ๊ป˜ ์ œ๊ณต๋˜๋Š” ์„ค๋ช…์„œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”. ์งˆ๋ฌธ์ด๋‚˜ ๊ธฐ๋Šฅ ์š”์ฒญ์ด ์žˆ๊ฑฐ๋‚˜ ์ถ”๊ฐ€ ์ง€์›์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ ๋‹ค์Œ ์ฃผ์†Œ๋กœ ์–ธ์ œ๋“ ์ง€ ๋ฌธ์˜ํ•ด ์ฃผ์„ธ์š”. GitHub ๋˜๋Š” ๋ถˆํ™”.

์ž์ฃผ ๋ฌป๋Š” ์งˆ๋ฌธ

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ์ค‘์— Ultralytics YOLO ์˜ ํ•™์Šต ์†๋„๋ฅผ ์ตœ์ ํ™”ํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

Ultralytics YOLO ์— ๋Œ€ํ•œ ํ•™์Šต ์†๋„๋ฅผ ์ตœ์ ํ™”ํ•˜๋ ค๋ฉด ๋จผ์ € ๋‹ค์Œ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ดˆ๊ธฐ ํ•™์Šต ์†๋„๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. lr0 ๋งค๊ฐœ๋ณ€์ˆ˜์ž…๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์ธ ๊ฐ’์˜ ๋ฒ”์œ„๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. 0.001 ์— 0.01. ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ํ”„๋กœ์„ธ์Šค ์ค‘์— ์ด ๊ฐ’์€ ์ตœ์ ์˜ ์„ค์ •์„ ์ฐพ๊ธฐ ์œ„ํ•ด ๋ณ€๊ฒฝ๋ฉ๋‹ˆ๋‹ค. ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ๊ณผ์ •์—์„œ model.tune() ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด ํ”„๋กœ์„ธ์Šค๋ฅผ ์ž๋™ํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด

์˜ˆ

from ultralytics import YOLO

# Initialize the YOLO model
model = YOLO("yolo11n.pt")

# Tune hyperparameters on COCO8 for 30 epochs
model.tune(data="coco8.yaml", epochs=30, iterations=300, optimizer="AdamW", plots=False, save=False, val=False)

์ž์„ธํ•œ ๋‚ด์šฉ์€ Ultralytics YOLO ๊ตฌ์„ฑ ํŽ˜์ด์ง€์—์„œ ํ™•์ธํ•˜์„ธ์š”.

YOLO11 ์—์„œ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹์— ์œ ์ „ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์‚ฌ์šฉํ•˜๋ฉด ์–ด๋–ค ์ด์ ์ด ์žˆ๋‚˜์š”?

์œ ์ „ ์•Œ๊ณ ๋ฆฌ์ฆ˜( Ultralytics YOLO11 )์€ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ๊ณต๊ฐ„์„ ํƒ์ƒ‰ํ•˜๋Š” ๊ฐ•๋ ฅํ•œ ๋ฐฉ๋ฒ•์„ ์ œ๊ณตํ•˜์—ฌ ๊ณ ๋„๋กœ ์ตœ์ ํ™”๋œ ๋ชจ๋ธ ์„ฑ๋Šฅ์„ ์ด๋Œ์–ด๋ƒ…๋‹ˆ๋‹ค. ์ฃผ์š” ์ด์ ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:

  • ํšจ์œจ์ ์ธ ๊ฒ€์ƒ‰: ๋Œ์—ฐ๋ณ€์ด์™€ ๊ฐ™์€ ์œ ์ „์ž ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ๋Œ€๊ทœ๋ชจ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์„ธํŠธ๋ฅผ ๋น ๋ฅด๊ฒŒ ํƒ์ƒ‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ๋กœ์ปฌ ์ตœ์†Œ๊ฐ’ ํ”ผํ•˜๊ธฐ: ๋ฌด์ž‘์œ„์„ฑ์„ ๋„์ž…ํ•˜์—ฌ ๋กœ์ปฌ ์ตœ์†Œ๊ฐ’์„ ํ”ผํ•˜๊ณ  ๋” ๋‚˜์€ ๊ธ€๋กœ๋ฒŒ ์ตœ์ ํ™”๋ฅผ ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค.
  • ์„ฑ๋Šฅ ์ง€ํ‘œ: AP50 ๋ฐ F1 ์ ์ˆ˜์™€ ๊ฐ™์€ ์„ฑ๋Šฅ ๋ฉ”ํŠธ๋ฆญ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์กฐ์ •๋ฉ๋‹ˆ๋‹ค.

์œ ์ „ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ตœ์ ํ™”ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด๋ ค๋ฉด ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ์ง„ํ™” ๊ฐ€์ด๋“œ๋ฅผ ํ™•์ธํ•˜์„ธ์š”.

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ํ”„๋กœ์„ธ์Šค๋Š” ์–ผ๋งˆ๋‚˜ ๊ฑธ๋ฆฌ๋‚˜์š” Ultralytics YOLO ?

Ultralytics YOLO ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹์— ํ•„์š”ํ•œ ์‹œ๊ฐ„์€ ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ํฌ๊ธฐ, ๋ชจ๋ธ ์•„ํ‚คํ…์ฒ˜์˜ ๋ณต์žก์„ฑ, ๋ฐ˜๋ณต ํšŸ์ˆ˜, ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๊ณ„์‚ฐ ๋ฆฌ์†Œ์Šค ๋“ฑ ์—ฌ๋Ÿฌ ์š”์ธ์— ๋”ฐ๋ผ ํฌ๊ฒŒ ๋‹ฌ๋ผ์ง‘๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, COCO8๊ณผ ๊ฐ™์€ ๋ฐ์ดํ„ฐ ์„ธํŠธ์—์„œ 30๊ฐœ ์—ํฌํฌ์— ๋Œ€ํ•ด YOLO11n์„ ํŠœ๋‹ํ•˜๋Š” ๋ฐ๋Š” ํ•˜๋“œ์›จ์–ด์— ๋”ฐ๋ผ ๋ช‡ ์‹œ๊ฐ„์—์„œ ๋ฉฐ์น ์ด ๊ฑธ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํŠœ๋‹ ์‹œ๊ฐ„์„ ํšจ๊ณผ์ ์œผ๋กœ ๊ด€๋ฆฌํ•˜๋ ค๋ฉด ์‚ฌ์ „์— ๋ช…ํ™•ํ•œ ํŠœ๋‹ ์˜ˆ์‚ฐ์„ ์ •์˜ํ•˜์„ธ์š”(๋‚ด๋ถ€ ์„น์…˜ ๋งํฌ). ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๋ฆฌ์†Œ์Šค ํ• ๋‹น๊ณผ ์ตœ์ ํ™” ๋ชฉํ‘œ์˜ ๊ท ํ˜•์„ ๋งž์ถ”๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹ ์ค‘ ๋ชจ๋ธ ์„ฑ๋Šฅ์„ ํ‰๊ฐ€ํ•˜๋ ค๋ฉด ์–ด๋–ค ๋ฉ”ํŠธ๋ฆญ์„ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋‚˜์š” YOLO?

YOLO ์—์„œ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์กฐ์ •ํ•˜๋Š” ๋™์•ˆ ๋ชจ๋ธ ์„ฑ๋Šฅ์„ ํ‰๊ฐ€ํ•  ๋•Œ ๋ช‡ ๊ฐ€์ง€ ์ฃผ์š” ์ง€ํ‘œ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

  • AP50: IoU ์ž„๊ณ„๊ฐ’ 0.50์˜ ํ‰๊ท  ์ •๋ฐ€๋„์ž…๋‹ˆ๋‹ค.
  • F1-์ ์ˆ˜: ์ •๋ฐ€๋„์™€ ํšŒ์ƒ๋ฅ ์˜ ์กฐํ™” ํ‰๊ท ์ž…๋‹ˆ๋‹ค.
  • ์ •ํ™•๋„ ๋ฐ ํšŒ์ˆ˜์œจ: ์˜คํƒ๊ณผ ๋ฏธํƒ์„ ์‹๋ณ„ํ•˜๋Š” ๋ชจ๋ธ์˜ ์ •ํ™•๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ๊ฐœ๋ณ„ ๋ฉ”ํŠธ๋ฆญ์œผ๋กœ, ์˜คํƒ๊ณผ ๋ฏธํƒ์„ ๊ตฌ๋ถ„ํ•˜๋Š” ์ •ํ™•๋„๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.

์ด๋Ÿฌํ•œ ๋ฉ”ํŠธ๋ฆญ์€ ๋ชจ๋ธ ์„ฑ๋Šฅ์˜ ๋‹ค์–‘ํ•œ ์ธก๋ฉด์„ ์ดํ•ดํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค. ์ข…ํ•ฉ์ ์ธ ๊ฐœ์š”๋Š” Ultralytics YOLO ์„ฑ๋Šฅ ์ง€ํ‘œ ๊ฐ€์ด๋“œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

YOLO ๋ชจ๋ธ์˜ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹์— Ultralytics HUB๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‚˜์š”?

์˜ˆ, YOLO ๋ชจ๋ธ์˜ ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹์„ ์œ„ํ•ด Ultralytics HUB๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. HUB๋Š” ๋ฐ์ดํ„ฐ ์„ธํŠธ๋ฅผ ์‰ฝ๊ฒŒ ์—…๋กœ๋“œํ•˜๊ณ , ๋ชจ๋ธ์„ ํ•™์Šต์‹œํ‚ค๊ณ , ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹์„ ํšจ์œจ์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ์ฝ”๋“œ ์—†๋Š” ํ”Œ๋žซํผ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ํŠœ๋‹ ์ง„ํ–‰ ์ƒํ™ฉ๊ณผ ๊ฒฐ๊ณผ๋ฅผ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์ถ”์ ํ•˜๊ณ  ์‹œ๊ฐํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ•˜์ดํผํŒŒ๋ผ๋ฏธํ„ฐ ํŠœ๋‹์„ ์œ„ํ•œ Ultralytics HUB ์‚ฌ์šฉ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ Ultralytics HUB ํด๋ผ์šฐ๋“œ ๊ต์œก ๋ฌธ์„œ์—์„œ ํ™•์ธํ•˜์„ธ์š”.

๐Ÿ“…1 ๋…„ ์ „ ์ƒ์„ฑ๋จ โœ๏ธ 1๊ฐœ์›” ์ „ ์—…๋ฐ์ดํŠธ๋จ

๋Œ“๊ธ€