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

๋ณด์•ˆ ๊ฒฝ๋ณด ์‹œ์Šคํ…œ ํ”„๋กœ์ ํŠธ ์‚ฌ์šฉ Ultralytics YOLO11

๋ณด์•ˆ ๊ฒฝ๋ณด ์‹œ์Šคํ…œ

Ultralytics YOLO11 ์„ ํ™œ์šฉํ•œ ๋ณด์•ˆ ๊ฒฝ๋ณด ์‹œ์Šคํ…œ ํ”„๋กœ์ ํŠธ๋Š” ๊ณ ๊ธ‰ ์ปดํ“จํ„ฐ ๋น„์ „ ๊ธฐ๋Šฅ์„ ํ†ตํ•ฉํ•˜์—ฌ ๋ณด์•ˆ ์กฐ์น˜๋ฅผ ๊ฐ•ํ™”ํ•ฉ๋‹ˆ๋‹ค. YOLO11 Ultralytics ์—์„œ ๊ฐœ๋ฐœํ•œ ์ด ์‹œ์Šคํ…œ์€ ์‹ค์‹œ๊ฐ„ ๋ฌผ์ฒด ๊ฐ์ง€ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜์—ฌ ์ž ์žฌ์ ์ธ ๋ณด์•ˆ ์œ„ํ˜‘์„ ์ฆ‰์‹œ ์‹๋ณ„ํ•˜๊ณ  ๋Œ€์‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ํ”„๋กœ์ ํŠธ๋Š” ๋ช‡ ๊ฐ€์ง€ ์žฅ์ ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค:

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



Watch: ๋ณด์•ˆ ๊ฒฝ๋ณด ์‹œ์Šคํ…œ ํ”„๋กœ์ ํŠธ Ultralytics YOLO11 ๋ฌผ์ฒด ๊ฐ์ง€

์ฝ”๋“œ

์ฐธ๊ณ 

์•ฑ ๋น„๋ฐ€๋ฒˆํ˜ธ ์ƒ์„ฑ ํ•„์š”

  • Navigate to App Password Generator, designate an app name such as "security project," and obtain a 16-digit password. Copy this password and paste it into the designated password field in the code below.

Security Alarm System using YOLO11 Example

import cv2

from ultralytics import solutions

cap = cv2.VideoCapture("Path/to/video/file.mp4")
assert cap.isOpened(), "Error reading video file"

# Video writer
w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
video_writer = cv2.VideoWriter("security_alarm_output.avi", cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))

from_email = "abc@gmail.com"  # The sender email address
password = "---- ---- ---- ----"  # 16-digits password generated via: https://myaccount.google.com/apppasswords
to_email = "xyz@gmail.com"  # The receiver email address

# Init SecurityAlarm
security = solutions.SecurityAlarm(
    show=True,  # Display the output
    model="yolo11n.pt",  # i.e. YOLO11s.pt
    records=1,  # Total detections count to send an email about security
)

security.authenticate(from_email, password, to_email)  # Authenticate the email server

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

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

๋์ž…๋‹ˆ๋‹ค! ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ๊ฐœ์ฒด๊ฐ€ ๊ฐ์ง€๋˜๋ฉด ์ด๋ฉ”์ผ๋กœ ํ•œ ๋ฒˆ์˜ ์•Œ๋ฆผ์„ ๋ฐ›๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์•Œ๋ฆผ์€ ๋ฐ˜๋ณต์ ์œผ๋กœ ์ „์†ก๋˜์ง€ ์•Š๊ณ  ์ฆ‰์‹œ ์ „์†ก๋ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ํ”„๋กœ์ ํŠธ ์š”๊ตฌ ์‚ฌํ•ญ์— ๋งž๊ฒŒ ์ฝ”๋“œ๋ฅผ ์ž์œ ๋กญ๊ฒŒ ์‚ฌ์šฉ์ž ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด๋ฉ”์ผ ์ˆ˜์‹  ์ƒ˜ํ”Œ

