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

Ultralytics YOLO11 ๐Ÿš€์„ ์‚ฌ์šฉํ•œ ์˜ค๋ธŒ์ ํŠธ ๋ธ”๋Ÿฌ๋ง

์˜ค๋ธŒ์ ํŠธ ๋ธ”๋Ÿฌ๋ž€ ๋ฌด์—‡์ธ๊ฐ€์š”?

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



Watch: ์˜ค๋ธŒ์ ํŠธ ๋ธ”๋Ÿฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Ultralytics YOLO11

์˜ค๋ธŒ์ ํŠธ ๋ธ”๋Ÿฌ์˜ ์žฅ์ ์€?

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

YOLO11 ์„ ์‚ฌ์šฉํ•œ ์˜ค๋ธŒ์ ํŠธ ํ๋ฆผ ์˜ˆ์ œ

import cv2

from ultralytics import YOLO
from ultralytics.utils.plotting import Annotator, colors

model = YOLO("yolo11n.pt")
names = model.names

cap = cv2.VideoCapture("path/to/video/file.mp4")
assert cap.isOpened(), "Error reading video file"
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))

# Blur ratio
blur_ratio = 50

# Video writer
video_writer = cv2.VideoWriter("object_blurring_output.avi", cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))

while cap.isOpened():
    success, im0 = cap.read()
    if not success:
        print("Video frame is empty or video processing has been successfully completed.")
        break

    results = model.predict(im0, show=False)
    boxes = results[0].boxes.xyxy.cpu().tolist()
    clss = results[0].boxes.cls.cpu().tolist()
    annotator = Annotator(im0, line_width=2, example=names)

    if boxes is not None:
        for box, cls in zip(boxes, clss):
            annotator.box_label(box, color=colors(int(cls), True), label=names[int(cls)])

            obj = im0[int(box[1]) : int(box[3]), int(box[0]) : int(box[2])]
            blur_obj = cv2.blur(obj, (blur_ratio, blur_ratio))

            im0[int(box[1]) : int(box[3]), int(box[0]) : int(box[2])] = blur_obj

    cv2.imshow("ultralytics", im0)
    video_writer.write(im0)
    if cv2.waitKey(1) & 0xFF == ord("q"):
        break

cap.release()
video_writer.release()
cv2.destroyAllWindows()

์ธ์ˆ˜ model.predict

