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

YOLO-NAS

๊ฐœ์š”

Deci AI, YOLO ์—์„œ ๊ฐœ๋ฐœํ•œ -NAS๋Š” ํš๊ธฐ์ ์ธ ๊ฐ์ฒด ๊ฐ์ง€ ๊ธฐ๋ฐ˜ ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค. ์ด ๋ชจ๋ธ์€ ์ด์ „ YOLO ๋ชจ๋ธ์˜ ํ•œ๊ณ„๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ์„ธ์‹ฌํ•˜๊ฒŒ ์„ค๊ณ„๋œ ๊ณ ๊ธ‰ ์‹ ๊ฒฝ๋ง ์•„ํ‚คํ…์ฒ˜ ๊ฒ€์ƒ‰ ๊ธฐ์ˆ ์˜ ์‚ฐ๋ฌผ์ž…๋‹ˆ๋‹ค. ์ •๋Ÿ‰ํ™” ์ง€์›๊ณผ ์ •ํ™•๋„-์ง€์—ฐ ์‹œ๊ฐ„ ํŠธ๋ ˆ์ด๋“œ์˜คํ”„๊ฐ€ ํฌ๊ฒŒ ๊ฐœ์„ ๋œ YOLO-NAS๋Š” ๊ฐ์ฒด ๊ฐ์ง€์— ์žˆ์–ด ํฐ ๋„์•ฝ์„ ์ด๋ค˜์Šต๋‹ˆ๋‹ค.

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

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

  • ์–‘์žํ™” ์นœํ™”์  ๊ธฐ๋ณธ ๋ธ”๋ก: YOLO-NAS๋Š” ์–‘์žํ™”์— ์นœํ™”์ ์ธ ์ƒˆ๋กœ์šด ๊ธฐ๋ณธ ๋ธ”๋ก์„ ๋„์ž…ํ•˜์—ฌ ์ด์ „ YOLO ๋ชจ๋ธ์˜ ์ค‘์š”ํ•œ ํ•œ๊ณ„ ์ค‘ ํ•˜๋‚˜๋ฅผ ํ•ด๊ฒฐํ•ฉ๋‹ˆ๋‹ค.
  • ์ •๊ตํ•œ ํ›ˆ๋ จ ๋ฐ ์ •๋Ÿ‰ํ™”: YOLO-NAS๋Š” ๊ณ ๊ธ‰ ํ›ˆ๋ จ ์ฒด๊ณ„์™€ ํ›ˆ๋ จ ํ›„ ์ •๋Ÿ‰ํ™”๋ฅผ ํ™œ์šฉํ•˜์—ฌ ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค.
  • AutoNAC ์ตœ์ ํ™” ๋ฐ ์‚ฌ์ „ ๊ต์œก: YOLO-NAS๋Š” AutoNAC ์ตœ์ ํ™”๋ฅผ ํ™œ์šฉํ•˜๋ฉฐ COCO, Objects365, Roboflow 100๊ณผ ๊ฐ™์€ ์ฃผ์š” ๋ฐ์ดํ„ฐ ์„ธํŠธ์— ๋Œ€ํ•ด ์‚ฌ์ „ ๊ต์œก์„ ๋ฐ›์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์‚ฌ์ „ ํ•™์Šต์„ ํ†ตํ•ด ํ”„๋กœ๋•์…˜ ํ™˜๊ฒฝ์˜ ๋‹ค์šด์ŠคํŠธ๋ฆผ ์˜ค๋ธŒ์ ํŠธ ํƒ์ง€ ์ž‘์—…์— ๋งค์šฐ ์ ํ•ฉํ•ฉ๋‹ˆ๋‹ค.

์‚ฌ์ „ ํ•™์Šต๋œ ๋ชจ๋ธ

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

๋ชจ๋ธ mAP ์ง€์—ฐ ์‹œ๊ฐ„(ms)
YOLO-NAS S 47.5 3.21
YOLO-NAS M 51.55 5.85
YOLO-NAS L 52.22 7.87
YOLO-NAS S INT-8 47.03 2.36
YOLO-NAS M INT-8 51.0 3.78
YOLO-NAS L INT-8 52.1 4.78

๊ฐ ๋ชจ๋ธ ๋ณ€ํ˜•์€ ํ‰๊ท  ํ‰๊ท  ์ •๋ฐ€๋„(mAP)์™€ ์ง€์—ฐ ์‹œ๊ฐ„ ๊ฐ„์˜ ๊ท ํ˜•์„ ์ œ๊ณตํ•˜๋„๋ก ์„ค๊ณ„๋˜์–ด ์„ฑ๋Šฅ๊ณผ ์†๋„ ๋ชจ๋‘์—์„œ ๋ฌผ์ฒด ๊ฐ์ง€ ์ž‘์—…์„ ์ตœ์ ํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์‚ฌ์šฉ ์˜ˆ

