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

Ultralytics YOLOv8 NVIDIA ์—์„œ DeepStream SDK๋ฅผ ์‚ฌ์šฉํ•˜๋Š” Jetson ๋ฐ TensorRT

์ด ์ข…ํ•ฉ ๊ฐ€์ด๋“œ๋Š” DeepStream SDK๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ NVIDIA Jetson ์žฅ์น˜์— Ultralytics YOLOv8 ์„ ๋ฐฐํฌํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์ž์„ธํ•œ ์•ˆ๋‚ด์™€ TensorRT ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์„œ๋Š” TensorRT ์„ ์‚ฌ์šฉํ•˜์—ฌ Jetson ํ”Œ๋žซํผ์—์„œ ์ถ”๋ก  ์„ฑ๋Šฅ์„ ์ตœ๋Œ€ํ™”ํ•ฉ๋‹ˆ๋‹ค.

NVIDIA Jetson์˜ DeepStream

์ฐธ๊ณ 

์ด ๊ฐ€์ด๋“œ๋Š” JetPack JP5.1.3 ๋ฆด๋ฆฌ์ฆˆ๋ฅผ ์‹คํ–‰ํ•˜๋Š” NVIDIA Jetson Orin NX 16GB ๊ธฐ๋ฐ˜ Seeed Studio ์žฌ์ปดํ“จํ„ฐ J4012์™€ JetPack JP4.6.4 ๋ฆด๋ฆฌ์ฆˆ๋ฅผ ์‹คํ–‰ํ•˜๋Š” NVIDIA Jetson Nano 4GB ๊ธฐ๋ฐ˜ Seeed Studio ์žฌ์ปดํ“จํ„ฐ J1020 v2๋กœ ํ…Œ์ŠคํŠธ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ตœ์‹  ๋ฐ ๋ ˆ๊ฑฐ์‹œ๋ฅผ ํฌํ•จํ•œ ๋ชจ๋“  NVIDIA Jetson ํ•˜๋“œ์›จ์–ด ๋ผ์ธ์—…์—์„œ ์ž‘๋™ํ•  ๊ฒƒ์œผ๋กœ ์˜ˆ์ƒ๋ฉ๋‹ˆ๋‹ค.

NVIDIA DeepStream์ด๋ž€ ๋ฌด์—‡์ธ๊ฐ€์š”?

NVIDIA์˜ DeepStream SDK๋Š” AI ๊ธฐ๋ฐ˜ ๋ฉ€ํ‹ฐ ์„ผ์„œ ์ฒ˜๋ฆฌ, ๋น„๋””์˜ค, ์˜ค๋””์˜ค ๋ฐ ์ด๋ฏธ์ง€ ์ดํ•ด๋ฅผ ์œ„ํ•œ GStreamer ๊ธฐ๋ฐ˜์˜ ์™„๋ฒฝํ•œ ์ŠคํŠธ๋ฆฌ๋ฐ ๋ถ„์„ ํˆดํ‚ท์ž…๋‹ˆ๋‹ค. IVA(์ง€๋Šฅํ˜• ๋น„๋””์˜ค ๋ถ„์„) ์•ฑ๊ณผ ์„œ๋น„์Šค๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๋น„์ „ AI ๊ฐœ๋ฐœ์ž, ์†Œํ”„ํŠธ์›จ์–ด ํŒŒํŠธ๋„ˆ, ์Šคํƒ€ํŠธ์—… ๋ฐ OEM์— ์ด์ƒ์ ์ž…๋‹ˆ๋‹ค. ์ด์ œ ์‹ ๊ฒฝ๋ง๊ณผ ์ถ”์ , ๋น„๋””์˜ค ์ธ์ฝ”๋”ฉ/๋””์ฝ”๋”ฉ, ๋น„๋””์˜ค ๋ Œ๋”๋ง๊ณผ ๊ฐ™์€ ๊ธฐํƒ€ ๋ณต์žกํ•œ ์ฒ˜๋ฆฌ ์ž‘์—…์„ ํ†ตํ•ฉํ•˜๋Š” ์ŠคํŠธ๋ฆผ ์ฒ˜๋ฆฌ ํŒŒ์ดํ”„๋ผ์ธ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ํŒŒ์ดํ”„๋ผ์ธ์„ ํ†ตํ•ด ๋น„๋””์˜ค, ์ด๋ฏธ์ง€, ์„ผ์„œ ๋ฐ์ดํ„ฐ์— ๋Œ€ํ•œ ์‹ค์‹œ๊ฐ„ ๋ถ„์„์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๋”ฅ์ŠคํŠธ๋ฆผ์˜ ๋ฉ€ํ‹ฐ ํ”Œ๋žซํผ ์ง€์›์€ ์˜จํ”„๋ ˆ๋ฏธ์Šค, ์—ฃ์ง€, ํด๋ผ์šฐ๋“œ์—์„œ ๋น„์ „ AI ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜๊ณผ ์„œ๋น„์Šค๋ฅผ ๋” ๋น ๋ฅด๊ณ  ์‰ฝ๊ฒŒ ๊ฐœ๋ฐœํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