์ธ์ˆ˜ ์œ ํ˜• ๊ธฐ๋ณธ๊ฐ’ ์„ค๋ช…
source str 'ultralytics/assets' ์ถ”๋ก ํ•  ๋ฐ์ดํ„ฐ ์†Œ์Šค๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฏธ์ง€ ๊ฒฝ๋กœ, ๋™์˜์ƒ ํŒŒ์ผ, ๋””๋ ‰ํ† ๋ฆฌ, URL ๋˜๋Š” ์‹ค์‹œ๊ฐ„ ํ”ผ๋“œ์šฉ ๋””๋ฐ”์ด์Šค ID๊ฐ€ ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์–‘ํ•œ ํ˜•์‹๊ณผ ์†Œ์Šค๋ฅผ ์ง€์›ํ•˜๋ฏ€๋กœ ๋‹ค์–‘ํ•œ ์œ ํ˜•์˜ ์ž…๋ ฅ์— ์œ ์—ฐํ•˜๊ฒŒ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
conf float 0.25 ํƒ์ง€์— ๋Œ€ํ•œ ์ตœ์†Œ ์‹ ๋ขฐ๋„ ์ž„๊ณ„๊ฐ’์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ์ด ์ž„๊ณ„๊ฐ’๋ณด๋‹ค ๋‚ฎ์€ ์‹ ๋ขฐ๋„๋กœ ํƒ์ง€๋œ ๊ฐœ์ฒด๋Š” ๋ฌด์‹œ๋ฉ๋‹ˆ๋‹ค. ์ด ๊ฐ’์„ ์กฐ์ •ํ•˜๋ฉด ์˜คํƒ์ง€๋ฅผ ์ค„์ด๋Š” ๋ฐ ๋„์›€์ด ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
iou float 0.7 ๋น„์ตœ๋Œ€ ์–ต์ œ(NMS)์— ๋Œ€ํ•œ ๊ต์ฐจ์  ์ดˆ๊ณผ (IoU) ์ž„๊ณ„๊ฐ’์ž…๋‹ˆ๋‹ค. ๊ฐ’์ด ๋‚ฎ์„์ˆ˜๋ก ์ค‘๋ณต๋˜๋Š” ์ƒ์ž๋ฅผ ์ œ๊ฑฐํ•˜์—ฌ ํƒ์ง€ ํšŸ์ˆ˜๊ฐ€ ์ค„์–ด๋“ค์–ด ์ค‘๋ณต์„ ์ค„์ด๋Š” ๋ฐ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.
imgsz int or tuple 640 ์ถ”๋ก ํ•  ์ด๋ฏธ์ง€ ํฌ๊ธฐ๋ฅผ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค. ๋‹จ์ผ ์ •์ˆ˜์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 640 ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ •์‚ฌ๊ฐํ˜• ํฌ๊ธฐ ์กฐ์ • ๋˜๋Š” (๋†’์ด, ๋„ˆ๋น„) ํŠœํ”Œ์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์ ์ ˆํ•œ ํฌ๊ธฐ ์กฐ์ •์€ ๊ฐ์ง€์œจ์„ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ •ํ™•์„ฑ ์ฒ˜๋ฆฌ ์†๋„.
half bool False ์ •ํ™•๋„์— ๋ฏธ์น˜๋Š” ์˜ํ–ฅ์„ ์ตœ์†Œํ™”ํ•˜๋ฉด์„œ ์ง€์›๋˜๋Š” GPU์—์„œ ๋ชจ๋ธ ์ถ”๋ก  ์†๋„๋ฅผ ๋†’์ผ ์ˆ˜ ์žˆ๋Š” ๋ฐ˜์ •ํ™•๋„ (FP16) ์ถ”๋ก ์„ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค.
device str None ์ถ”๋ก ํ•  ์žฅ์น˜๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค(์˜ˆ, cpu, cuda:0 ๋˜๋Š” 0). ์‚ฌ์šฉ์ž๊ฐ€ ๋ชจ๋ธ ์‹คํ–‰์„ ์œ„ํ•ด CPU, ํŠน์ • GPU, ๋˜๋Š” ๊ธฐํƒ€ ์ปดํ“จํŒ… ์žฅ์น˜ ์ค‘์—์„œ ์„ ํƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
batch int 1 ์ถ”๋ก ํ•  ๋ฐฐ์น˜ ํฌ๊ธฐ๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค(์†Œ์Šค๊ฐ€ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฒฝ์šฐ์—๋งŒ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๋””๋ ‰ํ† ๋ฆฌ, ๋น„๋””์˜ค ํŒŒ์ผ ๋˜๋Š” .txt ํŒŒ์ผ). ๋ฐฐ์น˜ ํฌ๊ธฐ๊ฐ€ ํด์ˆ˜๋ก ์ฒ˜๋ฆฌ๋Ÿ‰์ด ์ฆ๊ฐ€ํ•˜์—ฌ ์ถ”๋ก ์— ํ•„์š”ํ•œ ์ด ์‹œ๊ฐ„์„ ๋‹จ์ถ•ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
max_det int 300 ์ด๋ฏธ์ง€๋‹น ํ—ˆ์šฉ๋˜๋Š” ์ตœ๋Œ€ ๊ฐ์ง€ ํšŸ์ˆ˜. ๋ชจ๋ธ์ด ํ•œ ๋ฒˆ์˜ ์ถ”๋ก ์—์„œ ๊ฐ์ง€ํ•  ์ˆ˜ ์žˆ๋Š” ์ด ์˜ค๋ธŒ์ ํŠธ ์ˆ˜๋ฅผ ์ œํ•œํ•˜์—ฌ ๋ฐ€์ง‘๋œ ์žฅ๋ฉด์—์„œ ๊ณผ๋„ํ•œ ์ถœ๋ ฅ์„ ๋ฐฉ์ง€ํ•ฉ๋‹ˆ๋‹ค.
vid_stride int 1 ๋น„๋””์˜ค ์ž…๋ ฅ์˜ ํ”„๋ ˆ์ž„ ๋ณดํญ. ๋™์˜์ƒ์—์„œ ํ”„๋ ˆ์ž„์„ ๊ฑด๋„ˆ๋›ฐ์–ด ์‹œ๊ฐ„ ํ•ด์ƒ๋„๋ฅผ ํฌ์ƒํ•˜๋ฉด์„œ ์ฒ˜๋ฆฌ ์†๋„๋ฅผ ๋†’์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ’์ด 1์ด๋ฉด ๋ชจ๋“  ํ”„๋ ˆ์ž„์„ ์ฒ˜๋ฆฌํ•˜๊ณ , ๊ฐ’์ด ํด์ˆ˜๋ก ํ”„๋ ˆ์ž„์„ ๊ฑด๋„ˆ๋œ๋‹ˆ๋‹ค.
stream_buffer bool False ๋น„๋””์˜ค ์ŠคํŠธ๋ฆผ์— ๋Œ€ํ•ด ์ˆ˜์‹  ํ”„๋ ˆ์ž„์„ ๋Œ€๊ธฐ์—ด์— ๋„ฃ์„์ง€ ์—ฌ๋ถ€๋ฅผ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค. ๋งŒ์•ฝ False๋กœ ์„ค์ •ํ•˜๋ฉด ์ƒˆ ํ”„๋ ˆ์ž„์„ ์ˆ˜์šฉํ•˜๊ธฐ ์œ„ํ•ด ์ด์ „ ํ”„๋ ˆ์ž„์ด ์‚ญ์ œ๋ฉ๋‹ˆ๋‹ค(์‹ค์‹œ๊ฐ„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์ตœ์ ํ™”๋จ). True'๋ฉด ์ƒˆ ํ”„๋ ˆ์ž„์„ ๋ฒ„ํผ์— ๋Œ€๊ธฐ์‹œ์ผœ ๊ฑด๋„ˆ๋›ฐ๋Š” ํ”„๋ ˆ์ž„์ด ์—†๋„๋ก ํ•˜์ง€๋งŒ ์ถ”๋ก  FPS๊ฐ€ ์ŠคํŠธ๋ฆผ FPS๋ณด๋‹ค ๋‚ฎ์œผ๋ฉด ์ง€์—ฐ์ด ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
visualize bool False ์ถ”๋ก  ์ค‘์— ๋ชจ๋ธ ๊ธฐ๋Šฅ์˜ ์‹œ๊ฐํ™”๋ฅผ ํ™œ์„ฑํ™”ํ•˜์—ฌ ๋ชจ๋ธ์ด '๋ณด๊ณ  ์žˆ๋Š” ๊ฒƒ'์— ๋Œ€ํ•œ ์ธ์‚ฌ์ดํŠธ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ๋””๋ฒ„๊น… ๋ฐ ๋ชจ๋ธ ํ•ด์„์— ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.
augment bool False ์˜ˆ์ธก์„ ์œ„ํ•œ ํ…Œ์ŠคํŠธ ์‹œ๊ฐ„ ์ฆ๊ฐ•(TTA)์„ ์ง€์›ํ•˜์—ฌ ์ถ”๋ก  ์†๋„๋ฅผ ํฌ์ƒํ•˜๋ฉด์„œ ํƒ์ง€ ๊ฒฌ๊ณ ์„ฑ์„ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
agnostic_nms bool False ์„œ๋กœ ๋‹ค๋ฅธ ํด๋ž˜์Šค์˜ ๊ฒน์น˜๋Š” ์ƒ์ž๋ฅผ ๋ณ‘ํ•ฉํ•˜๋Š” ํด๋ž˜์Šค ๋ฌด๊ด€ NMS(Non-Maximum Suppression)๋ฅผ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค. ํด๋ž˜์Šค ์ค‘๋ณต์ด ์ผ๋ฐ˜์ ์ธ ๋‹ค์ค‘ ํด๋ž˜์Šค ํƒ์ง€ ์‹œ๋‚˜๋ฆฌ์˜ค์— ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.
classes list[int] None ํด๋ž˜์Šค ID ์ง‘ํ•ฉ์œผ๋กœ ์˜ˆ์ธก์„ ํ•„ํ„ฐ๋งํ•ฉ๋‹ˆ๋‹ค. ์ง€์ •๋œ ํด๋ž˜์Šค์— ์†ํ•˜๋Š” ํƒ์ง€๋งŒ ๋ฐ˜ํ™˜๋ฉ๋‹ˆ๋‹ค. ๋‹ค์ค‘ ํด๋ž˜์Šค ํƒ์ง€ ์ž‘์—…์—์„œ ๊ด€๋ จ ๊ฐœ์ฒด์— ์ง‘์ค‘ํ•˜๋Š” ๋ฐ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.
retina_masks bool False ๊ณ ํ•ด์ƒ๋„ ๋ถ„ํ•  ๋งˆ์Šคํฌ๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ๋ฐ˜ํ™˜๋œ ๋งˆ์Šคํฌ(masks.data)๋ฅผ ํ™œ์„ฑํ™”ํ•˜๋ฉด ์›๋ณธ ์ด๋ฏธ์ง€ ํฌ๊ธฐ์™€ ์ผ์น˜ํ•ฉ๋‹ˆ๋‹ค. ๋น„ํ™œ์„ฑํ™”ํ•˜๋ฉด ์ถ”๋ก  ์ค‘์— ์‚ฌ์šฉ๋˜๋Š” ์ด๋ฏธ์ง€ ํฌ๊ธฐ๊ฐ€ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
embed list[int] None ํŠน์ง• ๋ฒกํ„ฐ ๋˜๋Š” ์ž„๋ฒ ๋”ฉ์„ ์ถ”์ถœํ•  ๋ ˆ์ด์–ด๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค. ํด๋Ÿฌ์Šคํ„ฐ๋ง์ด๋‚˜ ์œ ์‚ฌ๋„ ๊ฒ€์ƒ‰๊ณผ ๊ฐ™์€ ๋‹ค์šด์ŠคํŠธ๋ฆผ ์ž‘์—…์— ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.
project str None ์˜ˆ์ธก ์ถœ๋ ฅ์ด ์ €์žฅ๋˜๋Š” ํ”„๋กœ์ ํŠธ ๋””๋ ‰ํ„ฐ๋ฆฌ์˜ ์ด๋ฆ„(๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฒฝ์šฐ). save ๊ฐ€ ํ™œ์„ฑํ™”๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
name str None ์˜ˆ์ธก ์‹คํ–‰์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฒฝ์šฐ ์˜ˆ์ธก ์ถœ๋ ฅ์ด ์ €์žฅ๋˜๋Š” ํ”„๋กœ์ ํŠธ ํด๋” ๋‚ด์— ํ•˜์œ„ ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ๋งŒ๋“œ๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. save ๊ฐ€ ํ™œ์„ฑํ™”๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

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