Ultralytics ๋ฅผ ํ†ตํ•ด Python ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์‰ฝ๊ฒŒ ํ†ตํ•ฉํ•  ์ˆ˜ ์žˆ๋Š” YOLO-NAS ๋ชจ๋ธ์„ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ultralytics python ํŒจํ‚ค์ง€๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”. ์ด ํŒจํ‚ค์ง€๋Š” ์‚ฌ์šฉ์ž ์นœํ™”์ ์ธ Python API๋ฅผ ์ œ๊ณตํ•˜์—ฌ ํ”„๋กœ์„ธ์Šค๋ฅผ ๊ฐ„์†Œํ™”ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ ์˜ˆ๋Š” YOLO-NAS ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. ultralytics ํŒจํ‚ค์ง€๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ถ”๋ก  ๋ฐ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค:

์ถ”๋ก  ๋ฐ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์˜ˆ์ œ

์ด ์˜ˆ์—์„œ๋Š” COCO8 ๋ฐ์ดํ„ฐ ์„ธํŠธ์—์„œ YOLO-NAS-s์˜ ์œ ํšจ์„ฑ์„ ๊ฒ€์‚ฌํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ

์ด ์˜ˆ๋Š” YOLO-NAS์— ๋Œ€ํ•œ ๊ฐ„๋‹จํ•œ ์ถ”๋ก  ๋ฐ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์ฝ”๋“œ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ถ”๋ก  ๊ฒฐ๊ณผ ์ฒ˜๋ฆฌ์— ๋Œ€ํ•ด์„œ๋Š” ์˜ˆ์ธก ๋ชจ๋“œ๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ์ถ”๊ฐ€ ๋ชจ๋“œ์™€ ํ•จ๊ป˜ YOLO-NAS๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋‹ค์Œ์„ ์ฐธ์กฐํ•˜์„ธ์š”. Val ๊ทธ๋ฆฌ๊ณ  ๋‚ด๋ณด๋‚ด๊ธฐ. YOLO-NAS์˜ ultralytics ํŒจํ‚ค์ง€๋Š” ๊ต์œก์„ ์ง€์›ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

PyTorch ์‚ฌ์ „ ๊ต์œก *.pt ๋ชจ๋ธ ํŒŒ์ผ์€ NAS() ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ python ์—์„œ ๋ชจ๋ธ ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค:

from ultralytics import NAS

# Load a COCO-pretrained YOLO-NAS-s model
model = NAS("yolo_nas_s.pt")

# Display model information (optional)
model.info()

# Validate the model on the COCO8 example dataset
results = model.val(data="coco8.yaml")

# Run inference with the YOLO-NAS-s model on the 'bus.jpg' image
results = model("path/to/bus.jpg")

CLI ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ชจ๋ธ์„ ์ง์ ‘ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

# Load a COCO-pretrained YOLO-NAS-s model and validate it's performance on the COCO8 example dataset
yolo val model=yolo_nas_s.pt data=coco8.yaml

# Load a COCO-pretrained YOLO-NAS-s model and run inference on the 'bus.jpg' image
yolo predict model=yolo_nas_s.pt source=path/to/bus.jpg

์ง€์›๋˜๋Š” ์ž‘์—… ๋ฐ ๋ชจ๋“œ

YOLO-NAS ๋ชจ๋ธ์—๋Š” ์„ธ ๊ฐ€์ง€ ๋ณ€ํ˜•์ด ์žˆ์Šต๋‹ˆ๋‹ค: ์†Œํ˜•(s), ์ค‘ํ˜•(m), ๋Œ€ํ˜•(l). ๊ฐ ๋ชจ๋ธ์€ ์„œ๋กœ ๋‹ค๋ฅธ ๊ณ„์‚ฐ ๋ฐ ์„ฑ๋Šฅ ์š”๊ตฌ ์‚ฌํ•ญ์„ ์ถฉ์กฑํ•˜๋„๋ก ์„ค๊ณ„๋˜์—ˆ์Šต๋‹ˆ๋‹ค:

  • YOLO-NAS-s: ์ปดํ“จํŒ… ๋ฆฌ์†Œ์Šค๋Š” ์ œํ•œ๋˜์–ด ์žˆ์ง€๋งŒ ํšจ์œจ์„ฑ์ด ์ค‘์š”ํ•œ ํ™˜๊ฒฝ์— ์ตœ์ ํ™”๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • YOLO-NAS-m: ๋” ๋†’์€ ์ •ํ™•๋„๋กœ ๋ฒ”์šฉ ๋ฌผ์ฒด ๊ฐ์ง€์— ์ ํ•ฉํ•œ ๊ท ํ˜• ์žกํžŒ ์ ‘๊ทผ ๋ฐฉ์‹์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • YOLO-NAS-l: ๊ณ„์‚ฐ ๋ฆฌ์†Œ์Šค์˜ ์ œ์•ฝ์ด ์ ์€ ์ตœ๊ณ  ์ •ํ™•๋„๊ฐ€ ํ•„์š”ํ•œ ์‹œ๋‚˜๋ฆฌ์˜ค์— ๋งž๊ฒŒ ์กฐ์ •๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์•„๋ž˜๋Š” ์‚ฌ์ „ ํ•™์Šต๋œ ๊ฐ€์ค‘์น˜, ์ง€์›๋˜๋Š” ์ž‘์—…, ๋‹ค์–‘ํ•œ ์šด์˜ ๋ชจ๋“œ์™€์˜ ํ˜ธํ™˜์„ฑ ๋งํฌ๋ฅผ ํฌํ•จํ•˜์—ฌ ๊ฐ ๋ชจ๋ธ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๊ฐœ์š”์ž…๋‹ˆ๋‹ค.

