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

Ultralytics YOLO11 ๐Ÿš€๋ฅผ ์‚ฌ์šฉํ•œ VisionEye ๋ทฐ ์˜ค๋ธŒ์ ํŠธ ๋งคํ•‘

๋น„์ „์•„์ด ์˜ค๋ธŒ์ ํŠธ ๋งคํ•‘์ด๋ž€ ๋ฌด์—‡์ธ๊ฐ€์š”?

Ultralytics YOLO11 VisionEye๋Š” ์ปดํ“จํ„ฐ๊ฐ€ ๋ฌผ์ฒด๋ฅผ ์‹๋ณ„ํ•˜๊ณ  ์ •ํ™•ํžˆ ์ฐพ์•„๋‚ผ ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜์—ฌ ์‚ฌ๋žŒ์˜ ๋ˆˆ์˜ ๊ด€์ฐฐ ์ •๋ฐ€๋„๋ฅผ ์‹œ๋ฎฌ๋ ˆ์ด์…˜ํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ธฐ๋Šฅ์„ ํ†ตํ•ด ์ปดํ“จํ„ฐ๋Š” ์‚ฌ๋žŒ์˜ ๋ˆˆ์ด ํŠน์ • ์‹œ์ ์—์„œ ์„ธ๋ถ€ ์‚ฌํ•ญ์„ ๊ด€์ฐฐํ•˜๋Š” ๋ฐฉ์‹๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ํŠน์ • ๋ฌผ์ฒด๋ฅผ ์‹๋ณ„ํ•˜๊ณ  ์ง‘์ค‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ƒ˜ํ”Œ

๋น„์ „์•„์ด ๋ทฐ ๊ฐ์ฒด ์ถ”์  ๊ธฐ๋Šฅ์ด ์žˆ๋Š” VisionEye ๋ทฐ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ์ด ํฌํ•จ๋œ VisionEye ๋ณด๊ธฐ
VisionEye ๋ทฐ ๊ฐ์ฒด ๋งคํ•‘์„ ์‚ฌ์šฉํ•˜์—ฌ Ultralytics YOLO11 ๋‹ค์Œ์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ์ฒด ์ถ”์ ์„ ํ†ตํ•œ VisionEye ๋ณด๊ธฐ ๊ฐ์ฒด ๋งคํ•‘ Ultralytics YOLO11 ๋‹ค์Œ์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ์ด ํฌํ•จ๋œ VisionEye ๋ณด๊ธฐ Ultralytics YOLO11
VisionEye ๋ทฐ ๊ฐ์ฒด ๋งคํ•‘์„ ์‚ฌ์šฉํ•˜์—ฌ Ultralytics YOLO11 ๋‹ค์Œ์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ์ฒด ์ถ”์ ์„ ํ†ตํ•œ VisionEye ๋ณด๊ธฐ ๊ฐ์ฒด ๋งคํ•‘ Ultralytics YOLO11 ๋‹ค์Œ์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ์ด ํฌํ•จ๋œ VisionEye ๋ณด๊ธฐ Ultralytics YOLO11

VisionEye ์˜ค๋ธŒ์ ํŠธ ๋งคํ•‘์„ ์‚ฌ์šฉํ•˜์—ฌ YOLO11

import cv2

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

model = YOLO("yolo11n.pt")
names = model.model.names
cap = cv2.VideoCapture("path/to/video/file.mp4")
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))

out = cv2.VideoWriter("visioneye-pinpoint.avi", cv2.VideoWriter_fourcc(*"MJPG"), fps, (w, h))

center_point = (-10, h)

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

    results = model.predict(im0)
    boxes = results[0].boxes.xyxy.cpu()
    clss = results[0].boxes.cls.cpu().tolist()

    annotator = Annotator(im0, line_width=2)

    for box, cls in zip(boxes, clss):
        annotator.box_label(box, label=names[int(cls)], color=colors(int(cls)))
        annotator.visioneye(box, center_point)

    out.write(im0)
    cv2.imshow("visioneye-pinpoint", im0)

    if cv2.waitKey(1) & 0xFF == ord("q"):
        break

out.release()
cap.release()
cv2.destroyAllWindows()
import cv2

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

model = YOLO("yolo11n.pt")
cap = cv2.VideoCapture("path/to/video/file.mp4")
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))