๋ฌผ์ฒด ํ๋ฆผ์ด๋ž€ ๋ฌด์—‡์ธ๊ฐ€์š” Ultralytics YOLO11 ?

๋ฌผ์ฒด ํ๋ฆผ ํšจ๊ณผ Ultralytics YOLO11 ๋Š” ์ด๋ฏธ์ง€๋‚˜ ๋™์˜์ƒ์—์„œ ํŠน์ • ๋ฌผ์ฒด๋ฅผ ์ž๋™์œผ๋กœ ๊ฐ์ง€ํ•˜์—ฌ ํ๋ฆฌ๊ฒŒ ์ฒ˜๋ฆฌํ•˜๋Š” ํšจ๊ณผ๋ฅผ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ธฐ์ˆ ์€ ๊ด€๋ จ ์‹œ๊ฐ ๋ฐ์ดํ„ฐ๋Š” ์œ ์ง€ํ•˜๋ฉด์„œ ๋ฏผ๊ฐํ•œ ์ •๋ณด๋ฅผ ์ˆจ๊ฒจ ๊ฐœ์ธ์ •๋ณด ๋ณดํ˜ธ๋ฅผ ๊ฐ•ํ™”ํ•ฉ๋‹ˆ๋‹ค. YOLO11 ์‹ค์‹œ๊ฐ„ ์ฒ˜๋ฆฌ ๊ธฐ๋Šฅ์œผ๋กœ ์ฆ‰๊ฐ์ ์ธ ๊ฐœ์ธ์ •๋ณด ๋ณดํ˜ธ ๋ฐ ์„ ํƒ์  ์ดˆ์  ์กฐ์ •์ด ํ•„์š”ํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์ ํ•ฉํ•ฉ๋‹ˆ๋‹ค.

