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

Ultralytics YOLO11 ๐Ÿš€์™€ ํ•จ๊ป˜ ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด์˜ ์ฝ”๋ž„ ์—ฃ์ง€ TPU

USB Edge ๊ฐ€์†๊ธฐ๊ฐ€ ์žฅ์ฐฉ๋œ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด ์‹ฑ๊ธ€ ๋ณด๋“œ ์ปดํ“จํ„ฐ TPU

์ฝ”๋ž„ ์—ฃ์ง€๋ž€ ๋ฌด์—‡์ธ๊ฐ€์š” TPU?

Coral Edge TPU ๋Š” ์‹œ์Šคํ…œ์— Edge TPU ์ฝ”ํ”„๋กœ์„ธ์„œ๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ์†Œํ˜• ์žฅ์น˜์ž…๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ €์ „๋ ฅ, ๊ณ ์„ฑ๋Šฅ ML ์ถ”๋ก ์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. TensorFlow ๋ผ์ดํŠธ ๋ชจ๋ธ. ์ž์„ธํ•œ ๋‚ด์šฉ์€ Coral Edge TPU ํ™ˆํŽ˜์ด์ง€์—์„œ ํ™•์ธํ•˜์„ธ์š”.



Watch: Google ์ฝ”๋ž„ ์—ฃ์ง€๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด์—์„œ ์ถ”๋ก ์„ ์‹คํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ• TPU

์ฝ”๋ž„ ์—ฃ์ง€๋กœ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด ๋ชจ๋ธ ์„ฑ๋Šฅ ํ–ฅ์ƒํ•˜๊ธฐ TPU

๋งŽ์€ ์‚ฌ๋žŒ๋“ค์ด ์ „๋ ฅ ํšจ์œจ์ด ๋†’๊ณ  ๋‹ค์–‘ํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” Raspberry Pi์™€ ๊ฐ™์€ ์ž„๋ฒ ๋””๋“œ ๋˜๋Š” ๋ชจ๋ฐ”์ผ ์žฅ์น˜์—์„œ ๋ชจ๋ธ์„ ์‹คํ–‰ํ•˜๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด๋Ÿฌํ•œ ์žฅ์น˜์—์„œ๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ˜•์‹์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์—๋„ ์ถ”๋ก  ์„ฑ๋Šฅ์ด ์ข‹์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ONNX ๋˜๋Š” OpenVINO. ์ฝ”๋ž„ ์—ฃ์ง€( TPU )๋Š” ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋ฉด ์ถ”๋ก  ์„ฑ๋Šฅ์„ ํฌ๊ฒŒ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์ด ๋ฌธ์ œ์— ๋Œ€ํ•œ ํ›Œ๋ฅญํ•œ ํ•ด๊ฒฐ์ฑ…์ด ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด์˜ ์—ฃ์ง€ TPU TensorFlow ๋ผ์ดํŠธ(์‹ ๊ทœ)โญ (์‹ ๊ทœ)

๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด์—์„œ Edge TPU ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ Coral์˜ ๊ธฐ์กด ๊ฐ€์ด๋“œ๋Š” ์˜ค๋ž˜๋˜์—ˆ์œผ๋ฉฐ, ํ˜„์žฌ Coral Edge TPU ๋Ÿฐํƒ€์ž„ ๋นŒ๋“œ๋Š” ํ˜„์žฌ TensorFlow ๋ผ์ดํŠธ ๋Ÿฐํƒ€์ž„ ๋ฒ„์ „์—์„œ ๋” ์ด์ƒ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ Google ์€ Coral ํ”„๋กœ์ ํŠธ๋ฅผ ์™„์ „ํžˆ ํฌ๊ธฐํ•œ ๊ฒƒ์œผ๋กœ ๋ณด์ด๋ฉฐ 2021๋…„๋ถ€ํ„ฐ 2024๋…„ ์‚ฌ์ด์— ์—…๋ฐ์ดํŠธ๊ฐ€ ์ด๋ฃจ์–ด์ง€์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ์ด ๊ฐ€์ด๋“œ์—์„œ๋Š” ์ตœ์‹  ๋ฒ„์ „์˜ TensorFlow ๋ผ์ดํŠธ ๋Ÿฐํƒ€์ž„๊ณผ ์—…๋ฐ์ดํŠธ๋œ Coral Edge TPU ๋Ÿฐํƒ€์ž„์„ ์‚ฌ์šฉํ•˜์—ฌ Edge TPU ๋ฅผ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด ๋‹จ์ผ ๋ณด๋“œ ์ปดํ“จํ„ฐ(SBC)์—์„œ ์ž‘๋™์‹œํ‚ค๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

์ „์ œ ์กฐ๊ฑด

์„ค์น˜ ์—ฐ์Šต

