{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"gpuType":"T4","authorship_tag":"ABX9TyPQfiHFvygmi4YhaTex1pVc"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"},"accelerator":"GPU"},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"y_KEsdtExrBP","executionInfo":{"status":"ok","timestamp":1724878653047,"user_tz":-60,"elapsed":5157,"user":{"displayName":"Mail Cloud","userId":"01708480096028966588"}},"outputId":"26f9e300-5823-4e83-b950-c9601d8aaacd"},"outputs":[{"output_type":"stream","name":"stdout","text":["Collecting ultralytics\n"," Downloading ultralytics-8.2.82-py3-none-any.whl.metadata (41 kB)\n","\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/41.3 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.3/41.3 kB\u001b[0m \u001b[31m2.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: numpy<2.0.0,>=1.23.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (1.26.4)\n","Requirement already satisfied: matplotlib>=3.3.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (3.7.1)\n","Requirement already satisfied: opencv-python>=4.6.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (4.10.0.84)\n","Requirement already satisfied: pillow>=7.1.2 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (9.4.0)\n","Requirement already satisfied: pyyaml>=5.3.1 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (6.0.2)\n","Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (2.32.3)\n","Requirement already satisfied: scipy>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (1.13.1)\n","Requirement already satisfied: torch>=1.8.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (2.4.0+cu121)\n","Requirement already satisfied: torchvision>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (0.19.0+cu121)\n","Requirement already satisfied: tqdm>=4.64.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (4.66.5)\n","Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from ultralytics) (5.9.5)\n","Requirement already satisfied: py-cpuinfo in /usr/local/lib/python3.10/dist-packages (from ultralytics) (9.0.0)\n","Requirement already satisfied: pandas>=1.1.4 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (2.1.4)\n","Requirement already satisfied: seaborn>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics) (0.13.1)\n","Collecting ultralytics-thop>=2.0.0 (from ultralytics)\n"," Downloading ultralytics_thop-2.0.5-py3-none-any.whl.metadata (8.9 kB)\n","Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (1.2.1)\n","Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (0.12.1)\n","Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (4.53.1)\n","Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (1.4.5)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (24.1)\n","Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (3.1.4)\n","Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics) (2.8.2)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.1.4->ultralytics) (2024.1)\n","Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.1.4->ultralytics) (2024.1)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics) (3.8)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics) (2024.7.4)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (3.15.4)\n","Requirement already satisfied: typing-extensions>=4.8.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (4.12.2)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (1.13.2)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (3.3)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (3.1.4)\n","Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics) (2024.6.1)\n","Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib>=3.3.0->ultralytics) (1.16.0)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.8.0->ultralytics) (2.1.5)\n","Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.8.0->ultralytics) (1.3.0)\n","Downloading ultralytics-8.2.82-py3-none-any.whl (871 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m871.1/871.1 kB\u001b[0m \u001b[31m24.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading ultralytics_thop-2.0.5-py3-none-any.whl (25 kB)\n","Installing collected packages: ultralytics-thop, ultralytics\n","Successfully installed ultralytics-8.2.82 ultralytics-thop-2.0.5\n"]}],"source":["!pip install ultralytics"]},{"cell_type":"code","source":["# !pip install Ipython\n","from ultralytics import YOLO\n","import os\n","\n","# !yolo mode=checks"],"metadata":{"id":"79mnoqsux26z"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["!pip install ultralytics==8.0.196"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"Eb6mw9gvx8qs","executionInfo":{"status":"ok","timestamp":1725083767003,"user_tz":-60,"elapsed":4632,"user":{"displayName":"Mail Cloud","userId":"01708480096028966588"}},"outputId":"d4e81eef-782c-437b-9fa9-80649bc53cbb"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Collecting ultralytics==8.0.196\n"," Downloading ultralytics-8.0.196-py3-none-any.whl.metadata (31 kB)\n","Requirement already satisfied: matplotlib>=3.3.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (3.7.1)\n","Requirement already satisfied: numpy>=1.22.2 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (1.26.4)\n","Requirement already satisfied: opencv-python>=4.6.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (4.10.0.84)\n","Requirement already satisfied: pillow>=7.1.2 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (9.4.0)\n","Requirement already satisfied: pyyaml>=5.3.1 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (6.0.2)\n","Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (2.32.3)\n","Requirement already satisfied: scipy>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (1.13.1)\n","Requirement already satisfied: torch>=1.8.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (2.4.0+cu121)\n","Requirement already satisfied: torchvision>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (0.19.0+cu121)\n","Requirement already satisfied: tqdm>=4.64.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (4.66.5)\n","Requirement already satisfied: pandas>=1.1.4 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (2.1.4)\n","Requirement already satisfied: seaborn>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (0.13.1)\n","Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (5.9.5)\n","Requirement already satisfied: py-cpuinfo in /usr/local/lib/python3.10/dist-packages (from ultralytics==8.0.196) (9.0.0)\n","Collecting thop>=0.1.1 (from ultralytics==8.0.196)\n"," Downloading thop-0.1.1.post2209072238-py3-none-any.whl.metadata (2.7 kB)\n","Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics==8.0.196) (1.2.1)\n","Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics==8.0.196) (0.12.1)\n","Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics==8.0.196) (4.53.1)\n","Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics==8.0.196) (1.4.5)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics==8.0.196) (24.1)\n","Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics==8.0.196) (3.1.4)\n","Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.0->ultralytics==8.0.196) (2.8.2)\n","Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.1.4->ultralytics==8.0.196) (2024.1)\n","Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.1.4->ultralytics==8.0.196) (2024.1)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics==8.0.196) (3.3.2)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics==8.0.196) (3.8)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics==8.0.196) (2.0.7)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->ultralytics==8.0.196) (2024.7.4)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics==8.0.196) (3.15.4)\n","Requirement already satisfied: typing-extensions>=4.8.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics==8.0.196) (4.12.2)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics==8.0.196) (1.13.2)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics==8.0.196) (3.3)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics==8.0.196) (3.1.4)\n","Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch>=1.8.0->ultralytics==8.0.196) (2024.6.1)\n","Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib>=3.3.0->ultralytics==8.0.196) (1.16.0)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.8.0->ultralytics==8.0.196) (2.1.5)\n","Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.8.0->ultralytics==8.0.196) (1.3.0)\n","Downloading ultralytics-8.0.196-py3-none-any.whl (631 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m631.1/631.1 kB\u001b[0m \u001b[31m29.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading thop-0.1.1.post2209072238-py3-none-any.whl (15 kB)\n","Installing collected packages: thop, ultralytics\n","Successfully installed thop-0.1.1.post2209072238 ultralytics-8.0.196\n"]}]},{"cell_type":"code","source":["!pip install roboflow\n","\n","from roboflow import Roboflow\n","rf = Roboflow(api_key=\"fkktVhcIZvphzBoKst4e\")\n","project = rf.workspace(\"human-v2\").project(\"human-dataset-v2\")\n","version = project.version(6)\n","dataset = version.download(\"yolov8\")"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"EJxMxozoyB1R","executionInfo":{"status":"ok","timestamp":1725083830686,"user_tz":-60,"elapsed":28002,"user":{"displayName":"Mail Cloud","userId":"01708480096028966588"}},"outputId":"eda88b57-eb0d-4266-8485-9e539eae0c9d"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Collecting roboflow\n"," Downloading roboflow-1.1.44-py3-none-any.whl.metadata (9.7 kB)\n","Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from roboflow) (2024.7.4)\n","Collecting idna==3.7 (from roboflow)\n"," Downloading idna-3.7-py3-none-any.whl.metadata (9.9 kB)\n","Requirement already satisfied: cycler in /usr/local/lib/python3.10/dist-packages (from roboflow) (0.12.1)\n","Requirement already satisfied: kiwisolver>=1.3.1 in /usr/local/lib/python3.10/dist-packages (from roboflow) (1.4.5)\n","Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from roboflow) (3.7.1)\n","Requirement already satisfied: numpy>=1.18.5 in /usr/local/lib/python3.10/dist-packages (from roboflow) (1.26.4)\n","Requirement already satisfied: opencv-python-headless==4.10.0.84 in /usr/local/lib/python3.10/dist-packages (from roboflow) (4.10.0.84)\n","Requirement already satisfied: Pillow>=7.1.2 in /usr/local/lib/python3.10/dist-packages (from roboflow) (9.4.0)\n","Requirement already satisfied: python-dateutil in /usr/local/lib/python3.10/dist-packages (from roboflow) (2.8.2)\n","Collecting python-dotenv (from roboflow)\n"," Downloading python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from roboflow) (2.32.3)\n","Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from roboflow) (1.16.0)\n","Requirement already satisfied: urllib3>=1.26.6 in /usr/local/lib/python3.10/dist-packages (from roboflow) (2.0.7)\n","Requirement already satisfied: tqdm>=4.41.0 in /usr/local/lib/python3.10/dist-packages (from roboflow) (4.66.5)\n","Requirement already satisfied: PyYAML>=5.3.1 in /usr/local/lib/python3.10/dist-packages (from roboflow) (6.0.2)\n","Collecting requests-toolbelt (from roboflow)\n"," Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl.metadata (14 kB)\n","Collecting filetype (from roboflow)\n"," Downloading filetype-1.2.0-py2.py3-none-any.whl.metadata (6.5 kB)\n","Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->roboflow) (1.2.1)\n","Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->roboflow) (4.53.1)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->roboflow) (24.1)\n","Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->roboflow) (3.1.4)\n","Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->roboflow) (3.3.2)\n","Downloading roboflow-1.1.44-py3-none-any.whl (79 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.9/79.9 kB\u001b[0m \u001b[31m7.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading idna-3.7-py3-none-any.whl (66 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m66.8/66.8 kB\u001b[0m \u001b[31m6.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hDownloading filetype-1.2.0-py2.py3-none-any.whl (19 kB)\n","Downloading python_dotenv-1.0.1-py3-none-any.whl (19 kB)\n","Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.5/54.5 kB\u001b[0m \u001b[31m5.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hInstalling collected packages: filetype, python-dotenv, idna, requests-toolbelt, roboflow\n"," Attempting uninstall: idna\n"," Found existing installation: idna 3.8\n"," Uninstalling idna-3.8:\n"," Successfully uninstalled idna-3.8\n","Successfully installed filetype-1.2.0 idna-3.7 python-dotenv-1.0.1 requests-toolbelt-1.0.0 roboflow-1.1.44\n","loading Roboflow workspace...\n","loading Roboflow project...\n"]},{"output_type":"stream","name":"stderr","text":["Downloading Dataset Version Zip in Human-Dataset-v2-6 to yolov8:: 100%|██████████| 404291/404291 [00:16<00:00, 24432.74it/s]"]},{"output_type":"stream","name":"stdout","text":["\n"]},{"output_type":"stream","name":"stderr","text":["\n","Extracting Dataset Version Zip to Human-Dataset-v2-6 in yolov8:: 100%|██████████| 27316/27316 [00:03<00:00, 7581.42it/s]\n"]}]},{"cell_type":"code","source":["!yolo train model=yolov8s.pt data={dataset.location}/data.yaml epochs=20 imgsz=640"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"5UtAZ1FLyT02","outputId":"50c030b1-a5d1-4689-9b84-99a7ac9c74c8"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Downloading https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s.pt to 'yolov8s.pt'...\n","100% 21.5M/21.5M [00:00<00:00, 332MB/s]\n","/usr/local/lib/python3.10/dist-packages/ultralytics/nn/tasks.py:567: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\n"," return torch.load(file, map_location='cpu'), file # load\n","New https://pypi.org/project/ultralytics/8.2.84 available 😃 Update with 'pip install -U ultralytics'\n","Ultralytics YOLOv8.0.196 🚀 Python-3.10.12 torch-2.4.0+cu121 CUDA:0 (Tesla T4, 15102MiB)\n","\u001b[34m\u001b[1mengine/trainer: \u001b[0mtask=detect, mode=train, model=yolov8s.pt, data=/content/Human-Dataset-v2-6/data.yaml, epochs=20, patience=50, batch=16, imgsz=640, save=True, save_period=-1, cache=False, device=None, workers=8, project=None, name=None, exist_ok=False, pretrained=True, optimizer=auto, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, amp=True, fraction=1.0, profile=False, freeze=None, overlap_mask=True, mask_ratio=4, dropout=0.0, val=True, split=val, save_json=False, save_hybrid=False, conf=None, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=None, show=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, vid_stride=1, stream_buffer=False, line_width=None, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, boxes=True, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=False, opset=None, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, cfg=None, tracker=botsort.yaml, save_dir=runs/detect/train\n","Downloading https://ultralytics.com/assets/Arial.ttf to '/root/.config/Ultralytics/Arial.ttf'...\n","100% 755k/755k [00:00<00:00, 38.8MB/s]\n","2024-08-31 05:57:49.267451: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n","2024-08-31 05:57:49.285197: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n","2024-08-31 05:57:49.291097: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n","Overriding model.yaml nc=80 with nc=2\n","\n"," from n params module arguments \n"," 0 -1 1 928 ultralytics.nn.modules.conv.Conv [3, 32, 3, 2] \n"," 1 -1 1 18560 ultralytics.nn.modules.conv.Conv [32, 64, 3, 2] \n"," 2 -1 1 29056 ultralytics.nn.modules.block.C2f [64, 64, 1, True] \n"," 3 -1 1 73984 ultralytics.nn.modules.conv.Conv [64, 128, 3, 2] \n"," 4 -1 2 197632 ultralytics.nn.modules.block.C2f [128, 128, 2, True] \n"," 5 -1 1 295424 ultralytics.nn.modules.conv.Conv [128, 256, 3, 2] \n"," 6 -1 2 788480 ultralytics.nn.modules.block.C2f [256, 256, 2, True] \n"," 7 -1 1 1180672 ultralytics.nn.modules.conv.Conv [256, 512, 3, 2] \n"," 8 -1 1 1838080 ultralytics.nn.modules.block.C2f [512, 512, 1, True] \n"," 9 -1 1 656896 ultralytics.nn.modules.block.SPPF [512, 512, 5] \n"," 10 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n"," 11 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] \n"," 12 -1 1 591360 ultralytics.nn.modules.block.C2f [768, 256, 1] \n"," 13 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n"," 14 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] \n"," 15 -1 1 148224 ultralytics.nn.modules.block.C2f [384, 128, 1] \n"," 16 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] \n"," 17 [-1, 12] 1 0 ultralytics.nn.modules.conv.Concat [1] \n"," 18 -1 1 493056 ultralytics.nn.modules.block.C2f [384, 256, 1] \n"," 19 -1 1 590336 ultralytics.nn.modules.conv.Conv [256, 256, 3, 2] \n"," 20 [-1, 9] 1 0 ultralytics.nn.modules.conv.Concat [1] \n"," 21 -1 1 1969152 ultralytics.nn.modules.block.C2f [768, 512, 1] \n"," 22 [15, 18, 21] 1 2116822 ultralytics.nn.modules.head.Detect [2, [128, 256, 512]] \n","Model summary: 225 layers, 11136374 parameters, 11136358 gradients, 28.6 GFLOPs\n","\n","Transferred 349/355 items from pretrained weights\n","\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/detect/train', view at http://localhost:6006/\n","Freezing layer 'model.22.dfl.conv.weight'\n","\u001b[34m\u001b[1mAMP: \u001b[0mrunning Automatic Mixed Precision (AMP) checks with YOLOv8n...\n","Downloading https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt to 'yolov8n.pt'...\n","100% 6.23M/6.23M [00:00<00:00, 174MB/s]\n","/usr/local/lib/python3.10/dist-packages/ultralytics/nn/tasks.py:567: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\n"," return torch.load(file, map_location='cpu'), file # load\n","WARNING ⚠️ NMS time limit 0.550s exceeded\n","/usr/local/lib/python3.10/dist-packages/ultralytics/utils/checks.py:558: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.\n"," with torch.cuda.amp.autocast(True):\n","\u001b[34m\u001b[1mAMP: \u001b[0mchecks passed ✅\n","/usr/local/lib/python3.10/dist-packages/ultralytics/engine/trainer.py:238: FutureWarning: `torch.cuda.amp.GradScaler(args...)` is deprecated. Please use `torch.amp.GradScaler('cuda', args...)` instead.\n"," self.scaler = amp.GradScaler(enabled=self.amp)\n","\u001b[34m\u001b[1mtrain: \u001b[0mScanning /content/Human-Dataset-v2-6/train/labels... 10933 images, 20 backgrounds, 0 corrupt: 100% 10933/10933 [00:05<00:00, 1900.92it/s]\n","\u001b[34m\u001b[1mtrain: \u001b[0mNew cache created: /content/Human-Dataset-v2-6/train/labels.cache\n","WARNING ⚠️ Box and segment counts should be equal, but got len(segments) = 18, len(boxes) = 35514. To resolve this only boxes will be used and all segments will be removed. To avoid this please supply either a detect or segment dataset, not a detect-segment mixed dataset.\n","/usr/local/lib/python3.10/dist-packages/albumentations/core/composition.py:161: UserWarning: Got processor for bboxes, but no transform to process it.\n"," self._set_keys()\n","\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n","/usr/lib/python3.10/multiprocessing/popen_fork.py:66: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock.\n"," self.pid = os.fork()\n","\u001b[34m\u001b[1mval: \u001b[0mScanning /content/Human-Dataset-v2-6/valid/labels... 1570 images, 5 backgrounds, 0 corrupt: 100% 1570/1570 [00:02<00:00, 733.34it/s] \n","\u001b[34m\u001b[1mval: \u001b[0mNew cache created: /content/Human-Dataset-v2-6/valid/labels.cache\n","WARNING ⚠️ Box and segment counts should be equal, but got len(segments) = 4, len(boxes) = 5440. To resolve this only boxes will be used and all segments will be removed. To avoid this please supply either a detect or segment dataset, not a detect-segment mixed dataset.\n","Plotting labels to runs/detect/train/labels.jpg... \n","\u001b[34m\u001b[1moptimizer:\u001b[0m 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically... \n","\u001b[34m\u001b[1moptimizer:\u001b[0m AdamW(lr=0.001667, momentum=0.9) with parameter groups 57 weight(decay=0.0), 64 weight(decay=0.0005), 63 bias(decay=0.0)\n","Image sizes 640 train, 640 val\n","Using 2 dataloader workers\n","Logging results to \u001b[1mruns/detect/train\u001b[0m\n","Starting training for 20 epochs...\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 1/20 4.13G 1.602 1.556 1.517 21 640: 100% 684/684 [04:25<00:00, 2.57it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:21<00:00, 2.32it/s]\n"," all 1570 5440 0.334 0.273 0.234 0.1\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 2/20 4.53G 1.699 1.628 1.606 26 640: 100% 684/684 [04:15<00:00, 2.67it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:20<00:00, 2.39it/s]\n"," all 1570 5440 0.784 0.217 0.227 0.105\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 3/20 4.1G 1.67 1.616 1.59 34 640: 100% 684/684 [04:13<00:00, 2.70it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.58it/s]\n"," all 1570 5440 0.807 0.233 0.262 0.134\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 4/20 4.25G 1.627 1.537 1.562 29 640: 100% 684/684 [04:13<00:00, 2.69it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.62it/s]\n"," all 1570 5440 0.816 0.236 0.277 0.142\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 5/20 4.43G 1.582 1.468 1.53 40 640: 100% 684/684 [04:16<00:00, 2.67it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.58it/s]\n"," all 1570 5440 0.814 0.255 0.277 0.146\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 6/20 4.79G 1.546 1.407 1.499 17 640: 100% 684/684 [04:09<00:00, 2.74it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:21<00:00, 2.33it/s]\n"," all 1570 5440 0.836 0.254 0.293 0.16\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 7/20 4.39G 1.505 1.352 1.478 29 640: 100% 684/684 [04:08<00:00, 2.75it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.60it/s]\n"," all 1570 5440 0.828 0.278 0.331 0.18\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 8/20 4.5G 1.484 1.32 1.464 35 640: 100% 684/684 [04:10<00:00, 2.74it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.52it/s]\n"," all 1570 5440 0.847 0.278 0.313 0.17\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 9/20 4.36G 1.467 1.278 1.447 27 640: 100% 684/684 [04:17<00:00, 2.66it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.63it/s]\n"," all 1570 5440 0.561 0.333 0.343 0.191\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 10/20 4.6G 1.444 1.232 1.426 29 640: 100% 684/684 [04:13<00:00, 2.70it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.62it/s]\n"," all 1570 5440 0.847 0.289 0.352 0.2\n","Closing dataloader mosaic\n","/usr/local/lib/python3.10/dist-packages/albumentations/core/composition.py:161: UserWarning: Got processor for bboxes, but no transform to process it.\n"," self._set_keys()\n","\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n","/usr/lib/python3.10/multiprocessing/popen_fork.py:66: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock.\n"," self.pid = os.fork()\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 11/20 4.45G 1.427 1.146 1.438 17 640: 100% 684/684 [04:02<00:00, 2.82it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.58it/s]\n"," all 1570 5440 0.323 0.375 0.34 0.195\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 12/20 4.17G 1.411 1.099 1.425 19 640: 100% 684/684 [03:54<00:00, 2.92it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.60it/s]\n"," all 1570 5440 0.848 0.298 0.343 0.199\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 13/20 4.6G 1.379 1.061 1.406 23 640: 100% 684/684 [03:59<00:00, 2.86it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.55it/s]\n"," all 1570 5440 0.852 0.296 0.345 0.199\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 14/20 4.35G 1.359 1.043 1.39 19 640: 100% 684/684 [03:57<00:00, 2.88it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:18<00:00, 2.66it/s]\n"," all 1570 5440 0.794 0.325 0.37 0.218\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 15/20 4.2G 1.332 0.9913 1.366 12 640: 100% 684/684 [03:54<00:00, 2.91it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.63it/s]\n"," all 1570 5440 0.454 0.372 0.416 0.247\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 16/20 4.34G 1.304 0.9675 1.353 13 640: 100% 684/684 [04:01<00:00, 2.83it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:19<00:00, 2.51it/s]\n"," all 1570 5440 0.754 0.382 0.435 0.269\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 17/20 4.6G 1.285 0.9289 1.337 8 640: 100% 684/684 [04:12<00:00, 2.71it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 100% 50/50 [00:20<00:00, 2.40it/s]\n"," all 1570 5440 0.774 0.343 0.403 0.247\n","\n"," Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n"," 18/20 4.55G 1.258 0.8995 1.317 8 640: 100% 684/684 [04:10<00:00, 2.74it/s]\n"," Class Images Instances Box(P R mAP50 mAP50-95): 22% 11/50 [00:06<00:22, 1.77it/s]"]}]},{"cell_type":"code","source":[],"metadata":{"id":"DuUmudlTzRXq"},"execution_count":null,"outputs":[]}]}