YOLO11 ์„ ์‚ฌ์šฉํ•˜์—ฌ ์‹ค์‹œ๊ฐ„ ์˜ค๋ธŒ์ ํŠธ ๋ธ”๋Ÿฌ๋ฅผ ๊ตฌํ˜„ํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

YOLO11 ๋กœ ์‹ค์‹œ๊ฐ„ ๊ฐ์ฒด ํ๋ฆผ ํšจ๊ณผ๋ฅผ ๊ตฌํ˜„ํ•˜๋ ค๋ฉด ์ œ๊ณต๋œ Python ์˜ˆ์ œ๋ฅผ ๋”ฐ๋ฅด์„ธ์š”. ์—ฌ๊ธฐ์—๋Š” ๋ฌผ์ฒด ๊ฐ์ง€์—๋Š” YOLO11 ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ํ๋ฆผ ํšจ๊ณผ ์ ์šฉ์—๋Š” OpenCV๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ์€ ๋‹จ์ˆœํ™”๋œ ๋ฒ„์ „์ž…๋‹ˆ๋‹ค:

import cv2

from ultralytics import YOLO

model = YOLO("yolo11n.pt")
cap = cv2.VideoCapture("path/to/video/file.mp4")

while cap.isOpened():
    success, im0 = cap.read()
    if not success:
        break

    results = model.predict(im0, show=False)
    for box in results[0].boxes.xyxy.cpu().tolist():
        obj = im0[int(box[1]) : int(box[3]), int(box[0]) : int(box[2])]
        im0[int(box[1]) : int(box[3]), int(box[0]) : int(box[2])] = cv2.blur(obj, (50, 50))

    cv2.imshow("YOLO11 Blurring", im0)
    if cv2.waitKey(1) & 0xFF == ord("q"):
        break