์ด ๊ฐ€์ด๋“œ๋Š” ์ด๋ฏธ ์ž‘๋™ํ•˜๋Š” ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด OS๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ๊ณ  ๋‹ค์Œ์„ ์„ค์น˜ํ–ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค. ultralytics ๋ฐ ๋ชจ๋“  ์ข…์†์„ฑ. ์–ป์œผ๋ ค๋ฉด ultralytics ์„ค์น˜๋œ ๊ฒฝ์šฐ ๋น ๋ฅธ ์‹œ์ž‘ ๊ฐ€์ด๋“œ ๋ฅผ ํด๋ฆญํ•˜์—ฌ ์„ค์ •์„ ์™„๋ฃŒํ•œ ํ›„ ๊ณ„์† ์ง„ํ–‰ํ•˜์„ธ์š”.

Edge TPU ๋Ÿฐํƒ€์ž„ ์„ค์น˜

๋จผ์ € Edge TPU ๋Ÿฐํƒ€์ž„์„ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์–‘ํ•œ ๋ฒ„์ „์ด ์žˆ์œผ๋ฏ€๋กœ ์‚ฌ์šฉ ์ค‘์ธ ์šด์˜ ์ฒด์ œ์— ๋งž๋Š” ๋ฒ„์ „์„ ์„ ํƒํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด OS ๊ณ ์ฃผํŒŒ ๋ชจ๋“œ ๋‹ค์šด๋กœ๋“œํ•  ๋ฒ„์ „
Bullseye 32๋น„ํŠธ ์•„๋‹ˆ์š” libedgetpu1-std_ ... .bullseye_armhf.deb
Bullseye 64๋น„ํŠธ ์•„๋‹ˆ์š” libedgetpu1-std_ ... .bullseye_arm64.deb
Bullseye 32๋น„ํŠธ ์˜ˆ libedgetpu1-max_ ... .bullseye_armhf.deb
Bullseye 64๋น„ํŠธ ์˜ˆ libedgetpu1-max_ ... .bullseye_arm64.deb
๋ถ์›œ 32๋น„ํŠธ ์•„๋‹ˆ์š” libedgetpu1-std_ ... .bookworm_armhf.deb
๋ถ์›œ 64๋น„ํŠธ ์•„๋‹ˆ์š” libedgetpu1-std_ ... .bookworm_arm64.deb
๋ถ์›œ 32๋น„ํŠธ ์˜ˆ libedgetpu1-max_ ... .bookworm_armhf.deb
๋ถ์›œ 64๋น„ํŠธ ์˜ˆ libedgetpu1-max_ ... .bookworm_arm64.deb

์—ฌ๊ธฐ์—์„œ ์ตœ์‹  ๋ฒ„์ „์„ ๋‹ค์šด๋กœ๋“œํ•˜์„ธ์š”.

ํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œํ•œ ํ›„ ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

sudo dpkg -i path/to/package.deb

๋Ÿฐํƒ€์ž„์„ ์„ค์น˜ํ•œ ํ›„, ์ฝ”๋ž„ ์—ฃ์ง€( TPU )๋ฅผ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด์˜ USB 3.0 ํฌํŠธ์— ์—ฐ๊ฒฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ๊ณต์‹ ๊ฐ€์ด๋“œ์— ๋”ฐ๋ฅด๋ฉด ์ƒˆ๋กœ์šด udev ๊ทœ์น™์„ ์„ค์น˜ํ•œ ํ›„์— ์ ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์ค‘์š”

Coral Edge TPU ๋Ÿฐํƒ€์ž„์ด ์ด๋ฏธ ์„ค์น˜๋˜์–ด ์žˆ๋Š” ๊ฒฝ์šฐ ๋‹ค์Œ ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ ์ œ๊ฑฐํ•˜์„ธ์š”.

# If you installed the standard version
sudo apt remove libedgetpu1-std

# If you installed the high frequency version
sudo apt remove libedgetpu1-max

๋ชจ๋ธ์„ Edge TPU ํ˜ธํ™˜ ๋ชจ๋ธ๋กœ ๋‚ด๋ณด๋‚ด๊ธฐ

Edge TPU ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋ชจ๋ธ์„ ํ˜ธํ™˜ ๊ฐ€๋Šฅํ•œ ํ˜•์‹์œผ๋กœ ๋ณ€ํ™˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ARM์—์„œ๋Š” Edge TPU ์ปดํŒŒ์ผ๋Ÿฌ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์œผ๋ฏ€๋กœ ๊ณต์‹ Ultralytics Docker ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ Ultralytics HUB๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Google Colab, x86_64 Linux ์‹œ์Šคํ…œ์—์„œ ๋‚ด๋ณด๋‚ด๊ธฐ๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ธ์ˆ˜๋Š” ๋‚ด๋ณด๋‚ด๊ธฐ ๋ชจ๋“œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