์ „์ œ ์กฐ๊ฑด

์ด ๊ฐ€์ด๋“œ๋ฅผ ๋”ฐ๋ฅด๊ธฐ ์ „์—:

ํŒ

์ด ๊ฐ€์ด๋“œ์—์„œ๋Š” Jetson ์žฅ์น˜์— DeepStream SDK๋ฅผ ์„ค์น˜ํ•˜๋Š” Debian ํŒจํ‚ค์ง€ ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ Jetson์˜ DeepStream SDK(์•„์นด์ด๋ธŒ) ๋ฅผ ๋ฐฉ๋ฌธํ•˜์—ฌ ๋ ˆ๊ฑฐ์‹œ ๋ฒ„์ „์˜ DeepStream์— ์•ก์„ธ์Šคํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

์— ๋Œ€ํ•œ DeepStream ๊ตฌ์„ฑ YOLOv8

์—ฌ๊ธฐ์—์„œ๋Š” YOLO ๋ชจ๋ธ์— ๋Œ€ํ•œ NVIDIA DeepStream SDK ์ง€์›์„ ํฌํ•จํ•˜๋Š” marcoslucianops/DeepStream-Yolo GitHub ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ธฐ์—ฌํ•ด ์ฃผ์‹  marcoslucianops์˜ ๋…ธ๊ณ ์— ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค!

  1. ์ข…์†์„ฑ ์„ค์น˜

    pip install cmake
    pip install onnxsim
    
  2. ๋‹ค์Œ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ๋ณต์ œํ•ฉ๋‹ˆ๋‹ค.

    git clone https://github.com/marcoslucianops/DeepStream-Yolo
    cd DeepStream-Yolo
    
  3. YOLOv8 ๋ฆด๋ฆฌ์Šค์—์„œ ์›ํ•˜๋Š” ํƒ์ง€ ๋ชจ๋ธ(.pt)์„ Ultralytics YOLOv8 ๋‹ค์šด๋กœ๋“œํ•˜์„ธ์š”. ์—ฌ๊ธฐ์„œ๋Š” yolov8s.pt๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

    wget https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s.pt
    

    ์ฐธ๊ณ 

    ์‚ฌ์šฉ์ž ์ง€์ • ํ›ˆ๋ จ๋œ YOLOv8 ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

  4. ๋ชจ๋ธ์„ ๋‹ค์Œ์œผ๋กœ ๋ณ€ํ™˜ ONNX

    python3 utils/export_yoloV8.py -w yolov8s.pt
    

    ์œ„์˜ ๋ช…๋ น์— ์•„๋ž˜ ์ธ์ˆ˜๋ฅผ ์ „๋‹ฌํ•˜์‹ญ์‹œ์˜ค.

    DeepStream 6.0.1์˜ ๊ฒฝ์šฐ opset 12 ์ดํ•˜๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ opset์€ 16์ž…๋‹ˆ๋‹ค.

    --opset 12
    

    ์ถ”์ • ํฌ๊ธฐ๋ฅผ ๋ณ€๊ฒฝํ•˜๋ ค๋ฉด(๊ธฐ๋ณธ๊ฐ’: 640)

    -s SIZE
    --size SIZE
    -s HEIGHT WIDTH
    --size HEIGHT WIDTH
    

    1280์˜ ์˜ˆ:

    -s 1280
    or
    -s 1280 1280
    

    ๋‹จ์ˆœํ™”ํ•˜๋ ค๋ฉด ONNX ๋ชจ๋ธ(DeepStream >= 6.0)

    --simplify
    

    ๋™์  ๋ฐฐ์น˜ ํฌ๊ธฐ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด(DeepStream >= 6.1)

    --dynamic
    

    ์ •์  batch-size๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด(batch-size = 4์˜ ์˜ˆ)

    --batch 4
    
  5. ์„ค์น˜๋œ JetPack ๋ฒ„์ „์— ๋”ฐ๋ผ CUDA ๋ฒ„์ „์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

    JetPack 4.6.4์˜ ๊ฒฝ์šฐ:

    export CUDA_VER=10.2
    

    JetPack 5.1.3์˜ ๊ฒฝ์šฐ:

    export CUDA_VER=11.4
    
  6. ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ปดํŒŒ์ผ

    make -C nvdsinfer_custom_impl_Yolo clean && make -C nvdsinfer_custom_impl_Yolo
    
  7. ๋ฅผ ํŽธ์ง‘ํ•ฉ๋‹ˆ๋‹ค. config_infer_primary_yoloV8.txt file ๋ชจ๋ธ์— ๋”ฐ๋ผ( YOLOv8s 80๊ฐœ ์ˆ˜์—…)

    [property]
    ...
    onnx-file=yolov8s.onnx
    ...
    num-detected-classes=80
    ...
    
  8. ๋ฅผ ํŽธ์ง‘ํ•ฉ๋‹ˆ๋‹ค. deepstream_app_config ํŒŒ์ผ

    ...
    [primary-gie]
    ...
    config-file=config_infer_primary_yoloV8.txt
    
  9. ๋‹ค์Œ์—์„œ ๋น„๋””์˜ค ์†Œ์Šค๋ฅผ ๋ณ€๊ฒฝํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. deepstream_app_config ํŒŒ์ผ. ์—ฌ๊ธฐ์— ๊ธฐ๋ณธ ๋น„๋””์˜ค ํŒŒ์ผ์ด ๋กœ๋“œ๋ฉ๋‹ˆ๋‹ค

    ...
    [source0]
    ...
    uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
    