์ด๋ฉ”์ผ ์ˆ˜์‹  ์ƒ˜ํ”Œ

์ธ์ˆ˜ SecurityAlarm

๋‹ค์Œ์€ ํ‘œ์ž…๋‹ˆ๋‹ค. SecurityAlarm ์ธ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค:

์ด๋ฆ„ ์œ ํ˜• ๊ธฐ๋ณธ๊ฐ’ ์„ค๋ช…
model str None Ultralytics YOLO ๋ชจ๋ธ ํŒŒ์ผ ๊ฒฝ๋กœ
line_width int 2 ๊ฒฝ๊ณ„ ์ƒ์ž์˜ ์„  ๋‘๊ป˜์ž…๋‹ˆ๋‹ค.
show bool False ๋น„๋””์˜ค ์ŠคํŠธ๋ฆผ ํ‘œ์‹œ ์—ฌ๋ถ€๋ฅผ ์ œ์–ดํ•˜๋Š” ํ”Œ๋ž˜๊ทธ์ž…๋‹ˆ๋‹ค.
records int 5 Total detections count to send an email about security.

์ธ์ˆ˜ model.track

์ธ์ˆ˜ ์œ ํ˜• ๊ธฐ๋ณธ๊ฐ’ ์„ค๋ช…
source str None ์ด๋ฏธ์ง€ ๋˜๋Š” ๋™์˜์ƒ์˜ ์†Œ์Šค ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค. ํŒŒ์ผ ๊ฒฝ๋กœ ๋ฐ URL์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
persist bool False ํ”„๋ ˆ์ž„ ๊ฐ„ ์˜ค๋ธŒ์ ํŠธ๋ฅผ ์ง€์†์ ์œผ๋กœ ์ถ”์ ํ•˜์—ฌ ๋น„๋””์˜ค ์‹œํ€€์Šค ์ „์ฒด์—์„œ ID๋ฅผ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
tracker str botsort.yaml ์‚ฌ์šฉํ•  ์ถ”์  ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค(์˜ˆ, bytetrack.yaml ๋˜๋Š” botsort.yaml.
conf float 0.3 ํƒ์ง€ ์‹ ๋ขฐ ์ž„๊ณ„๊ฐ’์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ’์ด ๋‚ฎ์„์ˆ˜๋ก ๋” ๋งŽ์€ ๊ฐœ์ฒด๋ฅผ ์ถ”์ ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์˜คํƒ์ด ํฌํ•จ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
iou float 0.5 ์ค‘๋ณต ๊ฐ์ง€๋ฅผ ํ•„ํ„ฐ๋งํ•˜๊ธฐ ์œ„ํ•œ IoU( Intersection over Union ) ์ž„๊ณ„๊ฐ’์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
classes list None ํด๋ž˜์Šค ์ธ๋ฑ์Šค๋ณ„๋กœ ๊ฒฐ๊ณผ๋ฅผ ํ•„ํ„ฐ๋งํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด classes=[0, 2, 3] ์ง€์ •๋œ ํด๋ž˜์Šค๋งŒ ์ถ”์ ํ•ฉ๋‹ˆ๋‹ค.
verbose bool True ์ถ”์  ๊ฒฐ๊ณผ์˜ ํ‘œ์‹œ๋ฅผ ์ œ์–ดํ•˜์—ฌ ์ถ”์ ๋œ ๊ฐœ์ฒด์˜ ์‹œ๊ฐ์  ์ถœ๋ ฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

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

Ultralytics YOLO11 ๋ณด์•ˆ ๊ฒฝ๋ณด ์‹œ์Šคํ…œ์˜ ์ •ํ™•๋„๋ฅผ ์–ด๋–ป๊ฒŒ ๊ฐœ์„ ํ•˜๋‚˜์š”?

Ultralytics YOLO11 ๋Š” ๋†’์€ ์ •ํ™•๋„์˜ ์‹ค์‹œ๊ฐ„ ๊ฐ์ฒด ํƒ์ง€ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜์—ฌ ๋ณด์•ˆ ๊ฒฝ๋ณด ์‹œ์Šคํ…œ์„ ๊ฐ•ํ™”ํ•ฉ๋‹ˆ๋‹ค. ๊ณ ๊ธ‰ ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ์˜คํƒ์„ ํฌ๊ฒŒ ์ค„์—ฌ ์‹œ์Šคํ…œ์ด ์ง„์งœ ์œ„ํ˜‘์—๋งŒ ๋Œ€์‘ํ•˜๋„๋ก ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ํ–ฅ์ƒ๋œ ์•ˆ์ •์„ฑ์€ ๊ธฐ์กด ๋ณด์•ˆ ์ธํ”„๋ผ์™€ ์›ํ™œํ•˜๊ฒŒ ํ†ตํ•ฉ๋˜์–ด ์ „๋ฐ˜์ ์ธ ๋ณด์•ˆ ๊ฐ์‹œ ํ’ˆ์งˆ์„ ์—…๊ทธ๋ ˆ์ด๋“œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Ultralytics YOLO11 ์„ ๊ธฐ์กด ๋ณด์•ˆ ์ธํ”„๋ผ์™€ ํ†ตํ•ฉํ•  ์ˆ˜ ์žˆ๋‚˜์š”?

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

Ultralytics YOLO11 ์„ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•œ ์Šคํ† ๋ฆฌ์ง€ ์š”๊ตฌ ์‚ฌํ•ญ์€ ๋ฌด์—‡์ธ๊ฐ€์š”?

ํ‘œ์ค€ ์„ค์ •์—์„œ Ultralytics YOLO11 ์„ ์‹คํ–‰ํ•˜๋ ค๋ฉด ์ผ๋ฐ˜์ ์œผ๋กœ ์•ฝ 5GB์˜ ๋””์Šคํฌ ์—ฌ์œ  ๊ณต๊ฐ„์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์—๋Š” YOLO11 ๋ชจ๋ธ ๋ฐ ์ถ”๊ฐ€ ์ข…์†์„ฑ์„ ์ €์žฅํ•˜๊ธฐ ์œ„ํ•œ ๊ณต๊ฐ„์ด ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. ํด๋ผ์šฐ๋“œ ๊ธฐ๋ฐ˜ ์†”๋ฃจ์…˜์˜ ๊ฒฝ์šฐ Ultralytics HUB๋Š” ํšจ์œจ์ ์ธ ํ”„๋กœ์ ํŠธ ๊ด€๋ฆฌ ๋ฐ ๋ฐ์ดํ„ฐ ์„ธํŠธ ์ฒ˜๋ฆฌ๋ฅผ ์ œ๊ณตํ•˜์—ฌ ์Šคํ† ๋ฆฌ์ง€ ์š”๊ตฌ ์‚ฌํ•ญ์„ ์ตœ์ ํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ™•์žฅ ์Šคํ† ๋ฆฌ์ง€๋ฅผ ํฌํ•จํ•œ ํ–ฅ์ƒ๋œ ๊ธฐ๋Šฅ์— ๋Œ€ํ•œ ํ”„๋กœ ์š”๊ธˆ์ œ์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด์„ธ์š”.

Ultralytics YOLO11 ๋‹ค๋ฅธ ๊ฐ์ฒด ๊ฐ์ง€ ๋ชจ๋ธ(์˜ˆ: Faster R-CNN ๋˜๋Š” SSD)๊ณผ ๋‹ค๋ฅธ ์ ์€ ๋ฌด์—‡์ธ๊ฐ€์š”?

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

Ultralytics YOLO11 ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ณด์•ˆ ์‹œ์Šคํ…œ์—์„œ ์˜คํƒ ๋นˆ๋„๋ฅผ ์ค„์ด๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

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

๐Ÿ“…1 ๋…„ ์ „ ์ƒ์„ฑ๋จ โœ๏ธ ์—…๋ฐ์ดํŠธ๋จ 27์ผ ์ „

๋Œ“๊ธ€