cap.release()
cv2.destroyAllWindows()

๋ฌผ์ฒด ํ๋ฆผ์— Ultralytics YOLO11 ์„ ์‚ฌ์šฉํ•˜๋ฉด ์–ด๋–ค ์ด์ ์ด ์žˆ๋‚˜์š”?

Ultralytics YOLO11 ๋Š” ์˜ค๋ธŒ์ ํŠธ ํ๋ฆผ ํšจ๊ณผ์— ๋ช‡ ๊ฐ€์ง€ ์ด์ ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค:

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

์ž์„ธํ•œ ์ ์šฉ ์‚ฌ๋ก€๋Š” ๋ฌผ์ฒด ํ๋ฆผ ํšจ๊ณผ์˜ ์žฅ์  ์„น์…˜์—์„œ ํ™•์ธํ•˜์„ธ์š”.

๊ฐœ์ธ์ •๋ณด ๋ณดํ˜ธ๋ฅผ ์œ„ํ•ด ๋™์˜์ƒ์—์„œ ์–ผ๊ตด์„ ํ๋ฆฌ๊ฒŒ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐ Ultralytics YOLO11 ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‚˜์š”?

์˜ˆ, Ultralytics YOLO11 ์€ ๋™์˜์ƒ์—์„œ ์–ผ๊ตด์„ ๊ฐ์ง€ํ•˜๊ณ  ํ๋ฆฌ๊ฒŒ ์ฒ˜๋ฆฌํ•˜์—ฌ ๊ฐœ์ธ์ •๋ณด๋ฅผ ๋ณดํ˜ธํ•˜๋„๋ก ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์–ผ๊ตด์„ ๊ตฌ์ฒด์ ์œผ๋กœ ์ธ์‹ํ•˜๋„๋ก ๋ฏธ๋ฆฌ ํ›ˆ๋ จํ•˜๊ฑฐ๋‚˜ ํ›ˆ๋ จ๋œ ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ์ง€ ๊ฒฐ๊ณผ๋ฅผ OpenCV๋กœ ์ฒ˜๋ฆฌํ•˜์—ฌ ๋ธ”๋Ÿฌ ํšจ๊ณผ๋ฅผ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌผ์ฒด ๊ฐ์ง€์— ๋Œ€ํ•œ ๊ฐ€์ด๋“œ( YOLO11 )๋ฅผ ์ฐธ์กฐํ•˜์—ฌ ์–ผ๊ตด ๊ฐ์ง€ ๋Œ€์ƒ์— ๋งž๊ฒŒ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์„ธ์š”.

YOLO11 ์€ ๋ฌผ์ฒด ํ๋ฆผ ํšจ๊ณผ๋ฅผ ์œ„ํ•œ Faster R-CNN๊ณผ ๊ฐ™์€ ๋‹ค๋ฅธ ๋ฌผ์ฒด ๊ฐ์ง€ ๋ชจ๋ธ๊ณผ ์–ด๋–ป๊ฒŒ ๋น„๊ต๋˜๋‚˜์š”?

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

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

๋Œ“๊ธ€