{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "ba956452",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using CPU. Note: This module is much faster with a GPU.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Detected text: L23무 1470], Confidence: 0.06\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 7464 characters]",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import easyocr\n",
    "import cv2\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "# 1. EasyOCR Reader 생성\n",
    "# 한국어와 영어를 인식하도록 설정 ('ko'는 한글, 'en'은 영어)\n",
    "reader = easyocr.Reader(['ko', 'en'], gpu=False)\n",
    "\n",
    "# 2. 이미지 불러오기\n",
    "image_path = '/home/cuuva/다운로드/test/ocr_resized.png'\n",
    "image = cv2.imread(image_path)\n",
    "\n",
    "# OpenCV는 BGR로 읽으므로 RGB로 변환\n",
    "image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)\n",
    "\n",
    "# 3. OCR 수행\n",
    "# detail=1이면 위치 정보와 함께 리턴\n",
    "results = reader.readtext(image_rgb, detail=1)\n",
    "\n",
    "# 4. 결과 출력\n",
    "for (bbox, text, prob) in results:\n",
    "    print(f\"Detected text: {text}, Confidence: {prob:.2f}\")\n",
    "    \n",
    "    # 결과 시각화\n",
    "    top_left = tuple(map(int, bbox[0]))\n",
    "    bottom_right = tuple(map(int, bbox[2]))\n",
    "    cv2.rectangle(image_rgb, top_left, bottom_right, (0, 255, 0), 2)\n",
    "    cv2.putText(image_rgb, text, (top_left[0], top_left[1]-10), \n",
    "                cv2.FONT_HERSHEY_SIMPLEX, 0.8, (0, 0, 255), 2)\n",
    "\n",
    "# 5. 시각화\n",
    "plt.figure(figsize=(10,6))\n",
    "plt.imshow(image_rgb)\n",
    "plt.axis('off')\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "edcfea74",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using CPU. Note: This module is much faster with a GPU.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Inference time: 0.026 seconds\n",
      "Detected text: '05무, Confidence: 0.37\n",
      "Detected text: 5844], Confidence: 0.66\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 36988 characters]",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import easyocr\n",
    "import cv2\n",
    "from matplotlib import pyplot as plt\n",
    "import time  # ⬅ 추가\n",
    "\n",
    "# 1. EasyOCR Reader 생성\n",
    "reader = easyocr.Reader(['ko', 'en'], gpu=False)\n",
    "\n",
    "# 2. 이미지 불러오기\n",
    "# image_path = '/home/cuuva/다운로드/test/ocr_resized.png'\n",
    "image_path = '/home/cuuva/experiment/custom_LP_detect/ocr2.png'\n",
    "image = cv2.imread(image_path)\n",
    "image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)\n",
    "\n",
    "# ------------------------\n",
    "# 3. OCR 수행 및 시간 측정\n",
    "# ------------------------\n",
    "start_time = time.time()\n",
    "results = reader.readtext(image_rgb, detail=1)\n",
    "end_time = time.time()\n",
    "print(f\"Inference time: {end_time - start_time:.3f} seconds\")\n",
    "\n",
    "# 4. 결과 출력 및 시각화\n",
    "for (bbox, text, prob) in results:\n",
    "    print(f\"Detected text: {text}, Confidence: {prob:.2f}\")\n",
    "    \n",
    "    # 바운딩 박스\n",
    "    top_left = tuple(map(int, bbox[0]))\n",
    "    bottom_right = tuple(map(int, bbox[2]))\n",
    "    cv2.rectangle(image_rgb, top_left, bottom_right, (0, 255, 0), 2)\n",
    "    cv2.putText(image_rgb, text, (top_left[0], top_left[1]-10), \n",
    "                cv2.FONT_HERSHEY_SIMPLEX, 0.8, (0, 0, 255), 2)\n",
    "\n",
    "# 5. 시각화\n",
    "plt.figure(figsize=(10,6))\n",
    "plt.imshow(image_rgb)\n",
    "plt.axis('off')\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d0d8c590",
   "metadata": {},
   "source": [
    "# Paddle OCR 사용\n",
    "### 1. 원본 crop\n",
    "### 2. 640*384 변환 후 crop"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "96833108",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/tmp/ipykernel_788464/4250097566.py:6: DeprecationWarning: The parameter `use_angle_cls` has been deprecated and will be removed in the future. Please use `use_textline_orientation` instead.\n",
      "  ocr = PaddleOCR(lang='korean', use_angle_cls=True)  # CPU\n",
      "\u001b[32mCreating model: ('PP-LCNet_x1_0_doc_ori', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/PP-LCNet_x1_0_doc_ori`.\u001b[0m\n",
      "\u001b[32mCreating model: ('UVDoc', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/UVDoc`.\u001b[0m\n",
      "\u001b[32mCreating model: ('PP-LCNet_x1_0_textline_ori', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/PP-LCNet_x1_0_textline_ori`.\u001b[0m\n",
      "\u001b[32mCreating model: ('PP-OCRv5_server_det', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/PP-OCRv5_server_det`.\u001b[0m\n",
      "\u001b[32mCreating model: ('korean_PP-OCRv5_mobile_rec', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/korean_PP-OCRv5_mobile_rec`.\u001b[0m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Detected text: ·23무, Confidence: 0.89\n",
      "Detected text: 1499, Confidence: 1.00\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 21072 characters]",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from paddleocr import PaddleOCR\n",
    "import cv2\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "# PaddleOCR 객체 생성\n",
    "ocr = PaddleOCR(lang='korean', use_angle_cls=True)  # CPU\n",
    "\n",
    "# 이미지 불러오기\n",
    "image_path = '/home/cuuva/다운로드/test/ocr.png'\n",
    "image = cv2.imread(image_path)\n",
    "image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)\n",
    "\n",
    "# OCR 수행\n",
    "results = ocr.predict(image_path)\n",
    "\n",
    "# dict 구조 확인\n",
    "for page in results:\n",
    "    rec_texts = page['rec_texts']\n",
    "    rec_scores = page['rec_scores']\n",
    "    rec_polys = page['rec_polys']\n",
    "\n",
    "    for text, score, poly in zip(rec_texts, rec_scores, rec_polys):\n",
    "        print(f\"Detected text: {text}, Confidence: {score:.2f}\")\n",
    "\n",
    "        # 바운딩 박스 그리기\n",
    "        top_left = tuple(map(int, poly[0]))\n",
    "        bottom_right = tuple(map(int, poly[2]))\n",
    "        cv2.rectangle(image_rgb, top_left, bottom_right, (0, 255, 0), 2)\n",
    "        cv2.putText(image_rgb, text, (top_left[0], top_left[1]-10),\n",
    "                    cv2.FONT_HERSHEY_SIMPLEX, 0.8, (255, 0, 0), 2)\n",
    "\n",
    "# 시각화\n",
    "plt.figure(figsize=(10, 6))\n",
    "plt.imshow(image_rgb)\n",
    "plt.axis('off')\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "a872ddff",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/tmp/ipykernel_788464/878629889.py:6: DeprecationWarning: The parameter `use_angle_cls` has been deprecated and will be removed in the future. Please use `use_textline_orientation` instead.\n",
      "  ocr = PaddleOCR(lang='korean', use_angle_cls=True)  # CPU\n",
      "\u001b[32mCreating model: ('PP-LCNet_x1_0_doc_ori', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/PP-LCNet_x1_0_doc_ori`.\u001b[0m\n",
      "\u001b[32mCreating model: ('UVDoc', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/UVDoc`.\u001b[0m\n",
      "\u001b[32mCreating model: ('PP-LCNet_x1_0_textline_ori', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/PP-LCNet_x1_0_textline_ori`.\u001b[0m\n",
      "\u001b[32mCreating model: ('PP-OCRv5_server_det', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/PP-OCRv5_server_det`.\u001b[0m\n",
      "\u001b[32mCreating model: ('korean_PP-OCRv5_mobile_rec', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/korean_PP-OCRv5_mobile_rec`.\u001b[0m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Detected text: 23부 1499-, Confidence: 0.77\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 7320 characters]",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from paddleocr import PaddleOCR\n",
    "import cv2\n",
    "from matplotlib import pyplot as plt\n",
    "\n",
    "# PaddleOCR 객체 생성\n",
    "ocr = PaddleOCR(lang='korean', use_angle_cls=True)  # CPU\n",
    "\n",
    "# 이미지 불러오기\n",
    "image_path = '/home/cuuva/다운로드/test/ocr_resized.png'\n",
    "image = cv2.imread(image_path)\n",
    "image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)\n",
    "\n",
    "# OCR 수행\n",
    "results = ocr.predict(image_path)\n",
    "\n",
    "# dict 구조 확인\n",
    "for page in results:\n",
    "    rec_texts = page['rec_texts']\n",
    "    rec_scores = page['rec_scores']\n",
    "    rec_polys = page['rec_polys']\n",
    "\n",
    "    for text, score, poly in zip(rec_texts, rec_scores, rec_polys):\n",
    "        print(f\"Detected text: {text}, Confidence: {score:.2f}\")\n",
    "\n",
    "        # 바운딩 박스 그리기\n",
    "        top_left = tuple(map(int, poly[0]))\n",
    "        bottom_right = tuple(map(int, poly[2]))\n",
    "        cv2.rectangle(image_rgb, top_left, bottom_right, (0, 255, 0), 2)\n",
    "        cv2.putText(image_rgb, text, (top_left[0], top_left[1]-10),\n",
    "                    cv2.FONT_HERSHEY_SIMPLEX, 0.8, (255, 0, 0), 2)\n",
    "\n",
    "# 시각화\n",
    "plt.figure(figsize=(10, 6))\n",
    "plt.imshow(image_rgb)\n",
    "plt.axis('off')\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "3a31a096",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/tmp/ipykernel_788464/2680696544.py:7: DeprecationWarning: The parameter `use_angle_cls` has been deprecated and will be removed in the future. Please use `use_textline_orientation` instead.\n",
      "  ocr = PaddleOCR(lang='korean', use_angle_cls=True)  # CPU\n",
      "\u001b[32mCreating model: ('PP-LCNet_x1_0_doc_ori', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/PP-LCNet_x1_0_doc_ori`.\u001b[0m\n",
      "\u001b[32mCreating model: ('UVDoc', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/UVDoc`.\u001b[0m\n",
      "\u001b[32mCreating model: ('PP-LCNet_x1_0_textline_ori', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/PP-LCNet_x1_0_textline_ori`.\u001b[0m\n",
      "\u001b[32mCreating model: ('PP-OCRv5_server_det', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/PP-OCRv5_server_det`.\u001b[0m\n",
      "\u001b[32mCreating model: ('korean_PP-OCRv5_mobile_rec', None)\u001b[0m\n",
      "\u001b[32mModel files already exist. Using cached files. To redownload, please delete the directory manually: `/home/cuuva/.paddlex/official_models/korean_PP-OCRv5_mobile_rec`.\u001b[0m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Inference time: 0.286 seconds\n",
      "Detected text: 23부 1499-, Confidence: 0.77\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 7320 characters]",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from paddleocr import PaddleOCR\n",
    "import cv2\n",
    "from matplotlib import pyplot as plt\n",
    "import time  # ⬅ 추가\n",
    "\n",
    "# PaddleOCR 객체 생성\n",
    "ocr = PaddleOCR(lang='korean', use_angle_cls=True)  # CPU\n",
    "\n",
    "# 이미지 불러오기\n",
    "image_path = '/home/cuuva/다운로드/test/ocr_resized.png'\n",
    "image = cv2.imread(image_path)\n",
    "image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)\n",
    "\n",
    "# ------------------------\n",
    "#  Inference 시간 측정 시작\n",
    "# ------------------------\n",
    "start_time = time.time()\n",
    "results = ocr.predict(image_path)\n",
    "end_time = time.time()\n",
    "print(f\"Inference time: {end_time - start_time:.3f} seconds\")\n",
    "# ------------------------\n",
    "\n",
    "# OCR 결과 출력 및 시각화\n",
    "for page in results:\n",
    "    rec_texts = page['rec_texts']\n",
    "    rec_scores = page['rec_scores']\n",
    "    rec_polys = page['rec_polys']\n",
    "\n",
    "    for text, score, poly in zip(rec_texts, rec_scores, rec_polys):\n",
    "        print(f\"Detected text: {text}, Confidence: {score:.2f}\")\n",
    "\n",
    "        # 바운딩 박스 그리기\n",
    "        top_left = tuple(map(int, poly[0]))\n",
    "        bottom_right = tuple(map(int, poly[2]))\n",
    "        cv2.rectangle(image_rgb, top_left, bottom_right, (0, 255, 0), 2)\n",
    "        cv2.putText(image_rgb, text, (top_left[0], top_left[1]-10),\n",
    "                    cv2.FONT_HERSHEY_SIMPLEX, 0.8, (255, 0, 0), 2)\n",
    "\n",
    "# 시각화\n",
    "plt.figure(figsize=(10, 6))\n",
    "plt.imshow(image_rgb)\n",
    "plt.axis('off')\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "5abda048",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "PaddlePaddle version: 3.2.2\n",
      "Use GPU: False\n"
     ]
    }
   ],
   "source": [
    "import paddle\n",
    "print(\"PaddlePaddle version:\", paddle.__version__)\n",
    "print(\"Use GPU:\", paddle.is_compiled_with_cuda())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "9870ce12",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "🎬 영상 처리 시작: /home/cuuva/다운로드/car_lp.mov\n",
      "🎯 저장 경로: /home/cuuva/다운로드/lp_infer.mp4\n",
      "\n",
      "0: 384x640 (no detections), 16.8ms\n",
      "Speed: 1.3ms preprocess, 16.8ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.1ms\n",
      "Speed: 2.1ms preprocess, 2.1ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.1ms\n",
      "Speed: 0.6ms preprocess, 2.1ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.2ms\n",
      "Speed: 0.7ms preprocess, 2.2ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.6ms preprocess, 2.0ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.6ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.3ms\n",
      "Speed: 0.5ms preprocess, 2.3ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.4ms\n",
      "Speed: 0.5ms preprocess, 2.4ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.6ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.3ms\n",
      "Speed: 0.6ms preprocess, 2.3ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.2ms\n",
      "Speed: 0.6ms preprocess, 2.2ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.7ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "✅ 처리 프레임: 50\n",
      "\n",
      "0: 384x640 (no detections), 2.1ms\n",
      "Speed: 0.6ms preprocess, 2.1ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.6ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.1ms\n",
      "Speed: 0.6ms preprocess, 2.1ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.6ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.6ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "✅ 처리 프레임: 100\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 8 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.7ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 3.1ms\n",
      "Speed: 0.9ms preprocess, 3.1ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.3ms\n",
      "Speed: 0.7ms preprocess, 2.3ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.3ms\n",
      "Speed: 0.6ms preprocess, 2.3ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.3ms\n",
      "Speed: 0.7ms preprocess, 2.3ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "✅ 처리 프레임: 150\n",
      "\n",
      "0: 384x640 2 lps, 2.3ms\n",
      "Speed: 0.7ms preprocess, 2.3ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.5ms\n",
      "Speed: 0.8ms preprocess, 2.5ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.0ms\n",
      "Speed: 0.6ms preprocess, 2.0ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.6ms\n",
      "Speed: 0.6ms preprocess, 2.6ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.1ms\n",
      "Speed: 0.6ms preprocess, 2.1ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 (no detections), 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.2ms\n",
      "Speed: 0.6ms preprocess, 2.2ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.1ms\n",
      "Speed: 0.6ms preprocess, 2.1ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.2ms\n",
      "Speed: 0.6ms preprocess, 2.2ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.1ms\n",
      "Speed: 0.6ms preprocess, 2.1ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.2ms\n",
      "Speed: 0.5ms preprocess, 2.2ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.8ms preprocess, 2.0ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.6ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "✅ 처리 프레임: 200\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.7ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.3ms\n",
      "Speed: 0.6ms preprocess, 2.3ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 2.3ms\n",
      "Speed: 0.9ms preprocess, 2.3ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 2.2ms\n",
      "Speed: 0.7ms preprocess, 2.2ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.2ms\n",
      "Speed: 0.7ms preprocess, 2.2ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.2ms\n",
      "Speed: 0.7ms preprocess, 2.2ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 2.2ms\n",
      "Speed: 0.6ms preprocess, 2.2ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 2.4ms\n",
      "Speed: 0.7ms preprocess, 2.4ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 2.4ms\n",
      "Speed: 0.8ms preprocess, 2.4ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 2.1ms\n",
      "Speed: 0.7ms preprocess, 2.1ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 2.2ms\n",
      "Speed: 0.5ms preprocess, 2.2ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 8 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "✅ 처리 프레임: 250\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 8 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 8 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 8 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 2.0ms\n",
      "Speed: 0.8ms preprocess, 2.0ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 2.0ms\n",
      "Speed: 0.8ms preprocess, 2.0ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 8 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 2.1ms\n",
      "Speed: 0.8ms preprocess, 2.1ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 8 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 2.4ms\n",
      "Speed: 0.7ms preprocess, 2.4ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 2.1ms\n",
      "Speed: 0.5ms preprocess, 2.1ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "✅ 처리 프레임: 300\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 2.5ms\n",
      "Speed: 0.5ms preprocess, 2.5ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 2.1ms\n",
      "Speed: 0.6ms preprocess, 2.1ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "✅ 처리 프레임: 350\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.6ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 8 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.2ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 7 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 5 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 1.0ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 6 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.1ms\n",
      "Speed: 0.8ms preprocess, 2.1ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "✅ 처리 프레임: 400\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.8ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.6ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.6ms preprocess, 2.0ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.3ms\n",
      "Speed: 0.4ms preprocess, 2.3ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.3ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.7ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 2.0ms\n",
      "Speed: 0.8ms preprocess, 2.0ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 1 lp, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "✅ 처리 프레임: 450\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 2.2ms\n",
      "Speed: 0.5ms preprocess, 2.2ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 2.0ms\n",
      "Speed: 0.5ms preprocess, 2.0ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.8ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 2.1ms\n",
      "Speed: 0.6ms preprocess, 2.1ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 4 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 2 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.4ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.5ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.6ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.5ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "\n",
      "0: 384x640 3 lps, 1.9ms\n",
      "Speed: 0.4ms preprocess, 1.9ms inference, 0.7ms postprocess per image at shape (1, 3, 384, 640)\n",
      "🎉 영상 저장 완료: /home/cuuva/다운로드/lp_infer.mp4\n"
     ]
    }
   ],
   "source": [
    "from ultralytics import YOLO\n",
    "import cv2\n",
    "\n",
    "# ----------------------------\n",
    "# 1. 모델 로드\n",
    "# ----------------------------\n",
    "model_path = \"/home/cuuva/experiment/custom_LP_detect/lp_detect/epo_200_frac_0_22/weights/best_lp_detect.pt\"\n",
    "model = YOLO(model_path)\n",
    "\n",
    "# ----------------------------\n",
    "# 2. 입력 영상\n",
    "# ----------------------------\n",
    "video_path = \"/home/cuuva/다운로드/car_lp.mov\"\n",
    "cap = cv2.VideoCapture(video_path)\n",
    "\n",
    "# ----------------------------\n",
    "# 3. 출력 영상 설정\n",
    "# ----------------------------\n",
    "output_path = \"/home/cuuva/다운로드/lp_infer.mp4\"\n",
    "fourcc = cv2.VideoWriter_fourcc(*\"mp4v\")\n",
    "fps = cap.get(cv2.CAP_PROP_FPS)\n",
    "width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))\n",
    "height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))\n",
    "out = cv2.VideoWriter(output_path, fourcc, fps, (width, height))\n",
    "\n",
    "print(f\"🎬 영상 처리 시작: {video_path}\")\n",
    "print(f\"🎯 저장 경로: {output_path}\")\n",
    "\n",
    "# ----------------------------\n",
    "# 4. 프레임 반복하며 inference\n",
    "# ----------------------------\n",
    "frame_idx = 0\n",
    "while cap.isOpened():\n",
    "    ret, frame = cap.read()\n",
    "    if not ret:\n",
    "        break\n",
    "\n",
    "    frame_idx += 1\n",
    "\n",
    "    # YOLO inference\n",
    "    results = model(frame)\n",
    "\n",
    "    # bbox, label, confidence 시각화된 프레임\n",
    "    annotated_frame = results[0].plot()\n",
    "\n",
    "    # 영상 저장\n",
    "    out.write(annotated_frame)\n",
    "\n",
    "    if frame_idx % 50 == 0:\n",
    "        print(f\"✅ 처리 프레임: {frame_idx}\")\n",
    "\n",
    "# ----------------------------\n",
    "# 5. 자원 해제\n",
    "# ----------------------------\n",
    "cap.release()\n",
    "out.release()\n",
    "print(f\"🎉 영상 저장 완료: {output_path}\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bbeff581",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "1stagedetect",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