out = cv2.VideoWriter("visioneye-pinpoint.avi", cv2.VideoWriter_fourcc(*"MJPG"), fps, (w, h))

center_point = (-10, h)

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

    annotator = Annotator(im0, line_width=2)

    results = model.track(im0, persist=True)
    boxes = results[0].boxes.xyxy.cpu()

    if results[0].boxes.id is not None:
        track_ids = results[0].boxes.id.int().cpu().tolist()

        for box, track_id in zip(boxes, track_ids):
            annotator.box_label(box, label=str(track_id), color=colors(int(track_id)))
            annotator.visioneye(box, center_point)

    out.write(im0)
    cv2.imshow("visioneye-pinpoint", im0)

    if cv2.waitKey(1) & 0xFF == ord("q"):
        break

out.release()
cap.release()
cv2.destroyAllWindows()
import math

import cv2

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

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

w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))

out = cv2.VideoWriter("visioneye-distance-calculation.avi", cv2.VideoWriter_fourcc(*"MJPG"), fps, (w, h))

center_point = (0, h)
pixel_per_meter = 10

txt_color, txt_background, bbox_clr = ((0, 0, 0), (255, 255, 255), (255, 0, 255))

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

    annotator = Annotator(im0, line_width=2)

    results = model.track(im0, persist=True)
    boxes = results[0].boxes.xyxy.cpu()

    if results[0].boxes.id is not None:
        track_ids = results[0].boxes.id.int().cpu().tolist()

        for box, track_id in zip(boxes, track_ids):
            annotator.box_label(box, label=str(track_id), color=bbox_clr)
            annotator.visioneye(box, center_point)

            x1, y1 = int((box[0] + box[2]) // 2), int((box[1] + box[3]) // 2)  # Bounding box centroid

            distance = (math.sqrt((x1 - center_point[0]) ** 2 + (y1 - center_point[1]) ** 2)) / pixel_per_meter

            text_size, _ = cv2.getTextSize(f"Distance: {distance:.2f} m", cv2.FONT_HERSHEY_SIMPLEX, 1.2, 3)
            cv2.rectangle(im0, (x1, y1 - text_size[1] - 10), (x1 + text_size[0] + 10, y1), txt_background, -1)
            cv2.putText(im0, f"Distance: {distance:.2f} m", (x1, y1 - 5), cv2.FONT_HERSHEY_SIMPLEX, 1.2, txt_color, 3)

    out.write(im0)
    cv2.imshow("visioneye-distance-calculation", im0)

    if cv2.waitKey(1) & 0xFF == ord("q"):
        break

out.release()
cap.release()
cv2.destroyAllWindows()

visioneye ์ธ์ˆ˜

์ด๋ฆ„ ์œ ํ˜• ๊ธฐ๋ณธ๊ฐ’ ์„ค๋ช…
color tuple (235, 219, 11) ์„  ๋ฐ ๊ฐœ์ฒด ์ค‘์‹ฌ์ƒ‰
pin_color tuple (255, 0, 255) VisionEye ํ•€ํฌ์ธํŠธ ์ปฌ๋Ÿฌ

์ฐธ๊ณ 

๋ฌธ์˜ ์‚ฌํ•ญ์ด ์žˆ์œผ์‹œ๋ฉด Ultralytics ์ด์Šˆ ์„น์…˜ ๋˜๋Š” ์•„๋ž˜์— ์–ธ๊ธ‰๋œ ํ† ๋ก  ์„น์…˜์— ์ž์œ ๋กญ๊ฒŒ ์งˆ๋ฌธ์„ ๊ฒŒ์‹œํ•ด ์ฃผ์„ธ์š”.

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

VisionEye ๊ฐ์ฒด ๋งคํ•‘์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ์‹œ์ž‘ํ•˜๋‚˜์š” Ultralytics YOLO11 ?

Ultralytics YOLO11 ์—์„œ VisionEye ๊ฐ์ฒด ๋งคํ•‘์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋จผ์ € pip๋ฅผ ํ†ตํ•ด Ultralytics YOLO ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ๋‹ค์Œ ์„ค๋ช…์„œ์— ์ œ๊ณต๋œ ์ƒ˜ํ”Œ ์ฝ”๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ VisionEye๋กœ ๊ฐ์ฒด ๊ฐ์ง€๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ์€ ์‹œ์ž‘ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋˜๋Š” ๊ฐ„๋‹จํ•œ ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค:

import cv2

from ultralytics import YOLO

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

while True:
    ret, frame = cap.read()
    if not ret:
        break

    results = model.predict(frame)
    for result in results:
        # Perform custom logic with result
        pass

    cv2.imshow("visioneye", frame)
    if cv2.waitKey(1) & 0xFF == ord("q"):
        break

cap.release()
cv2.destroyAllWindows()

Ultralytics YOLO11 ์„ ์‚ฌ์šฉํ•˜๋Š” VisionEye์˜ ๊ฐ์ฒด ์ถ”์  ๊ธฐ๋Šฅ์˜ ์ฃผ์š” ๊ธฐ๋Šฅ์€ ๋ฌด์—‡์ธ๊ฐ€์š”?

VisionEye์˜ ๊ฐ์ฒด ์ถ”์ ( Ultralytics YOLO11 )์„ ํ†ตํ•ด ์‚ฌ์šฉ์ž๋Š” ๋น„๋””์˜ค ํ”„๋ ˆ์ž„ ๋‚ด์—์„œ ๊ฐ์ฒด์˜ ์›€์ง์ž„์„ ์ถ”์ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฃผ์š” ๊ธฐ๋Šฅ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:

  1. ์‹ค์‹œ๊ฐ„ ๊ฐ์ฒด ์ถ”์ : ๋ฌผ์ฒด๊ฐ€ ์›€์ง์ผ ๋•Œ ๋”ฐ๋ผ์žก์Šต๋‹ˆ๋‹ค.
  2. ๊ฐ์ฒด ์‹๋ณ„: YOLO11 ์˜ ๊ฐ•๋ ฅํ•œ ํƒ์ง€ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ํ™œ์šฉํ•ฉ๋‹ˆ๋‹ค.
  3. ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ: ๊ฐœ์ฒด์™€ ์ง€์ •๋œ ์ง€์  ์‚ฌ์ด์˜ ๊ฑฐ๋ฆฌ๋ฅผ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.
  4. ์ฃผ์„ ๋ฐ ์‹œ๊ฐํ™”: ์ถ”์ ๋œ ๊ฐœ์ฒด์— ๋Œ€ํ•œ ์‹œ๊ฐ์  ๋งˆ์ปค๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ์€ VisionEye๋ฅผ ์‚ฌ์šฉํ•œ ํŠธ๋ž˜ํ‚น์„ ๋ณด์—ฌ์ฃผ๋Š” ๊ฐ„๋‹จํ•œ ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์ž…๋‹ˆ๋‹ค:

import cv2

from ultralytics import YOLO

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

while True:
    ret, frame = cap.read()
    if not ret:
        break

    results = model.track(frame, persist=True)
    for result in results:
        # Annotate and visualize tracking
        pass

    cv2.imshow("visioneye-tracking", frame)
    if cv2.waitKey(1) & 0xFF == ord("q"):
        break

cap.release()
cv2.destroyAllWindows()

์ข…ํ•ฉ์ ์ธ ๊ฐ€์ด๋“œ๋Š” ๊ฐ์ฒด ์ถ”์ ์„ ์‚ฌ์šฉํ•œ VisionEye ๊ฐ์ฒด ๋งคํ•‘์„ ์ฐธ์กฐํ•˜์„ธ์š”.

VisionEye์˜ YOLO11 ๋ชจ๋ธ๋กœ ๊ฑฐ๋ฆฌ๋ฅผ ๊ณ„์‚ฐํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

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

๋‹ค์Œ์€ ๊ฐ„๋‹จํ•œ ์˜ˆ์ž…๋‹ˆ๋‹ค:

import math

import cv2

from ultralytics import YOLO

model = YOLO("yolo11n.pt")
cap = cv2.VideoCapture("path/to/video/file.mp4")
center_point = (0, 480)  # Example center point
pixel_per_meter = 10

while True:
    ret, frame = cap.read()
    if not ret:
        break

    results = model.track(frame, persist=True)
    for result in results:
        # Calculate distance logic
        distances = [
            (math.sqrt((box[0] - center_point[0]) ** 2 + (box[1] - center_point[1]) ** 2)) / pixel_per_meter
            for box in results
        ]

    cv2.imshow("visioneye-distance", frame)
    if cv2.waitKey(1) & 0xFF == ord("q"):
        break

cap.release()
cv2.destroyAllWindows()

์ž์„ธํ•œ ์ง€์นจ์€ ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ๊ธฐ๋Šฅ์ด ์žˆ๋Š” VisionEye๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

๊ฐ์ฒด ๋งคํ•‘ ๋ฐ ์ถ”์ ์— Ultralytics YOLO11 ์„ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?

Ultralytics YOLO11 ๋Š” ์†๋„, ์ •ํ™•์„ฑ, ํ†ตํ•ฉ ์šฉ์ด์„ฑ์œผ๋กœ ์ž˜ ์•Œ๋ ค์ ธ ์žˆ์–ด ๊ฐ์ฒด ๋งคํ•‘ ๋ฐ ์ถ”์ ์— ์ตœ๊ณ ์˜ ์„ ํƒ์ž…๋‹ˆ๋‹ค. ์ฃผ์š” ์žฅ์ ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:

  1. ์ตœ์ฒจ๋‹จ ์„ฑ๋Šฅ: ์‹ค์‹œ๊ฐ„ ๋ฌผ์ฒด ๊ฐ์ง€์—์„œ ๋†’์€ ์ •ํ™•๋„๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  2. ์œ ์—ฐ์„ฑ: ๊ฐ์ง€, ์ถ”์ , ๊ฑฐ๋ฆฌ ๊ณ„์‚ฐ ๋“ฑ ๋‹ค์–‘ํ•œ ์ž‘์—…์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
  3. ์ปค๋ฎค๋‹ˆํ‹ฐ ๋ฐ ์ง€์›: ๋ฌธ์ œ ํ•ด๊ฒฐ ๋ฐ ๊ฐœ์„ ์„ ์œ„ํ•œ ๊ด‘๋ฒ”์œ„ํ•œ ๋ฌธ์„œ์™€ ํ™œ๋ฐœํ•œ GitHub ์ปค๋ฎค๋‹ˆํ‹ฐ.
  4. ์‚ฌ์šฉ ํŽธ์˜์„ฑ: ์ง๊ด€์ ์ธ API๋กœ ๋ณต์žกํ•œ ์ž‘์—…์„ ๊ฐ„์†Œํ™”ํ•˜์—ฌ ์‹ ์†ํ•œ ๋ฐฐํฌ์™€ ๋ฐ˜๋ณต์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

์‹ ์ฒญ ๋ฐ ํ˜œํƒ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ Ultralytics YOLO11 ๋ฌธ์„œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

VisionEye๋ฅผ Comet ๋˜๋Š” ClearML ๊ณผ ๊ฐ™์€ ๋‹ค๋ฅธ ๋จธ์‹  ๋Ÿฌ๋‹ ๋„๊ตฌ์™€ ํ†ตํ•ฉํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

Ultralytics YOLO11 ๋Š” Comet ๋ฐ ClearML ๊ณผ ๊ฐ™์€ ๋‹ค์–‘ํ•œ ๋จธ์‹ ๋Ÿฌ๋‹ ๋„๊ตฌ์™€ ์›ํ™œํ•˜๊ฒŒ ํ†ตํ•ฉ๋˜์–ด ์‹คํ—˜ ์ถ”์ , ํ˜‘์—… ๋ฐ ์žฌํ˜„์„ฑ์„ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. YOLOv5 ์„ Comet ๊ณผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•๊ณผ YOLO11 ์„ ClearML ๊ณผ ํ†ตํ•ฉํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๊ฐ€์ด๋“œ๋ฅผ ์ฐธ์กฐํ•˜์—ฌ ์‹œ์ž‘ํ•˜์„ธ์š”.

์ž์„ธํ•œ ํƒ์ƒ‰ ๋ฐ ํ†ตํ•ฉ ์˜ˆ์‹œ๋Š” Ultralytics ํ†ตํ•ฉ ๊ฐ€์ด๋“œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

๐Ÿ“… Created 12 months ago โœ๏ธ Updated 2 months ago

๋Œ“๊ธ€