๋ชจ๋ธ ๋‚ด๋ณด๋‚ด๊ธฐ

from ultralytics import YOLO

# Load a model
model = YOLO("path/to/model.pt")  # Load an official model or custom model

# Export the model
model.export(format="edgetpu")
yolo export model=path/to/model.pt format=edgetpu  # Export an official model or custom model

๋‚ด๋ณด๋‚ธ ๋ชจ๋ธ์€ <model_name>_saved_model/ ํด๋”์— <model_name>_full_integer_quant_edgetpu.tflite. ๋ชจ๋ธ์ด ์ ‘๋ฏธ์‚ฌ( _edgetpu.tflite๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ultralytics TPU ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

๋ชจ๋ธ ์‹คํ–‰

๋ชจ๋ธ์„ ์‹ค์ œ๋กœ ์‹คํ–‰ํ•˜๋ ค๋ฉด ๋จผ์ € ์˜ฌ๋ฐ”๋ฅธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋งŒ์•ฝ tensorflow ๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์œผ๋ฉด ๋‹ค์Œ ๋ช…๋ น์œผ๋กœ tensorflow ์„ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค:

pip uninstall tensorflow tensorflow-aarch64

๊ทธ๋Ÿฐ ๋‹ค์Œ ์„ค์น˜/์—…๋ฐ์ดํŠธ tflite-runtime:

pip install -U tflite-runtime

์ด์ œ ๋‹ค์Œ ์ฝ”๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ถ”๋ก ์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

๋ชจ๋ธ ์‹คํ–‰

from ultralytics import YOLO

# Load a model
model = YOLO("path/to/<model_name>_full_integer_quant_edgetpu.tflite")  # Load an official model or custom model

# Run Prediction
model.predict("path/to/source.png")
yolo predict model=path/to/<model_name>_full_integer_quant_edgetpu.tflite source=path/to/source.png  # Load an official model or custom model

์ „์ฒด ์˜ˆ์ธก ๋ชจ๋“œ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์˜ˆ์ธก ํŽ˜์ด์ง€์—์„œ ์ข…ํ•ฉ ์ •๋ณด๋ฅผ ํ™•์ธํ•˜์„ธ์š”.

๋‹ค์ค‘ ์—ฃ์ง€ TPU๋ฅผ ์‚ฌ์šฉํ•œ ์ถ”๋ก 

์—ฌ๋Ÿฌ ๊ฐœ์˜ Edge TPU๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ ๋‹ค์Œ ์ฝ”๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ • TPU ์„ ์„ ํƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

from ultralytics import YOLO

# Load a model
model = YOLO("path/to/<model_name>_full_integer_quant_edgetpu.tflite")  # Load an official model or custom model

# Run Prediction
model.predict("path/to/source.png")  # Inference defaults to the first TPU

model.predict("path/to/source.png", device="tpu:0")  # Select the first TPU

model.predict("path/to/source.png", device="tpu:1")  # Select the second TPU

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

์ฝ”๋ž„ ์—ฃ์ง€๋ž€ ๋ฌด์—‡์ธ๊ฐ€ TPU ๊ทธ๋ฆฌ๊ณ  ์–ด๋–ป๊ฒŒ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด์˜ ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ์‹œํ‚ค๋Š”๊ฐ€ Ultralytics YOLO11 ?

Coral Edge TPU ๋Š” ์‹œ์Šคํ…œ์— Edge TPU ์ฝ”ํ”„๋กœ์„ธ์„œ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค๊ณ„๋œ ์†Œํ˜• ์žฅ์น˜์ž…๋‹ˆ๋‹ค. ์ด ์ฝ”ํ”„๋กœ์„ธ์„œ๋Š” ์ €์ „๋ ฅ, ๊ณ ์„ฑ๋Šฅ ๋จธ์‹  ๋Ÿฌ๋‹ ์ถ”๋ก ์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•˜๋ฉฐ, ํŠนํžˆ TensorFlow ๋ผ์ดํŠธ ๋ชจ๋ธ์— ์ตœ์ ํ™”๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ, Edge TPU ๋Š” ML ๋ชจ๋ธ ์ถ”๋ก ์„ ๊ฐ€์†ํ™”ํ•˜์—ฌ ํŠนํžˆ Ultralytics YOLO11 ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์„ ํฌ๊ฒŒ ํ–ฅ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค. Coral Edge์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ํ™ˆํŽ˜์ด์ง€ TPU ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด์— Coral Edge TPU ๋Ÿฐํƒ€์ž„์„ ์„ค์น˜ํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด์— Coral Edge TPU ๋Ÿฐํƒ€์ž„์„ ์„ค์น˜ํ•˜๋ ค๋ฉด, ํ•ด๋‹น ๋Ÿฐํƒ€์ž„์„ ๋‹ค์šด๋กœ๋“œํ•˜์„ธ์š”. .deb ์—์„œ ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด OS ๋ฒ„์ „์šฉ ํŒจํ‚ค์ง€๋ฅผ ๋‹ค์šด๋กœ๋“œํ•˜์‹ญ์‹œ์˜ค. ์ด ๋งํฌ. ๋‹ค์šด๋กœ๋“œ๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด ๋‹ค์Œ ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค:

sudo dpkg -i path/to/package.deb

์„ค์น˜ ์—ฐ์Šต ์„น์…˜์— ์„ค๋ช…๋œ ๋‹จ๊ณ„์— ๋”ฐ๋ผ ์ด์ „ Coral Edge TPU ๋Ÿฐํƒ€์ž„ ๋ฒ„์ „์„ ์ œ๊ฑฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋‚ด Ultralytics YOLO11 ๋ชจ๋ธ์„ Coral Edge TPU ์™€ ํ˜ธํ™˜๋˜๋„๋ก ๋‚ด๋ณด๋‚ผ ์ˆ˜ ์žˆ๋‚˜์š”?

์˜ˆ, Coral Edge TPU ์™€ ํ˜ธํ™˜๋˜๋„๋ก Ultralytics YOLO11 ๋ชจ๋ธ์„ ๋‚ด๋ณด๋‚ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‚ด๋ณด๋‚ด๊ธฐ๋Š” x86_64 Linux ๋จธ์‹ ์ธ Google Colab ๋˜๋Š” Ultralytics Docker ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. Ultralytics HUB๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‚ด๋ณด๋‚ผ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. Python ๋ฐ CLI ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ชจ๋ธ์„ ๋‚ด๋ณด๋‚ด๋Š” ๋ฐฉ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:

๋ชจ๋ธ ๋‚ด๋ณด๋‚ด๊ธฐ

from ultralytics import YOLO

# Load a model
model = YOLO("path/to/model.pt")  # Load an official model or custom model

# Export the model
model.export(format="edgetpu")
yolo export model=path/to/model.pt format=edgetpu  # Export an official model or custom model

์ž์„ธํ•œ ๋‚ด์šฉ์€ ๋‚ด๋ณด๋‚ด๊ธฐ ๋ชจ๋“œ ๋ฌธ์„œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด์— TensorFlow ์ด ์ด๋ฏธ ์„ค์น˜๋˜์–ด ์žˆ๋Š”๋ฐ ๋Œ€์‹  tflite-runtime์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด์— TensorFlow ๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ๊ณ  ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ „ํ™˜ํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ tflite-runtime๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ TensorFlow ์„ ๋จผ์ € ์ œ๊ฑฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค:

pip uninstall tensorflow tensorflow-aarch64

๊ทธ๋Ÿฐ ๋‹ค์Œ ์„ค์น˜ ๋˜๋Š” ์—…๋ฐ์ดํŠธ tflite-runtime ๋ฅผ ๋‹ค์Œ ๋ช…๋ น์–ด๋กœ ๋Œ€์ฒดํ•ฉ๋‹ˆ๋‹ค:

pip install -U tflite-runtime

ํŠน์ • ํœ ์˜ ๊ฒฝ์šฐ(์˜ˆ: TensorFlow 2.15.0) tflite-runtime์—์„œ ๋‹ค์šด๋กœ๋“œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๋งํฌ ๋ฅผ ํด๋ฆญํ•˜๊ณ  ๋‹ค์Œ์„ ์‚ฌ์šฉํ•˜์—ฌ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. pip. ์ž์„ธํ•œ ์ง€์นจ์€ ๋ชจ๋ธ ์‹คํ–‰ ์„น์…˜์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ชจ๋ธ ์‹คํ–‰.

์ฝ”๋ž„ ์—ฃ์ง€ TPU ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด์—์„œ ๋‚ด๋ณด๋‚ธ YOLO11 ๋ชจ๋ธ๋กœ ์ถ”๋ก ์„ ์‹คํ–‰ํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

YOLO11 ๋ชจ๋ธ์„ Edge TPU ํ˜ธํ™˜ ํ˜•์‹์œผ๋กœ ๋‚ด๋ณด๋‚ธ ํ›„ ๋‹ค์Œ ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ถ”๋ก ์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

๋ชจ๋ธ ์‹คํ–‰

from ultralytics import YOLO

# Load a model
model = YOLO("path/to/edgetpu_model.tflite")  # Load an official model or custom model

# Run Prediction
model.predict("path/to/source.png")
yolo predict model=path/to/edgetpu_model.tflite source=path/to/source.png  # Load an official model or custom model

์ „์ฒด ์˜ˆ์ธก ๋ชจ๋“œ ๊ธฐ๋Šฅ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์˜ˆ์ธก ํŽ˜์ด์ง€์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

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

๋Œ“๊ธ€