๋ชจ๋ธ ์œ ํ˜• ์‚ฌ์ „ ํ•™์Šต๋œ ๊ฐ€์ค‘์น˜ ์ง€์›๋˜๋Š” ์ž‘์—… ์ถ”๋ก  ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ๊ต์œก ๋‚ด๋ณด๋‚ด๊ธฐ
YOLO-NAS-s yolo_nas_s.pt ๋ฌผ์ฒด ๊ฐ์ง€ โœ… โœ… โŒ โœ…
YOLO-NAS-m yolo_nas_m.pt ๋ฌผ์ฒด ๊ฐ์ง€ โœ… โœ… โŒ โœ…
YOLO-NAS-l yolo_nas_l.pt ๋ฌผ์ฒด ๊ฐ์ง€ โœ… โœ… โŒ โœ…

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

์—ฐ๊ตฌ ๋˜๋Š” ๊ฐœ๋ฐœ ์ž‘์—…์— YOLO-NAS๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ SuperGradients๋ฅผ ์ธ์šฉํ•ด ์ฃผ์„ธ์š”:

@misc{supergradients,
      doi = {10.5281/ZENODO.7789328},
      url = {https://zenodo.org/record/7789328},
      author = {Aharon,  Shay and {Louis-Dupont} and {Ofri Masad} and Yurkova,  Kate and {Lotem Fridman} and {Lkdci} and Khvedchenya,  Eugene and Rubin,  Ran and Bagrov,  Natan and Tymchenko,  Borys and Keren,  Tomer and Zhilko,  Alexander and {Eran-Deci}},
      title = {Super-Gradients},
      publisher = {GitHub},
      journal = {GitHub repository},
      year = {2021},
}

์ปดํ“จํ„ฐ ๋น„์ „ ์ปค๋ฎค๋‹ˆํ‹ฐ๋ฅผ ์œ„ํ•ด ์ด ๊ท€์ค‘ํ•œ ๋ฆฌ์†Œ์Šค๋ฅผ ๋งŒ๋“ค๊ณ  ์œ ์ง€ํ•˜๋Š” ๋ฐ ํž˜์จ์ฃผ์‹  Deci AI ์˜ SuperGradients ํŒ€์— ๊ฐ์‚ฌ๋ฅผ ํ‘œํ•ฉ๋‹ˆ๋‹ค. ํ˜์‹ ์ ์ธ ์•„ํ‚คํ…์ฒ˜์™€ ๋›ฐ์–ด๋‚œ ๋ฌผ์ฒด ๊ฐ์ง€ ๊ธฐ๋Šฅ์„ ๊ฐ–์ถ˜ YOLO-NAS๋Š” ๊ฐœ๋ฐœ์ž์™€ ์—ฐ๊ตฌ์ž ๋ชจ๋‘์—๊ฒŒ ์ค‘์š”ํ•œ ๋„๊ตฌ๊ฐ€ ๋  ๊ฒƒ์ด๋ผ๊ณ  ๋ฏฟ์Šต๋‹ˆ๋‹ค.

ํ‚ค์›Œ๋“œ: YOLO-NAS, Deci AI, ๊ฐ์ฒด ๊ฐ์ง€, ๋”ฅ๋Ÿฌ๋‹, ์‹ ๊ฒฝ ์•„ํ‚คํ…์ฒ˜ ๊ฒ€์ƒ‰, Ultralytics Python API, YOLO ๋ชจ๋ธ, SuperGradients, ์‚ฌ์ „ ํ›ˆ๋ จ๋œ ๋ชจ๋ธ, ์–‘์žํ™” ์นœํ™”์  ๊ธฐ๋ณธ ๋ธ”๋ก, ๊ณ ๊ธ‰ ํ›ˆ๋ จ ๋ฐฉ์‹, ํ›ˆ๋ จ ํ›„ ์–‘์žํ™”, AutoNAC ์ตœ์ ํ™”, COCO, Objects365, Roboflow 100



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

๋Œ“๊ธ€