{ "cells": [ { "cell_type": "code", "execution_count": 10, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "rPv_jkuhaZN8", "outputId": "f452d923-7e23-4ced-d295-6000c19f0e83", "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: ultralytics in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (8.1.4)\n", "Requirement already satisfied: matplotlib>=3.3.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (3.8.2)\n", "Requirement already satisfied: numpy>=1.22.2 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (1.26.0)\n", "Requirement already satisfied: opencv-python>=4.6.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (4.8.1.78)\n", "Requirement already satisfied: pillow>=7.1.2 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (9.5.0)\n", "Requirement already satisfied: pyyaml>=5.3.1 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (6.0.1)\n", "Requirement already satisfied: requests>=2.23.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (2.31.0)\n", "Requirement already satisfied: scipy>=1.4.1 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (1.11.4)\n", "Requirement already satisfied: torch>=1.8.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (2.1.2)\n", "Requirement already satisfied: torchvision>=0.9.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (0.16.2)\n", "Requirement already satisfied: tqdm>=4.64.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (4.66.1)\n", "Requirement already satisfied: psutil in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (5.9.7)\n", "Requirement already satisfied: py-cpuinfo in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (9.0.0)\n", "Requirement already satisfied: thop>=0.1.1 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (0.1.1.post2209072238)\n", "Requirement already satisfied: pandas>=1.1.4 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (2.1.0)\n", "Requirement already satisfied: seaborn>=0.11.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from ultralytics) (0.13.1)\n", "Requirement already satisfied: contourpy>=1.0.1 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from matplotlib>=3.3.0->ultralytics) (1.2.0)\n", "Requirement already satisfied: cycler>=0.10 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from matplotlib>=3.3.0->ultralytics) (0.12.1)\n", "Requirement already satisfied: fonttools>=4.22.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from matplotlib>=3.3.0->ultralytics) (4.47.0)\n", "Requirement already satisfied: kiwisolver>=1.3.1 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from matplotlib>=3.3.0->ultralytics) (1.4.5)\n", "Requirement already satisfied: packaging>=20.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from matplotlib>=3.3.0->ultralytics) (23.1)\n", "Requirement already satisfied: pyparsing>=2.3.1 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from matplotlib>=3.3.0->ultralytics) (3.1.1)\n", "Requirement already satisfied: python-dateutil>=2.7 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from matplotlib>=3.3.0->ultralytics) (2.8.2)\n", "Requirement already satisfied: pytz>=2020.1 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from pandas>=1.1.4->ultralytics) (2023.3.post1)\n", "Requirement already satisfied: tzdata>=2022.1 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from pandas>=1.1.4->ultralytics) (2023.3)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from requests>=2.23.0->ultralytics) (3.2.0)\n", "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from requests>=2.23.0->ultralytics) (3.4)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from requests>=2.23.0->ultralytics) (1.26.16)\n", "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from requests>=2.23.0->ultralytics) (2023.7.22)\n", "Requirement already satisfied: filelock in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch>=1.8.0->ultralytics) (3.13.1)\n", "Requirement already satisfied: typing-extensions in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch>=1.8.0->ultralytics) (4.8.0)\n", "Requirement already satisfied: sympy in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch>=1.8.0->ultralytics) (1.12)\n", "Requirement already satisfied: networkx in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch>=1.8.0->ultralytics) (3.2.1)\n", "Requirement already satisfied: jinja2 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch>=1.8.0->ultralytics) (3.1.2)\n", "Requirement already satisfied: fsspec in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch>=1.8.0->ultralytics) (2023.12.2)\n", "Requirement already satisfied: colorama in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from tqdm>=4.64.0->ultralytics) (0.4.6)\n", "Requirement already satisfied: six>=1.5 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from python-dateutil>=2.7->matplotlib>=3.3.0->ultralytics) (1.16.0)\n", "Requirement already satisfied: MarkupSafe>=2.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from jinja2->torch>=1.8.0->ultralytics) (2.1.3)\n", "Requirement already satisfied: mpmath>=0.19 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from sympy->torch>=1.8.0->ultralytics) (1.3.0)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "[notice] A new release of pip is available: 23.3.2 -> 24.0\n", "[notice] To update, run: C:\\Users\\Zeus\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\python.exe -m pip install --upgrade pip\n" ] } ], "source": [ "## install the packages\n", "! pip install ultralytics" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "CDLyOpyraf2g", "outputId": "7a070817-581d-4d8d-892b-2db0695ed282", "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: torch in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (2.1.2)\n", "Requirement already satisfied: filelock in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch) (3.13.1)\n", "Requirement already satisfied: typing-extensions in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch) (4.8.0)\n", "Requirement already satisfied: sympy in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch) (1.12)\n", "Requirement already satisfied: networkx in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch) (3.2.1)\n", "Requirement already satisfied: jinja2 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch) (3.1.2)\n", "Requirement already satisfied: fsspec in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from torch) (2023.12.2)\n", "Requirement already satisfied: MarkupSafe>=2.0 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from jinja2->torch) (2.1.3)\n", "Requirement already satisfied: mpmath>=0.19 in c:\\users\\zeus\\appdata\\local\\packages\\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\\localcache\\local-packages\\python311\\site-packages (from sympy->torch) (1.3.0)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "[notice] A new release of pip is available: 23.3.2 -> 24.0\n", "[notice] To update, run: C:\\Users\\Zeus\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\python.exe -m pip install --upgrade pip\n" ] } ], "source": [ "! pip install torch" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "id": "7zwkmpyLainb", "tags": [] }, "outputs": [], "source": [ "# import packages\n", "\n", "import torch\n", "import cv2\n", "import os\n", "from tqdm.auto import tqdm\n", "import numpy as np\n", "import pandas as pd\n", "import tqdm" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 425 }, "id": "-eVvOhSmaPr1", "outputId": "6e45e02a-0109-4235-ec27-4a8a31a7e2b4", "tags": [] }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ " 0%| | 0/1 [00:00, ?it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\chest-x-ray-in-normal-pregnancy (1).jpg: 640x640 1 12, 3122.1ms\n", "Speed: 7.2ms preprocess, 3122.1ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\chest-x-ray-in-normal-pregnancy.jpg: 640x640 1 12, 4982.2ms\n", "Speed: 7.5ms preprocess, 4982.2ms inference, 2.4ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal-chest-radiograph-female-2.jpg: 576x640 (no detections), 3908.8ms\n", "Speed: 10.8ms preprocess, 3908.8ms inference, 2.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal-chest-radiograph-female-3.jpg: 640x608 (no detections), 4437.5ms\n", "Speed: 13.3ms preprocess, 4437.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal-chest-radiograph-female-5.jpg: 640x608 (no detections), 4389.1ms\n", "Speed: 12.2ms preprocess, 4389.1ms inference, 1.8ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal-chest-radiograph-large-bmi-male.jpg: 544x640 2 12s, 3862.2ms\n", "Speed: 11.4ms preprocess, 3862.2ms inference, 3.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal-chest-radiograph-large-bmi.jpg: 576x640 2 12s, 4185.1ms\n", "Speed: 12.3ms preprocess, 4185.1ms inference, 2.2ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal-chest-radiograph-male.jpg: 640x640 (no detections), 4760.4ms\n", "Speed: 15.7ms preprocess, 4760.4ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal-chest-radiograph.jpg: 640x640 (no detections), 4430.5ms\n", "Speed: 9.0ms preprocess, 4430.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal-frontal-chest-x-ray-1.jpg: 640x544 1 12, 3899.6ms\n", "Speed: 7.3ms preprocess, 3899.6ms inference, 3.0ms postprocess per image at shape (1, 3, 640, 544)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal-frontal-chest-x-ray.jpg: 640x640 (no detections), 4240.3ms\n", "Speed: 35.1ms preprocess, 4240.3ms inference, 4.1ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_240.jpg: 640x640 (no detections), 4407.5ms\n", "Speed: 8.0ms preprocess, 4407.5ms inference, 2.8ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_241.jpg: 608x640 (no detections), 4234.8ms\n", "Speed: 6.1ms preprocess, 4234.8ms inference, 2.0ms postprocess per image at shape (1, 3, 608, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_242.jpg: 608x640 (no detections), 4124.6ms\n", "Speed: 10.7ms preprocess, 4124.6ms inference, 2.8ms postprocess per image at shape (1, 3, 608, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_243.jpg: 640x608 (no detections), 4887.2ms\n", "Speed: 6.0ms preprocess, 4887.2ms inference, 1.3ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_244.jpg: 576x640 (no detections), 4015.1ms\n", "Speed: 12.0ms preprocess, 4015.1ms inference, 1.1ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_245.jpg: 640x640 (no detections), 4178.8ms\n", "Speed: 8.2ms preprocess, 4178.8ms inference, 3.2ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_246.jpg: 640x640 (no detections), 4522.2ms\n", "Speed: 8.0ms preprocess, 4522.2ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_247.jpg: 544x640 (no detections), 3494.6ms\n", "Speed: 7.5ms preprocess, 3494.6ms inference, 2.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_248.jpg: 640x608 1 12, 3787.1ms\n", "Speed: 9.0ms preprocess, 3787.1ms inference, 3.0ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_249.jpg: 640x640 (no detections), 4349.8ms\n", "Speed: 6.6ms preprocess, 4349.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_250.jpg: 608x640 (no detections), 3843.2ms\n", "Speed: 10.9ms preprocess, 3843.2ms inference, 3.2ms postprocess per image at shape (1, 3, 608, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_251.jpg: 576x640 (no detections), 3717.5ms\n", "Speed: 6.3ms preprocess, 3717.5ms inference, 1.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_252.jpg: 576x640 (no detections), 3673.0ms\n", "Speed: 10.3ms preprocess, 3673.0ms inference, 1.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_253.jpg: 576x640 (no detections), 4049.4ms\n", "Speed: 8.6ms preprocess, 4049.4ms inference, 1.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_254.jpg: 576x640 (no detections), 3817.5ms\n", "Speed: 5.5ms preprocess, 3817.5ms inference, 2.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_255.jpg: 640x640 1 12, 4454.1ms\n", "Speed: 8.3ms preprocess, 4454.1ms inference, 8.4ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_256.jpg: 576x640 (no detections), 4052.3ms\n", "Speed: 16.5ms preprocess, 4052.3ms inference, 1.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_257.jpg: 640x640 (no detections), 4455.2ms\n", "Speed: 6.2ms preprocess, 4455.2ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_258.jpg: 640x640 (no detections), 4776.6ms\n", "Speed: 8.3ms preprocess, 4776.6ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_259.jpg: 640x608 (no detections), 4285.7ms\n", "Speed: 8.1ms preprocess, 4285.7ms inference, 8.6ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_260.jpg: 640x640 (no detections), 4435.2ms\n", "Speed: 17.5ms preprocess, 4435.2ms inference, 1.3ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_261.jpg: 640x640 (no detections), 4652.2ms\n", "Speed: 7.2ms preprocess, 4652.2ms inference, 2.2ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_262.jpg: 544x640 (no detections), 3621.6ms\n", "Speed: 8.7ms preprocess, 3621.6ms inference, 1.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_263.jpg: 640x640 (no detections), 3290.7ms\n", "Speed: 9.0ms preprocess, 3290.7ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_264.jpg: 640x640 (no detections), 3600.3ms\n", "Speed: 5.2ms preprocess, 3600.3ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_265.jpg: 608x640 (no detections), 3001.3ms\n", "Speed: 5.0ms preprocess, 3001.3ms inference, 1.0ms postprocess per image at shape (1, 3, 608, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_266.jpg: 576x640 (no detections), 2601.7ms\n", "Speed: 9.0ms preprocess, 2601.7ms inference, 0.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_267.jpg: 576x640 (no detections), 2567.9ms\n", "Speed: 4.1ms preprocess, 2567.9ms inference, 1.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_268.jpg: 544x640 (no detections), 2416.0ms\n", "Speed: 8.4ms preprocess, 2416.0ms inference, 1.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_269.jpg: 640x640 (no detections), 2701.3ms\n", "Speed: 5.0ms preprocess, 2701.3ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_270.jpg: 640x608 (no detections), 2640.0ms\n", "Speed: 7.0ms preprocess, 2640.0ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_271.jpg: 640x576 (no detections), 2340.2ms\n", "Speed: 6.0ms preprocess, 2340.2ms inference, 2.4ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_272.jpg: 640x640 (no detections), 2743.8ms\n", "Speed: 5.0ms preprocess, 2743.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_273.jpg: 640x576 (no detections), 2384.5ms\n", "Speed: 6.0ms preprocess, 2384.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_274.jpg: 640x640 (no detections), 2654.5ms\n", "Speed: 4.0ms preprocess, 2654.5ms inference, 1.4ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_275.jpg: 608x640 (no detections), 2572.4ms\n", "Speed: 6.5ms preprocess, 2572.4ms inference, 1.0ms postprocess per image at shape (1, 3, 608, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_276.jpg: 640x608 (no detections), 2579.2ms\n", "Speed: 4.5ms preprocess, 2579.2ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_277.jpg: 640x640 (no detections), 2855.4ms\n", "Speed: 4.3ms preprocess, 2855.4ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_278.jpg: 576x640 (no detections), 2473.8ms\n", "Speed: 3.5ms preprocess, 2473.8ms inference, 1.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_279.jpg: 640x608 (no detections), 2617.1ms\n", "Speed: 5.7ms preprocess, 2617.1ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_280.jpg: 640x576 (no detections), 2668.2ms\n", "Speed: 7.3ms preprocess, 2668.2ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_281.jpg: 640x576 (no detections), 2513.2ms\n", "Speed: 5.0ms preprocess, 2513.2ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_282.jpg: 608x640 (no detections), 2709.1ms\n", "Speed: 3.0ms preprocess, 2709.1ms inference, 1.0ms postprocess per image at shape (1, 3, 608, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_283.jpg: 640x608 (no detections), 2524.4ms\n", "Speed: 4.0ms preprocess, 2524.4ms inference, 1.3ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_284.jpg: 640x640 1 12, 3507.4ms\n", "Speed: 6.2ms preprocess, 3507.4ms inference, 4.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_285.jpg: 640x640 (no detections), 3255.0ms\n", "Speed: 7.0ms preprocess, 3255.0ms inference, 1.5ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_286.jpg: 640x640 (no detections), 2852.1ms\n", "Speed: 6.1ms preprocess, 2852.1ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_287.jpg: 640x640 (no detections), 3035.4ms\n", "Speed: 9.7ms preprocess, 3035.4ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\normal_288.jpg: 640x640 (no detections), 2979.7ms\n", "Speed: 7.0ms preprocess, 2979.7ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax.jpg: 640x640 2 12s, 2726.2ms\n", "Speed: 9.6ms preprocess, 2726.2ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_1.jpg: 640x640 (no detections), 2585.8ms\n", "Speed: 4.0ms preprocess, 2585.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_10.jpg: 640x640 (no detections), 2687.8ms\n", "Speed: 8.9ms preprocess, 2687.8ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_11.jpg: 640x640 2 12s, 2579.5ms\n", "Speed: 9.0ms preprocess, 2579.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_12.jpg: 640x576 (no detections), 2315.9ms\n", "Speed: 8.0ms preprocess, 2315.9ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_13.jpg: 640x640 1 12, 2694.2ms\n", "Speed: 8.8ms preprocess, 2694.2ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_14.jpg: 640x576 1 12, 2380.3ms\n", "Speed: 8.0ms preprocess, 2380.3ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_15.jpg: 640x512 (no detections), 2388.5ms\n", "Speed: 9.0ms preprocess, 2388.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 512)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_16.jpg: 544x640 (no detections), 2464.6ms\n", "Speed: 6.0ms preprocess, 2464.6ms inference, 0.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_17.jpg: 640x608 1 12, 2433.5ms\n", "Speed: 6.0ms preprocess, 2433.5ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_18.jpg: 544x640 (no detections), 2350.2ms\n", "Speed: 8.6ms preprocess, 2350.2ms inference, 1.5ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_19.jpg: 640x544 2 12s, 2253.8ms\n", "Speed: 7.5ms preprocess, 2253.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 544)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_2.jpg: 640x640 5 12s, 2717.7ms\n", "Speed: 6.0ms preprocess, 2717.7ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_20.jpg: 544x640 (no detections), 2328.1ms\n", "Speed: 8.0ms preprocess, 2328.1ms inference, 1.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_21.jpg: 640x544 (no detections), 2251.9ms\n", "Speed: 6.0ms preprocess, 2251.9ms inference, 0.0ms postprocess per image at shape (1, 3, 640, 544)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_22.jpg: 544x640 (no detections), 2298.1ms\n", "Speed: 4.0ms preprocess, 2298.1ms inference, 1.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_23.jpg: 640x640 (no detections), 2646.4ms\n", "Speed: 7.0ms preprocess, 2646.4ms inference, 0.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_24.jpg: 576x640 (no detections), 2346.5ms\n", "Speed: 6.2ms preprocess, 2346.5ms inference, 0.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_25.jpg: 640x576 (no detections), 2653.4ms\n", "Speed: 5.0ms preprocess, 2653.4ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_26.jpg: 640x640 (no detections), 2516.8ms\n", "Speed: 9.0ms preprocess, 2516.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_27.jpg: 640x640 (no detections), 2601.4ms\n", "Speed: 11.3ms preprocess, 2601.4ms inference, 0.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_28.jpg: 544x640 (no detections), 2216.8ms\n", "Speed: 4.0ms preprocess, 2216.8ms inference, 0.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_29.jpg: 608x640 1 12, 2216.2ms\n", "Speed: 11.5ms preprocess, 2216.2ms inference, 1.0ms postprocess per image at shape (1, 3, 608, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_3.jpg: 640x640 5 12s, 2517.2ms\n", "Speed: 7.0ms preprocess, 2517.2ms inference, 2.2ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_30.jpg: 576x640 2 12s, 2476.1ms\n", "Speed: 5.0ms preprocess, 2476.1ms inference, 2.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_31.jpg: 608x640 1 12, 3539.7ms\n", "Speed: 9.6ms preprocess, 3539.7ms inference, 5.0ms postprocess per image at shape (1, 3, 608, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_32.jpg: 576x640 (no detections), 3733.9ms\n", "Speed: 4.7ms preprocess, 3733.9ms inference, 1.0ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_33.jpg: 640x576 2 12s, 4301.1ms\n", "Speed: 14.4ms preprocess, 4301.1ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_34.jpg: 640x608 (no detections), 3040.5ms\n", "Speed: 46.6ms preprocess, 3040.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_35.jpg: 576x640 2 12s, 3081.7ms\n", "Speed: 5.0ms preprocess, 3081.7ms inference, 1.1ms postprocess per image at shape (1, 3, 576, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_36.jpg: 640x352 1 12, 1573.1ms\n", "Speed: 2.0ms preprocess, 1573.1ms inference, 3.0ms postprocess per image at shape (1, 3, 640, 352)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_37.jpg: 640x640 (no detections), 2848.4ms\n", "Speed: 7.1ms preprocess, 2848.4ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_38.jpg: 640x640 (no detections), 2817.8ms\n", "Speed: 7.5ms preprocess, 2817.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_39.jpg: 640x608 (no detections), 2536.7ms\n", "Speed: 13.2ms preprocess, 2536.7ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_4.jpg: 640x480 (no detections), 2033.7ms\n", "Speed: 5.2ms preprocess, 2033.7ms inference, 1.5ms postprocess per image at shape (1, 3, 640, 480)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_40.jpg: 640x640 (no detections), 2666.4ms\n", "Speed: 7.4ms preprocess, 2666.4ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_41.jpg: 640x640 (no detections), 2651.1ms\n", "Speed: 7.0ms preprocess, 2651.1ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_42.jpg: 512x640 1 12, 2246.9ms\n", "Speed: 4.0ms preprocess, 2246.9ms inference, 2.0ms postprocess per image at shape (1, 3, 512, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_43.jpg: 544x640 2 12s, 2312.6ms\n", "Speed: 7.0ms preprocess, 2312.6ms inference, 2.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_44.jpg: 544x640 1 12, 2232.2ms\n", "Speed: 7.0ms preprocess, 2232.2ms inference, 1.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_45.jpg: 544x640 (no detections), 2306.5ms\n", "Speed: 9.0ms preprocess, 2306.5ms inference, 1.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_46.jpg: 640x608 (no detections), 2751.3ms\n", "Speed: 6.0ms preprocess, 2751.3ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 608)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_5.jpg: 544x640 (no detections), 2290.5ms\n", "Speed: 5.0ms preprocess, 2290.5ms inference, 1.0ms postprocess per image at shape (1, 3, 544, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_6.jpg: 640x576 3 12s, 2351.8ms\n", "Speed: 6.0ms preprocess, 2351.8ms inference, 15.7ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_7.jpg: 640x480 (no detections), 2077.6ms\n", "Speed: 8.0ms preprocess, 2077.6ms inference, 0.0ms postprocess per image at shape (1, 3, 640, 480)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_8.jpg: 640x640 2 12s, 2559.7ms\n", "Speed: 6.8ms preprocess, 2559.7ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 640)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n", "\n", "image 1/1 c:\\Users\\Zeus\\Downloads\\yolov8\\pneumothorax\\pneumothorax_9.jpg: 640x576 (no detections), 2332.8ms\n", "Speed: 5.0ms preprocess, 2332.8ms inference, 0.0ms postprocess per image at shape (1, 3, 640, 576)\n", "Results saved to \u001b[1mC:\\Users\\Zeus\\runs\\detect\\predict12\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "100%|██████████| 1/1 [06:01<00:00, 361.85s/it]\n" ] } ], "source": [ "from ultralytics import YOLO\n", "\n", "# Load a pretrained YOLOv8n model\n", "model = YOLO('best.pt')\n", "\n", "path_folders= ['pneumothorax']\n", "\n", "list_df=[]\n", "\n", "for path_folder in tqdm.tqdm(path_folders,leave=True):\n", "\n", " img_list = os.listdir(path_folder) # list of images in the directory\n", " list_path =[]\n", " image_list = []\n", " for image in img_list:\n", " list_path.append(os.path.join(path_folder, image))\n", " image_list.append(image)\n", "\n", " # list_path.remove('images\\\\.ipynb_checkpoints')\n", "\n", " # save images\n", " results=[]\n", " for image_path in list_path:\n", " results.append(model.predict(image_path, save=True, conf=0.1, batch=2))\n", " \n", "\n", " # get clases\n", " all_predictions = []\n", " for result in results:\n", " boxes = result[0].boxes\n", " boxes = boxes.cls.cpu().numpy().tolist()\n", " all_predictions.append(boxes)\n", "\n", " df = pd.DataFrame()\n", " df['image_name'] = image_list\n", " df['predictions'] = all_predictions\n", " list_df.append(df)" ] }, { "cell_type": "code", "execution_count": 27, "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", " | image_name | \n", "predictions | \n", "
---|---|---|
0 | \n", "chest-x-ray-in-normal-pregnancy (1).jpg | \n", "[0.0] | \n", "
1 | \n", "chest-x-ray-in-normal-pregnancy.jpg | \n", "[0.0] | \n", "
2 | \n", "normal-chest-radiograph-female-2.jpg | \n", "[] | \n", "
3 | \n", "normal-chest-radiograph-female-3.jpg | \n", "[] | \n", "
4 | \n", "normal-chest-radiograph-female-5.jpg | \n", "[] | \n", "
... | \n", "... | \n", "... | \n", "
95 | \n", "pneumothorax_40.jpg | \n", "[] | \n", "
96 | \n", "pneumothorax_41.jpg | \n", "[] | \n", "
97 | \n", "pneumothorax_42.jpg | \n", "[0.0] | \n", "
98 | \n", "pneumothorax_43.jpg | \n", "[0.0, 0.0] | \n", "
99 | \n", "pneumothorax_44.jpg | \n", "[0.0] | \n", "
100 rows × 2 columns
\n", "