์ถ”๋ก  ์‹คํ–‰

deepstream-app -c deepstream_app_config.txt

์ฐธ๊ณ 

์ƒ์„ฑํ•˜๋Š” ๋ฐ ์‹œ๊ฐ„์ด ์˜ค๋ž˜ ๊ฑธ๋ฆฝ๋‹ˆ๋‹ค. TensorRT ์ถ”๋ก ์„ ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— ์—”์ง„ ํŒŒ์ผ. ๊ทธ๋Ÿฌ๋‹ˆ ์กฐ๊ธˆ๋งŒ ๊ธฐ๋‹ค๋ ค ์ฃผ์‹ญ์‹œ์˜ค.

YOLOv8 ๋”ฅ์ŠคํŠธ๋ฆผ์œผ๋กœ

ํŒ

๋ชจ๋ธ์„ FP16 ์ •๋ฐ€๋„๋กœ ๋ณ€ํ™˜ํ•˜๋ ค๋ฉด model-engine-file=model_b1_gpu0_fp16.engine ๊ทธ๋ฆฌ๊ณ  network-mode=2 ๋‚ด๋ถ€ config_infer_primary_yoloV8.txt

INT8 ๋ณด์ •

์ถ”๋ก ์— INT8 ์ •๋ฐ€๋„๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ผ์•ผ ํ•ฉ๋‹ˆ๋‹ค.

  1. ์ง‘ํ•ฉ OPENCV ํ™˜๊ฒฝ ๋ณ€์ˆ˜(environment variable)

    export OPENCV=1
    
  2. ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ปดํŒŒ์ผ

    make -C nvdsinfer_custom_impl_Yolo clean && make -C nvdsinfer_custom_impl_Yolo
    
  3. COCO ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ๊ฒฝ์šฐ val2017๋ฅผ ํด๋ฆญํ•˜๊ณ  ์ถ”์ถœํ•œ ๋‹ค์Œ DeepStream-Yolo ํด๋”

  4. ๋ณด์ • ์ด๋ฏธ์ง€๋ฅผ ์œ„ํ•œ ์ƒˆ ๋””๋ ‰ํ„ฐ๋ฆฌ ๋งŒ๋“ค๊ธฐ

    mkdir calibration
    
  5. ๋‹ค์Œ์„ ์‹คํ–‰ํ•˜์—ฌ COCO ๋ฐ์ดํ„ฐ ์„ธํŠธ์—์„œ ๋ณด์ •์„ ์‹คํ–‰ํ•  1000๊ฐœ์˜ ๋ฌด์ž‘์œ„ ์ด๋ฏธ์ง€๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

    for jpg in $(ls -1 val2017/*.jpg | sort -R | head -1000); do \
        cp ${jpg} calibration/; \
    done
    

    ์ฐธ๊ณ 

    NVIDIA ๋Š” ์ข‹์€ ์ •ํ™•๋„๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ์ตœ์†Œ 500๊ฐœ์˜ ์ด๋ฏธ์ง€๋ฅผ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ์ด ์˜ˆ์—์„œ๋Š” ๋” ๋‚˜์€ ์ •ํ™•๋„๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด 1000๊ฐœ์˜ ์ด๋ฏธ์ง€๊ฐ€ ์„ ํƒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค(์ด๋ฏธ์ง€๊ฐ€ ๋งŽ์„์ˆ˜๋ก ์ •ํ™•๋„๊ฐ€ ๋†’์•„์ง). ๋จธ๋ฆฌ -1000์—์„œ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์ด๋ฏธ์ง€๊ฐ€ 2000๊ฐœ์ธ ๊ฒฝ์šฐ -2000์œผ๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ณผ์ •์€ ์‹œ๊ฐ„์ด ์˜ค๋ž˜ ๊ฑธ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  6. ๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค. calibration.txt ์„ ํƒํ•œ ๋ชจ๋“  ์ด๋ฏธ์ง€๊ฐ€ ์žˆ๋Š” ํŒŒ์ผ

    realpath calibration/*jpg > calibration.txt
    
  7. ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •

    export INT8_CALIB_IMG_PATH=calibration.txt
    export INT8_CALIB_BATCH_SIZE=1
    

    ์ฐธ๊ณ 

    INT8_CALIB_BATCH_SIZE ๊ฐ’์ด ๋†’์„์ˆ˜๋ก ์ •ํ™•๋„๊ฐ€ ๋†’์•„์ง€๊ณ  ๋ณด์ • ์†๋„๊ฐ€ ๋นจ๋ผ์ง‘๋‹ˆ๋‹ค. GPU ๋ฉ”๋ชจ๋ฆฌ์— ๋งž๊ฒŒ ์„ค์ •ํ•˜์„ธ์š”.

  8. ์—…๋ฐ์ดํŠธ config_infer_primary_yoloV8.txt ํŒŒ์ผ

    ์—์„œ

    ...
    model-engine-file=model_b1_gpu0_fp32.engine
    #int8-calib-file=calib.table
    ...
    network-mode=0
    ...
    

    To

    ...
    model-engine-file=model_b1_gpu0_int8.engine
    int8-calib-file=calib.table
    ...
    network-mode=1
    ...
    

์ถ”๋ก  ์‹คํ–‰

deepstream-app -c deepstream_app_config.txt

๋ฉ€ํ‹ฐ์ŠคํŠธ๋ฆผ ์„ค์ •

๋‹จ์ผ ๋”ฅ์ŠคํŠธ๋ฆผ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์—ฌ๋Ÿฌ ์ŠคํŠธ๋ฆผ์„ ์„ค์ •ํ•˜๋ ค๋ฉด ๋‹ค์Œ์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. deepstream_app_config.txt ํŒŒ์ผ

  1. ํ–‰๊ณผ ์—ด์„ ๋ณ€๊ฒฝํ•˜์—ฌ ์›ํ•˜๋Š” ์ŠคํŠธ๋ฆผ ์ˆ˜์— ๋”ฐ๋ผ ๊ทธ๋ฆฌ๋“œ ํ‘œ์‹œ๋ฅผ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด 4๊ฐœ์˜ ์ŠคํŠธ๋ฆผ์— ๋Œ€ํ•ด 2๊ฐœ์˜ ํ–‰๊ณผ 2๊ฐœ์˜ ์—ด์„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    [tiled-display]
    rows=2
    columns=2
    
  2. ์ง‘ํ•ฉ num-sources=4 ๊ทธ๋ฆฌ๊ณ  ์ถ”๊ฐ€ uri 4 ๊ฐœ์˜ ๋ชจ๋“  ์ŠคํŠธ๋ฆผ ์ค‘

    [source0]
    enable=1
    type=3
    uri=<path_to_video>
    uri=<path_to_video>
    uri=<path_to_video>
    uri=<path_to_video>
    num-sources=4
    

์ถ”๋ก  ์‹คํ–‰

deepstream-app -c deepstream_app_config.txt
๋ฉ€ํ‹ฐ์ŠคํŠธ๋ฆผ ์„ค์ •

๋ฒค์น˜๋งˆํฌ ๊ฒฐ๊ณผ

YOLOv8s ๋‹ค์Œ ํ‘œ๋Š” TensorRT ๋ชจ๋ธ์˜ ๋‹ค์–‘ํ•œ ์ •๋ฐ€๋„ ์ˆ˜์ค€(์ž…๋ ฅ ํฌ๊ธฐ 640x640)์—์„œ NVIDIA Jetson Orin NX 16GB์˜ ์„ฑ๋Šฅ์„ ์š”์•ฝํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋ชจ๋ธ ์ด๋ฆ„ ์ •๋ฐ€๋„ ์ถ”๋ก  ์‹œ๊ฐ„(ms/im) FPS
YOLOv8s FP32 15.63 64
FP16 7.94 126
INT8 5.53 181

์Šน์ธ

์ด ๊ฐ€์ด๋“œ๋Š” ์ฒ˜์Œ์— Seeed Studio, Lakshantha, Elaine์˜ ์นœ๊ตฌ๋“ค์ด ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค.

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

NVIDIA Jetson ์žฅ์น˜์—์„œ Ultralytics YOLOv8 ์„ ์„ค์ •ํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ฉ๋‹ˆ๊นŒ?

NVIDIA Jetson ์žฅ์น˜์—์„œ Ultralytics YOLOv8 ์„ ์„ค์ •ํ•˜๋ ค๋ฉด ๋จผ์ € ์‚ฌ์šฉ ์ค‘์ธ JetPack ๋ฒ„์ „๊ณผ ํ˜ธํ™˜๋˜๋Š” DeepStream SDK๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋น ๋ฅธ ์‹œ์ž‘ ๊ฐ€์ด๋“œ ์˜ ๋‹จ๊ณ„๋ณ„ ๊ฐ€์ด๋“œ์— ๋”ฐ๋ผ YOLOv8 ๋ฐฐํฌ๋ฅผ ์œ„ํ•ด NVIDIA Jetson์„ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.

NVIDIA Jetson์—์„œ YOLOv8 ๊ณผ ํ•จ๊ป˜ TensorRT ์„ ์‚ฌ์šฉํ•˜๋ฉด ์–ด๋–ค ์ด์ ์ด ์žˆ๋‚˜์š”?

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

๋‹ค๋ฅธ NVIDIA Jetson ํ•˜๋“œ์›จ์–ด์—์„œ DeepStream SDK๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Ultralytics YOLOv8 ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ?

์˜ˆ, ๋ฐฐํฌ ๊ฐ€์ด๋“œ Ultralytics YOLOv8 ์™€ DeepStream SDK ๋ฐ TensorRT ๋Š” ์ „์ฒด NVIDIA Jetson ๋ผ์ธ์—…์—์„œ ํ˜ธํ™˜๋ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์—๋Š” ์ ฏํŒฉ 5.1.3์ด ์„ค์น˜๋œ ์ ฏ์Šจ ์˜ค๋ฆฐ NX 16GB ๋ฐ ์ ฏํŒฉ 4.6.4๊ฐ€ ์„ค์น˜๋œ ์ ฏ์Šจ ๋‚˜๋…ธ 4GB์™€ ๊ฐ™์€ ์žฅ์น˜๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‹จ๊ณ„๋Š” YOLOv8 ์˜ DeepStream ๊ตฌ์„ฑ ์„น์…˜์„ ์ฐธ์กฐํ•˜์‹ญ์‹œ์˜ค.

YOLOv8 ๋ชจ๋ธ์„ DeepStream์šฉ ONNX ๋ชจ๋ธ๋กœ ๋ณ€ํ™˜ํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

YOLOv8 ๋ชจ๋ธ์„ DeepStream๊ณผ ํ•จ๊ป˜ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ๋„๋ก ONNX ํ˜•์‹์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋ ค๋ฉด utils/export_yoloV8.py ์Šคํฌ๋ฆฝํŠธ์—์„œ DeepStream-Yolo ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์— ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ์€ ๋ช…๋ น์–ด ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค:

python3 utils/export_yoloV8.py -w yolov8s.pt --opset 12 --simplify

๋ชจ๋ธ ๋ณ€ํ™˜์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๋ชจ๋ธ ๋‚ด๋ณด๋‚ด๊ธฐ ์„น์…˜์„ ์ฐธ์กฐํ•˜์„ธ์š”.

NVIDIA ์—์„œ YOLOv8 ์˜ ์„ฑ๋Šฅ ๋ฒค์น˜๋งˆํฌ๋Š” ์–ด๋–ป๊ฒŒ ๋˜๋‚˜์š”?

NVIDIA Jetson Orin NX 16GB์˜ YOLOv8 ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์€ TensorRT ์ •๋ฐ€๋„ ์ˆ˜์ค€์— ๋”ฐ๋ผ ๋‹ค๋ฆ…๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, YOLOv8s ๋ชจ๋ธ์€ ๋‹ฌ์„ฑํ•ฉ๋‹ˆ๋‹ค:

  • FP32 ์ •๋ฐ€๋„: 15.63ms/im, 64 FPS
  • FP16 ์ •๋ฐ€๋„: 7.94ms/im, 126 FPS
  • INT8 ์ •๋ฐ€๋„: 5.53ms/im, 181 FPS

TensorRT์ด ๋ฒค์น˜๋งˆํฌ๋Š” NVIDIA Jetson ํ•˜๋“œ์›จ์–ด์—์„œ ์ตœ์ ํ™”๋œ YOLOv8 ๋ชจ๋ธ ์‚ฌ์šฉ์˜ ํšจ์œจ์„ฑ๊ณผ ์„ฑ๋Šฅ์„ ๊ฐ•์กฐํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๋ฒค์น˜๋งˆํฌ ๊ฒฐ๊ณผ ์„น์…˜์„ ์ฐธ์กฐํ•˜์„ธ์š”.



์ƒ์„ฑ 2024-07-01, ์—…๋ฐ์ดํŠธ 2024-07-05
์ž‘์„ฑ์ž: glenn-jocher (1), lakshanthad (1)

๋Œ“๊ธ€