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": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "PN1cAxdvd61e"
|
||||
},
|
||||
"source": [
|
||||
"<div align=\"center\">\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",
|
||||
"\n",
|
||||
"</div>"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "PN1cAxdvd61e"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "o68Sg1oOeZm2"
|
||||
},
|
||||
"source": [
|
||||
"# Setup\n",
|
||||
"\n",
|
||||
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware.\n",
|
||||
"\n",
|
||||
"[](https://pypi.org/project/ultralytics/) [](https://pepy.tech/project/ultralytics) [](https://pypi.org/project/ultralytics/)"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "o68Sg1oOeZm2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {
|
||||
"id": "9dSwz_uOReMI",
|
||||
"colab": {
|
||||
"base_uri": "https://localhost:8080/"
|
||||
},
|
||||
"id": "9dSwz_uOReMI",
|
||||
"outputId": "99866c77-e210-41e1-d581-8508371ce634"
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"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"
|
||||
|
|
@ -81,11 +64,15 @@
|
|||
"source": [
|
||||
"%pip install ultralytics\n",
|
||||
"import ultralytics\n",
|
||||
"\n",
|
||||
"ultralytics.checks()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "m7VkxQ2aeg7k"
|
||||
},
|
||||
"source": [
|
||||
"# Introduction to Heatmaps\n",
|
||||
"\n",
|
||||
|
|
@ -97,15 +84,18 @@
|
|||
"|:-----------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------:|\n",
|
||||
"|  |  |\n",
|
||||
"| Ultralytics YOLOv8 Transportation Heatmap | Ultralytics YOLOv8 Retail Heatmap |\n"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "m7VkxQ2aeg7k"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "Cx-u59HQdu2o"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import cv2\n",
|
||||
"\n",
|
||||
"from ultralytics import YOLO, solutions\n",
|
||||
"\n",
|
||||
"# Load YOLO model\n",
|
||||
|
|
@ -148,15 +138,13 @@
|
|||
"cap.release()\n",
|
||||
"video_writer.release()\n",
|
||||
"cv2.destroyAllWindows()"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "Cx-u59HQdu2o"
|
||||
},
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "QrlKg-y3fEyD"
|
||||
},
|
||||
"source": [
|
||||
"# Additional Resources\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",
|
||||
"\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."
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"id": "QrlKg-y3fEyD"
|
||||
"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": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
|
|
@ -56,28 +40,29 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {
|
||||
"id": "FyDnXd-n4c7Y",
|
||||
"colab": {
|
||||
"base_uri": "https://localhost:8080/"
|
||||
},
|
||||
"id": "FyDnXd-n4c7Y",
|
||||
"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": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"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"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"%pip install ultralytics # install\n",
|
||||
"from ultralytics import YOLO, checks, hub\n",
|
||||
"\n",
|
||||
"checks() # checks"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -93,21 +78,37 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "XSlZaJ9Iw_iZ"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# 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",
|
||||
"# 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",
|
||||
"# Train the model\n",
|
||||
"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": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "PN1cAxdvd61e"
|
||||
},
|
||||
"source": [
|
||||
"<div align=\"center\">\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",
|
||||
"\n",
|
||||
"</div>"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "PN1cAxdvd61e"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "o68Sg1oOeZm2"
|
||||
},
|
||||
"source": [
|
||||
"# Setup\n",
|
||||
"\n",
|
||||
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware.\n",
|
||||
"\n",
|
||||
"[](https://pypi.org/project/ultralytics/) [](https://pepy.tech/project/ultralytics) [](https://pypi.org/project/ultralytics/)"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "o68Sg1oOeZm2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {
|
||||
"id": "9dSwz_uOReMI",
|
||||
"outputId": "fd3bab88-2f25-46c0-cae9-04d2beedc0c1",
|
||||
"colab": {
|
||||
"base_uri": "https://localhost:8080/"
|
||||
}
|
||||
},
|
||||
"id": "9dSwz_uOReMI",
|
||||
"outputId": "fd3bab88-2f25-46c0-cae9-04d2beedc0c1"
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"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"
|
||||
|
|
@ -80,11 +64,15 @@
|
|||
"source": [
|
||||
"%pip install ultralytics\n",
|
||||
"import ultralytics\n",
|
||||
"\n",
|
||||
"ultralytics.checks()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "m7VkxQ2aeg7k"
|
||||
},
|
||||
"source": [
|
||||
"# Object Counting using Ultralytics YOLOv8 🚀\n",
|
||||
"\n",
|
||||
|
|
@ -104,15 +92,18 @@
|
|||
"|:-------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------:|\n",
|
||||
"|  |  |\n",
|
||||
"| Conveyor Belt Packets Counting Using Ultralytics YOLOv8 | Fish Counting in Sea using Ultralytics YOLOv8 |\n"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "m7VkxQ2aeg7k"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "Cx-u59HQdu2o"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import cv2\n",
|
||||
"\n",
|
||||
"from ultralytics import YOLO, solutions\n",
|
||||
"\n",
|
||||
"# Load the pre-trained YOLOv8 model\n",
|
||||
|
|
@ -165,15 +156,13 @@
|
|||
"\n",
|
||||
"# Close all OpenCV windows\n",
|
||||
"cv2.destroyAllWindows()"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "Cx-u59HQdu2o"
|
||||
},
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "QrlKg-y3fEyD"
|
||||
},
|
||||
"source": [
|
||||
"# Additional Resources\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",
|
||||
"\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."
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"id": "QrlKg-y3fEyD"
|
||||
"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": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "PN1cAxdvd61e"
|
||||
},
|
||||
"source": [
|
||||
"<div align=\"center\">\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",
|
||||
"\n",
|
||||
"</div>"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "PN1cAxdvd61e"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "o68Sg1oOeZm2"
|
||||
},
|
||||
"source": [
|
||||
"# Setup\n",
|
||||
"\n",
|
||||
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware.\n",
|
||||
"\n",
|
||||
"[](https://pypi.org/project/ultralytics/) [](https://pepy.tech/project/ultralytics) [](https://pypi.org/project/ultralytics/)"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "o68Sg1oOeZm2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {
|
||||
"id": "9dSwz_uOReMI",
|
||||
"colab": {
|
||||
"base_uri": "https://localhost:8080/"
|
||||
},
|
||||
"id": "9dSwz_uOReMI",
|
||||
"outputId": "ed8c2370-8fc7-4e4e-f669-d0bae4d944e9"
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"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"
|
||||
|
|
@ -80,11 +64,15 @@
|
|||
"source": [
|
||||
"%pip install ultralytics\n",
|
||||
"import ultralytics\n",
|
||||
"\n",
|
||||
"ultralytics.checks()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "m7VkxQ2aeg7k"
|
||||
},
|
||||
"source": [
|
||||
"# Ultralytics Object Tracking\n",
|
||||
"\n",
|
||||
|
|
@ -102,50 +90,53 @@
|
|||
"|:---------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n",
|
||||
"|  |  |\n",
|
||||
"| Ultralytics Instance Segmentation 😍 | Ultralytics Instance Segmentation with Object Tracking 🔥 |"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "m7VkxQ2aeg7k"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "-ZF9DM6e6gz0"
|
||||
},
|
||||
"source": [
|
||||
"## CLI\n",
|
||||
"\n",
|
||||
"Command-Line Interface (CLI) example."
|
||||
],
|
||||
"metadata": {
|
||||
"id": "-ZF9DM6e6gz0"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"!yolo track source=\"/path/to/video/file.mp4\" save=True"
|
||||
],
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "-XJqhOwo6iqT"
|
||||
},
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!yolo track source=\"/path/to/video/file.mp4\" save=True"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "XRcw0vIE6oNb"
|
||||
},
|
||||
"source": [
|
||||
"## Python\n",
|
||||
"\n",
|
||||
"Python Instance Segmentation and Object tracking example."
|
||||
],
|
||||
"metadata": {
|
||||
"id": "XRcw0vIE6oNb"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "Cx-u59HQdu2o"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from collections import defaultdict\n",
|
||||
"\n",
|
||||
"import cv2\n",
|
||||
"\n",
|
||||
"from ultralytics import YOLO\n",
|
||||
"from ultralytics.utils.plotting import Annotator, colors\n",
|
||||
"\n",
|
||||
|
|
@ -200,15 +191,13 @@
|
|||
"out.release()\n",
|
||||
"cap.release()\n",
|
||||
"cv2.destroyAllWindows()"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "Cx-u59HQdu2o"
|
||||
},
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "QrlKg-y3fEyD"
|
||||
},
|
||||
"source": [
|
||||
"# Additional Resources\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",
|
||||
"\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."
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"id": "QrlKg-y3fEyD"
|
||||
"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
|
||||
|
||||
__version__ = "8.2.77"
|
||||
__version__ = "8.2.78"
|
||||
|
||||
import os
|
||||
|
||||
|
|
|
|||
|
|
@ -381,6 +381,7 @@ class Model(nn.Module):
|
|||
"""
|
||||
self._check_is_pytorch_model()
|
||||
if isinstance(weights, (str, Path)):
|
||||
self.overrides["pretrained"] = weights # remember the weights for DDP training
|
||||
weights, self.ckpt = attempt_load_one_weight(weights)
|
||||
self.model.load(weights)
|
||||
return self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue