ultralytics 8.2.78 fix DDP training with pretrained weights (#15616)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
0635a40b98
commit
a6f4a9f2d4
6 changed files with 740 additions and 732 deletions
|
|
@ -1,24 +1,10 @@
|
||||||
{
|
{
|
||||||
"nbformat": 4,
|
|
||||||
"nbformat_minor": 0,
|
|
||||||
"metadata": {
|
|
||||||
"colab": {
|
|
||||||
"provenance": [],
|
|
||||||
"gpuType": "T4",
|
|
||||||
"toc_visible": true
|
|
||||||
},
|
|
||||||
"kernelspec": {
|
|
||||||
"name": "python3",
|
|
||||||
"display_name": "Python 3"
|
|
||||||
},
|
|
||||||
"language_info": {
|
|
||||||
"name": "python"
|
|
||||||
},
|
|
||||||
"accelerator": "GPU"
|
|
||||||
},
|
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "PN1cAxdvd61e"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"<div align=\"center\">\n",
|
"<div align=\"center\">\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -40,38 +26,35 @@
|
||||||
"We hope that the resources in this notebook will help you get the most out of YOLOv8. Please browse the YOLOv8 <a href=\"https://docs.ultralytics.com/guides/heatmaps\">Heatmap Docs</a> for details, raise an issue on <a href=\"https://github.com/ultralytics/ultralytics\">GitHub</a> for support, and join our <a href=\"https://ultralytics.com/discord\">Discord</a> community for questions and discussions!\n",
|
"We hope that the resources in this notebook will help you get the most out of YOLOv8. Please browse the YOLOv8 <a href=\"https://docs.ultralytics.com/guides/heatmaps\">Heatmap Docs</a> for details, raise an issue on <a href=\"https://github.com/ultralytics/ultralytics\">GitHub</a> for support, and join our <a href=\"https://ultralytics.com/discord\">Discord</a> community for questions and discussions!\n",
|
||||||
"\n",
|
"\n",
|
||||||
"</div>"
|
"</div>"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "PN1cAxdvd61e"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "o68Sg1oOeZm2"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Setup\n",
|
"# Setup\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware.\n",
|
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"[](https://pypi.org/project/ultralytics/) [](https://pepy.tech/project/ultralytics) [](https://pypi.org/project/ultralytics/)"
|
"[](https://pypi.org/project/ultralytics/) [](https://pepy.tech/project/ultralytics) [](https://pypi.org/project/ultralytics/)"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "o68Sg1oOeZm2"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": 1,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "9dSwz_uOReMI",
|
|
||||||
"colab": {
|
"colab": {
|
||||||
"base_uri": "https://localhost:8080/"
|
"base_uri": "https://localhost:8080/"
|
||||||
},
|
},
|
||||||
|
"id": "9dSwz_uOReMI",
|
||||||
"outputId": "99866c77-e210-41e1-d581-8508371ce634"
|
"outputId": "99866c77-e210-41e1-d581-8508371ce634"
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"output_type": "stream",
|
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Ultralytics YOLOv8.2.17 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n",
|
"Ultralytics YOLOv8.2.17 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n",
|
||||||
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 29.8/78.2 GB disk)\n"
|
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 29.8/78.2 GB disk)\n"
|
||||||
|
|
@ -81,11 +64,15 @@
|
||||||
"source": [
|
"source": [
|
||||||
"%pip install ultralytics\n",
|
"%pip install ultralytics\n",
|
||||||
"import ultralytics\n",
|
"import ultralytics\n",
|
||||||
|
"\n",
|
||||||
"ultralytics.checks()"
|
"ultralytics.checks()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "m7VkxQ2aeg7k"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Introduction to Heatmaps\n",
|
"# Introduction to Heatmaps\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -97,15 +84,18 @@
|
||||||
"|:-----------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------:|\n",
|
"|:-----------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------:|\n",
|
||||||
"|  |  |\n",
|
"|  |  |\n",
|
||||||
"| Ultralytics YOLOv8 Transportation Heatmap | Ultralytics YOLOv8 Retail Heatmap |\n"
|
"| Ultralytics YOLOv8 Transportation Heatmap | Ultralytics YOLOv8 Retail Heatmap |\n"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "m7VkxQ2aeg7k"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "Cx-u59HQdu2o"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"import cv2\n",
|
"import cv2\n",
|
||||||
|
"\n",
|
||||||
"from ultralytics import YOLO, solutions\n",
|
"from ultralytics import YOLO, solutions\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Load YOLO model\n",
|
"# Load YOLO model\n",
|
||||||
|
|
@ -148,15 +138,13 @@
|
||||||
"cap.release()\n",
|
"cap.release()\n",
|
||||||
"video_writer.release()\n",
|
"video_writer.release()\n",
|
||||||
"cv2.destroyAllWindows()"
|
"cv2.destroyAllWindows()"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "Cx-u59HQdu2o"
|
|
||||||
},
|
|
||||||
"execution_count": null,
|
|
||||||
"outputs": []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "QrlKg-y3fEyD"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Additional Resources\n",
|
"# Additional Resources\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -182,10 +170,24 @@
|
||||||
"- [Discord](https://ultralytics.com/discord): Join our Discord community to connect with other users, share your projects, and get help from the Ultralytics team.\n",
|
"- [Discord](https://ultralytics.com/discord): Join our Discord community to connect with other users, share your projects, and get help from the Ultralytics team.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"These resources are designed to help you leverage the full potential of Ultralytics' offerings and YOLOv8. Whether you're a beginner or an experienced developer, you'll find the information and support you need to succeed."
|
"These resources are designed to help you leverage the full potential of Ultralytics' offerings and YOLOv8. Whether you're a beginner or an experienced developer, you'll find the information and support you need to succeed."
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"id": "QrlKg-y3fEyD"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"accelerator": "GPU",
|
||||||
|
"colab": {
|
||||||
|
"gpuType": "T4",
|
||||||
|
"provenance": [],
|
||||||
|
"toc_visible": true
|
||||||
|
},
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"name": "python"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 0
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,4 @@
|
||||||
{
|
{
|
||||||
"nbformat": 4,
|
|
||||||
"nbformat_minor": 0,
|
|
||||||
"metadata": {
|
|
||||||
"colab": {
|
|
||||||
"name": "Ultralytics HUB",
|
|
||||||
"provenance": []
|
|
||||||
},
|
|
||||||
"kernelspec": {
|
|
||||||
"name": "python3",
|
|
||||||
"display_name": "Python 3"
|
|
||||||
},
|
|
||||||
"language_info": {
|
|
||||||
"name": "python"
|
|
||||||
},
|
|
||||||
"accelerator": "GPU"
|
|
||||||
},
|
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
|
@ -56,28 +40,29 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
|
"execution_count": 1,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "FyDnXd-n4c7Y",
|
|
||||||
"colab": {
|
"colab": {
|
||||||
"base_uri": "https://localhost:8080/"
|
"base_uri": "https://localhost:8080/"
|
||||||
},
|
},
|
||||||
|
"id": "FyDnXd-n4c7Y",
|
||||||
"outputId": "e1d713ec-e8a6-4422-fe61-c76ec9f03df5"
|
"outputId": "e1d713ec-e8a6-4422-fe61-c76ec9f03df5"
|
||||||
},
|
},
|
||||||
"source": [
|
|
||||||
"%pip install ultralytics # install\n",
|
|
||||||
"from ultralytics import YOLO, checks, hub\n",
|
|
||||||
"checks() # checks"
|
|
||||||
],
|
|
||||||
"execution_count": 1,
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"output_type": "stream",
|
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n",
|
"Ultralytics YOLOv8.2.3 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n",
|
||||||
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 28.8/78.2 GB disk)\n"
|
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 28.8/78.2 GB disk)\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"%pip install ultralytics # install\n",
|
||||||
|
"from ultralytics import YOLO, checks, hub\n",
|
||||||
|
"\n",
|
||||||
|
"checks() # checks"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -93,21 +78,37 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "XSlZaJ9Iw_iZ"
|
"id": "XSlZaJ9Iw_iZ"
|
||||||
},
|
},
|
||||||
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"# Log in to HUB using your API key (https://hub.ultralytics.com/settings?tab=api+keys)\n",
|
"# Log in to HUB using your API key (https://hub.ultralytics.com/settings?tab=api+keys)\n",
|
||||||
"hub.login('YOUR_API_KEY')\n",
|
"hub.login(\"YOUR_API_KEY\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Load your model from HUB (replace 'YOUR_MODEL_ID' with your model ID)\n",
|
"# Load your model from HUB (replace 'YOUR_MODEL_ID' with your model ID)\n",
|
||||||
"model = YOLO('https://hub.ultralytics.com/models/YOUR_MODEL_ID')\n",
|
"model = YOLO(\"https://hub.ultralytics.com/models/YOUR_MODEL_ID\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Train the model\n",
|
"# Train the model\n",
|
||||||
"results = model.train()"
|
"results = model.train()"
|
||||||
],
|
|
||||||
"execution_count": null,
|
|
||||||
"outputs": []
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"accelerator": "GPU",
|
||||||
|
"colab": {
|
||||||
|
"name": "Ultralytics HUB",
|
||||||
|
"provenance": []
|
||||||
|
},
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"name": "python"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 0
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,10 @@
|
||||||
{
|
{
|
||||||
"nbformat": 4,
|
|
||||||
"nbformat_minor": 0,
|
|
||||||
"metadata": {
|
|
||||||
"colab": {
|
|
||||||
"provenance": [],
|
|
||||||
"gpuType": "T4"
|
|
||||||
},
|
|
||||||
"kernelspec": {
|
|
||||||
"name": "python3",
|
|
||||||
"display_name": "Python 3"
|
|
||||||
},
|
|
||||||
"language_info": {
|
|
||||||
"name": "python"
|
|
||||||
},
|
|
||||||
"accelerator": "GPU"
|
|
||||||
},
|
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "PN1cAxdvd61e"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"<div align=\"center\">\n",
|
"<div align=\"center\">\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -39,38 +26,35 @@
|
||||||
"We hope that the resources in this notebook will help you get the most out of YOLOv8. Please browse the YOLOv8 <a href=\"https://docs.ultralytics.com/guides/object-counting/\"> Object Counting Docs</a> for details, raise an issue on <a href=\"https://github.com/ultralytics/ultralytics\">GitHub</a> for support, and join our <a href=\"https://ultralytics.com/discord\">Discord</a> community for questions and discussions!\n",
|
"We hope that the resources in this notebook will help you get the most out of YOLOv8. Please browse the YOLOv8 <a href=\"https://docs.ultralytics.com/guides/object-counting/\"> Object Counting Docs</a> for details, raise an issue on <a href=\"https://github.com/ultralytics/ultralytics\">GitHub</a> for support, and join our <a href=\"https://ultralytics.com/discord\">Discord</a> community for questions and discussions!\n",
|
||||||
"\n",
|
"\n",
|
||||||
"</div>"
|
"</div>"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "PN1cAxdvd61e"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "o68Sg1oOeZm2"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Setup\n",
|
"# Setup\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware.\n",
|
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"[](https://pypi.org/project/ultralytics/) [](https://pepy.tech/project/ultralytics) [](https://pypi.org/project/ultralytics/)"
|
"[](https://pypi.org/project/ultralytics/) [](https://pepy.tech/project/ultralytics) [](https://pypi.org/project/ultralytics/)"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "o68Sg1oOeZm2"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": 1,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "9dSwz_uOReMI",
|
|
||||||
"outputId": "fd3bab88-2f25-46c0-cae9-04d2beedc0c1",
|
|
||||||
"colab": {
|
"colab": {
|
||||||
"base_uri": "https://localhost:8080/"
|
"base_uri": "https://localhost:8080/"
|
||||||
}
|
},
|
||||||
|
"id": "9dSwz_uOReMI",
|
||||||
|
"outputId": "fd3bab88-2f25-46c0-cae9-04d2beedc0c1"
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"output_type": "stream",
|
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Ultralytics YOLOv8.2.18 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n",
|
"Ultralytics YOLOv8.2.18 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n",
|
||||||
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 29.8/78.2 GB disk)\n"
|
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 29.8/78.2 GB disk)\n"
|
||||||
|
|
@ -80,11 +64,15 @@
|
||||||
"source": [
|
"source": [
|
||||||
"%pip install ultralytics\n",
|
"%pip install ultralytics\n",
|
||||||
"import ultralytics\n",
|
"import ultralytics\n",
|
||||||
|
"\n",
|
||||||
"ultralytics.checks()"
|
"ultralytics.checks()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "m7VkxQ2aeg7k"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Object Counting using Ultralytics YOLOv8 🚀\n",
|
"# Object Counting using Ultralytics YOLOv8 🚀\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -104,15 +92,18 @@
|
||||||
"|:-------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|\n",
|
"|:-------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|\n",
|
||||||
"|  |  |\n",
|
"|  |  |\n",
|
||||||
"| Conveyor Belt Packets Counting Using Ultralytics YOLOv8 | Fish Counting in Sea using Ultralytics YOLOv8 |\n"
|
"| Conveyor Belt Packets Counting Using Ultralytics YOLOv8 | Fish Counting in Sea using Ultralytics YOLOv8 |\n"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "m7VkxQ2aeg7k"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "Cx-u59HQdu2o"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"import cv2\n",
|
"import cv2\n",
|
||||||
|
"\n",
|
||||||
"from ultralytics import YOLO, solutions\n",
|
"from ultralytics import YOLO, solutions\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Load the pre-trained YOLOv8 model\n",
|
"# Load the pre-trained YOLOv8 model\n",
|
||||||
|
|
@ -165,15 +156,13 @@
|
||||||
"\n",
|
"\n",
|
||||||
"# Close all OpenCV windows\n",
|
"# Close all OpenCV windows\n",
|
||||||
"cv2.destroyAllWindows()"
|
"cv2.destroyAllWindows()"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "Cx-u59HQdu2o"
|
|
||||||
},
|
|
||||||
"execution_count": null,
|
|
||||||
"outputs": []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "QrlKg-y3fEyD"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Additional Resources\n",
|
"# Additional Resources\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -199,10 +188,23 @@
|
||||||
"- [Discord](https://ultralytics.com/discord): Join our Discord community to connect with other users, share your projects, and get help from the Ultralytics team.\n",
|
"- [Discord](https://ultralytics.com/discord): Join our Discord community to connect with other users, share your projects, and get help from the Ultralytics team.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"These resources are designed to help you leverage the full potential of Ultralytics' offerings and YOLOv8. Whether you're a beginner or an experienced developer, you'll find the information and support you need to succeed."
|
"These resources are designed to help you leverage the full potential of Ultralytics' offerings and YOLOv8. Whether you're a beginner or an experienced developer, you'll find the information and support you need to succeed."
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"id": "QrlKg-y3fEyD"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"accelerator": "GPU",
|
||||||
|
"colab": {
|
||||||
|
"gpuType": "T4",
|
||||||
|
"provenance": []
|
||||||
|
},
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"name": "python"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 0
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,10 @@
|
||||||
{
|
{
|
||||||
"nbformat": 4,
|
|
||||||
"nbformat_minor": 0,
|
|
||||||
"metadata": {
|
|
||||||
"colab": {
|
|
||||||
"provenance": [],
|
|
||||||
"gpuType": "T4"
|
|
||||||
},
|
|
||||||
"kernelspec": {
|
|
||||||
"name": "python3",
|
|
||||||
"display_name": "Python 3"
|
|
||||||
},
|
|
||||||
"language_info": {
|
|
||||||
"name": "python"
|
|
||||||
},
|
|
||||||
"accelerator": "GPU"
|
|
||||||
},
|
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "PN1cAxdvd61e"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"<div align=\"center\">\n",
|
"<div align=\"center\">\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -39,38 +26,35 @@
|
||||||
"We hope that the resources in this notebook will help you get the most out of YOLOv8. Please browse the YOLOv8 <a href=\"https://docs.ultralytics.com/modes/track/\"> Tracking Docs</a> for details, raise an issue on <a href=\"https://github.com/ultralytics/ultralytics\">GitHub</a> for support, and join our <a href=\"https://ultralytics.com/discord\">Discord</a> community for questions and discussions!\n",
|
"We hope that the resources in this notebook will help you get the most out of YOLOv8. Please browse the YOLOv8 <a href=\"https://docs.ultralytics.com/modes/track/\"> Tracking Docs</a> for details, raise an issue on <a href=\"https://github.com/ultralytics/ultralytics\">GitHub</a> for support, and join our <a href=\"https://ultralytics.com/discord\">Discord</a> community for questions and discussions!\n",
|
||||||
"\n",
|
"\n",
|
||||||
"</div>"
|
"</div>"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "PN1cAxdvd61e"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "o68Sg1oOeZm2"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Setup\n",
|
"# Setup\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware.\n",
|
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"[](https://pypi.org/project/ultralytics/) [](https://pepy.tech/project/ultralytics) [](https://pypi.org/project/ultralytics/)"
|
"[](https://pypi.org/project/ultralytics/) [](https://pepy.tech/project/ultralytics) [](https://pypi.org/project/ultralytics/)"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "o68Sg1oOeZm2"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": 1,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "9dSwz_uOReMI",
|
|
||||||
"colab": {
|
"colab": {
|
||||||
"base_uri": "https://localhost:8080/"
|
"base_uri": "https://localhost:8080/"
|
||||||
},
|
},
|
||||||
|
"id": "9dSwz_uOReMI",
|
||||||
"outputId": "ed8c2370-8fc7-4e4e-f669-d0bae4d944e9"
|
"outputId": "ed8c2370-8fc7-4e4e-f669-d0bae4d944e9"
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"output_type": "stream",
|
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Ultralytics YOLOv8.2.17 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n",
|
"Ultralytics YOLOv8.2.17 🚀 Python-3.10.12 torch-2.2.1+cu121 CUDA:0 (Tesla T4, 15102MiB)\n",
|
||||||
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 29.8/78.2 GB disk)\n"
|
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 29.8/78.2 GB disk)\n"
|
||||||
|
|
@ -80,11 +64,15 @@
|
||||||
"source": [
|
"source": [
|
||||||
"%pip install ultralytics\n",
|
"%pip install ultralytics\n",
|
||||||
"import ultralytics\n",
|
"import ultralytics\n",
|
||||||
|
"\n",
|
||||||
"ultralytics.checks()"
|
"ultralytics.checks()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "m7VkxQ2aeg7k"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Ultralytics Object Tracking\n",
|
"# Ultralytics Object Tracking\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -102,50 +90,53 @@
|
||||||
"|:---------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n",
|
"|:---------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n",
|
||||||
"|  |  |\n",
|
"|  |  |\n",
|
||||||
"| Ultralytics Instance Segmentation 😍 | Ultralytics Instance Segmentation with Object Tracking 🔥 |"
|
"| Ultralytics Instance Segmentation 😍 | Ultralytics Instance Segmentation with Object Tracking 🔥 |"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "m7VkxQ2aeg7k"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "-ZF9DM6e6gz0"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"## CLI\n",
|
"## CLI\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Command-Line Interface (CLI) example."
|
"Command-Line Interface (CLI) example."
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "-ZF9DM6e6gz0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"execution_count": null,
|
||||||
"!yolo track source=\"/path/to/video/file.mp4\" save=True"
|
|
||||||
],
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "-XJqhOwo6iqT"
|
"id": "-XJqhOwo6iqT"
|
||||||
},
|
},
|
||||||
"execution_count": null,
|
"outputs": [],
|
||||||
"outputs": []
|
"source": [
|
||||||
|
"!yolo track source=\"/path/to/video/file.mp4\" save=True"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "XRcw0vIE6oNb"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"## Python\n",
|
"## Python\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Python Instance Segmentation and Object tracking example."
|
"Python Instance Segmentation and Object tracking example."
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "XRcw0vIE6oNb"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "Cx-u59HQdu2o"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from collections import defaultdict\n",
|
"from collections import defaultdict\n",
|
||||||
"\n",
|
"\n",
|
||||||
"import cv2\n",
|
"import cv2\n",
|
||||||
|
"\n",
|
||||||
"from ultralytics import YOLO\n",
|
"from ultralytics import YOLO\n",
|
||||||
"from ultralytics.utils.plotting import Annotator, colors\n",
|
"from ultralytics.utils.plotting import Annotator, colors\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -200,15 +191,13 @@
|
||||||
"out.release()\n",
|
"out.release()\n",
|
||||||
"cap.release()\n",
|
"cap.release()\n",
|
||||||
"cv2.destroyAllWindows()"
|
"cv2.destroyAllWindows()"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"id": "Cx-u59HQdu2o"
|
|
||||||
},
|
|
||||||
"execution_count": null,
|
|
||||||
"outputs": []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "QrlKg-y3fEyD"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"# Additional Resources\n",
|
"# Additional Resources\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
@ -234,10 +223,23 @@
|
||||||
"- [Discord](https://ultralytics.com/discord): Join our Discord community to connect with other users, share your projects, and get help from the Ultralytics team.\n",
|
"- [Discord](https://ultralytics.com/discord): Join our Discord community to connect with other users, share your projects, and get help from the Ultralytics team.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"These resources are designed to help you leverage the full potential of Ultralytics' offerings and YOLOv8. Whether you're a beginner or an experienced developer, you'll find the information and support you need to succeed."
|
"These resources are designed to help you leverage the full potential of Ultralytics' offerings and YOLOv8. Whether you're a beginner or an experienced developer, you'll find the information and support you need to succeed."
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"id": "QrlKg-y3fEyD"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"accelerator": "GPU",
|
||||||
|
"colab": {
|
||||||
|
"gpuType": "T4",
|
||||||
|
"provenance": []
|
||||||
|
},
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"name": "python"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 0
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
|
||||||
__version__ = "8.2.77"
|
__version__ = "8.2.78"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -381,6 +381,7 @@ class Model(nn.Module):
|
||||||
"""
|
"""
|
||||||
self._check_is_pytorch_model()
|
self._check_is_pytorch_model()
|
||||||
if isinstance(weights, (str, Path)):
|
if isinstance(weights, (str, Path)):
|
||||||
|
self.overrides["pretrained"] = weights # remember the weights for DDP training
|
||||||
weights, self.ckpt = attempt_load_one_weight(weights)
|
weights, self.ckpt = attempt_load_one_weight(weights)
|
||||||
self.model.load(weights)
|
self.model.load(weights)
|
||||||
return self
|
return self
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue