diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 39471cf6..bb7bd983 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -34,7 +34,9 @@ jobs: retry_wait_seconds: 60 max_attempts: 3 command: | - lychee --accept 403,429,500,502,999 \ + lychee \ + --scheme https \ + --accept 403,429,500,502,999 \ --exclude-loopback \ --exclude 'https?://(www\.)?(linkedin\.com|twitter\.com|instagram\.com|kaggle\.com|fonts\.gstatic\.com|url\.com)' \ --exclude-path docs/zh \ @@ -48,7 +50,8 @@ jobs: --exclude-path docs/hi \ --exclude-path docs/ar \ --github-token ${{ secrets.GITHUB_TOKEN }} \ - './**/*.md' './**/*.html' + './**/*.md' \ + './**/*.html' - name: Test Markdown, HTML, YAML, Python and Notebook links with retry if: github.event_name == 'workflow_dispatch' @@ -58,7 +61,9 @@ jobs: retry_wait_seconds: 60 max_attempts: 3 command: | - lychee --accept 429,999 \ + lychee \ + --scheme https \ + --accept 429,999 \ --exclude-loopback \ --exclude 'https?://(www\.)?(linkedin\.com|twitter\.com|instagram\.com|kaggle\.com|fonts\.gstatic\.com|url\.com)' \ --exclude-path '**/ci.yaml' \ @@ -73,4 +78,9 @@ jobs: --exclude-path docs/hi \ --exclude-path docs/ar \ --github-token ${{ secrets.GITHUB_TOKEN }} \ - './**/*.md' './**/*.html' './**/*.yml' './**/*.yaml' './**/*.py' './**/*.ipynb' + './**/*.md' \ + './**/*.html' \ + './**/*.yml' \ + './**/*.yaml' \ + './**/*.py' \ + './**/*.ipynb' diff --git a/README.md b/README.md index e20897ee..798f2489 100644 --- a/README.md +++ b/README.md @@ -102,14 +102,14 @@ See YOLOv8 [Python Docs](https://docs.ultralytics.com/usage/python) for more exa Ultralytics provides interactive notebooks for YOLOv8, covering training, validation, tracking, and more. Each notebook is paired with a [YouTube](https://youtube.com/ultralytics) tutorial, making it easy to learn and implement advanced YOLOv8 features. -| Docs | Notebook | YouTube | -| --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| YOLOv8 Train, Val, Predict and Export Modes | Open In Colab |
Ultralytics Youtube Video
| -| Ultralytics HUB QuickStart | Open In Colab |
Ultralytics Youtube Video
| -| YOLOv8 Multi-Object Tracking in Videos | Open In Colab |
Ultralytics Youtube Video
| -| YOLOv8 Object Counting in Videos | Open In Colab |
Ultralytics Youtube Video
| -| YOLOv8 Heatmaps in Videos | Open In Colab |
Ultralytics Youtube Video
| -| Ultralytics Datasets Explorer with SQL and OpenAI Integration | Open In Colab | Coming Soon | +| Docs | Notebook | YouTube | +| --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| YOLOv8 Train, Val, Predict and Export Modes | Open In Colab |
Ultralytics Youtube Video
| +| Ultralytics HUB QuickStart | Open In Colab |
Ultralytics Youtube Video
| +| YOLOv8 Multi-Object Tracking in Videos | Open In Colab |
Ultralytics Youtube Video
| +| YOLOv8 Object Counting in Videos | Open In Colab |
Ultralytics Youtube Video
| +| YOLOv8 Heatmaps in Videos | Open In Colab |
Ultralytics Youtube Video
| +| Ultralytics Datasets Explorer with SQL and OpenAI Integration 🚀 New | Open In Colab | Coming Soon | ##
Models
diff --git a/README.zh-CN.md b/README.zh-CN.md index 36a65517..3fb95ba8 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -104,14 +104,14 @@ success = model.export(format="onnx") # 将模型导出为 ONNX 格式 Ultralytics 提供了 YOLOv8 的交互式笔记本,涵盖训练、验证、跟踪等内容。每个笔记本都配有 [YouTube](https://youtube.com/ultralytics) 教程,使学习和实现高级 YOLOv8 功能变得简单。 -| 文档 | 笔记本 | YouTube | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| YOLOv8 训练、验证、预测和导出模式 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| Ultralytics HUB 快速开始 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| YOLOv8 视频中的多对象跟踪 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| YOLOv8 视频中的对象计数 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| YOLOv8 视频中的热图 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| -| Ultralytics 数据集浏览器,集成 SQL 和 OpenAI | 在 Colab 中打开 | 即将推出 | +| 文档 | 笔记本 | YouTube | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| YOLOv8 训练、验证、预测和导出模式 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| +| Ultralytics HUB 快速开始 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| +| YOLOv8 视频中的多对象跟踪 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| +| YOLOv8 视频中的对象计数 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| +| YOLOv8 视频中的热图 | 在 Colab 中打开 |
Ultralytics Youtube 视频
| +| Ultralytics 数据集浏览器,集成 SQL 和 OpenAI 🚀 New | 在 Colab 中打开 | 即将推出 | ##
模型
diff --git a/docs/en/tasks/obb.md b/docs/en/tasks/obb.md index 17329ec3..6d56a255 100644 --- a/docs/en/tasks/obb.md +++ b/docs/en/tasks/obb.md @@ -42,7 +42,7 @@ YOLOv8 pretrained OBB models are shown here, which are pretrained on the [DOTAv1 ## Train -Train YOLOv8n-obb on the dota8.yaml dataset for 100 epochs at image size 640. For a full list of available arguments see the [Configuration](../usage/cfg.md) page. +Train YOLOv8n-obb on the `dota8.yaml` dataset for 100 epochs at image size 640. For a full list of available arguments see the [Configuration](../usage/cfg.md) page. !!! Example @@ -57,19 +57,19 @@ Train YOLOv8n-obb on the dota8.yaml dataset for 100 epochs at image size 640. Fo model = YOLO('yolov8n-obb.yaml').load('yolov8n.pt') # build from YAML and transfer weights # Train the model - results = model.train(data='dota8-obb.yaml', epochs=100, imgsz=640) + results = model.train(data='dota8.yaml', epochs=100, imgsz=640) ``` === "CLI" ```bash # Build a new model from YAML and start training from scratch - yolo obb train data=dota8-obb.yaml model=yolov8n-obb.yaml epochs=100 imgsz=640 + yolo obb train data=dota8.yaml model=yolov8n-obb.yaml epochs=100 imgsz=640 # Start training from a pretrained *.pt model - yolo obb train data=dota8-obb.yaml model=yolov8n-obb.pt epochs=100 imgsz=640 + yolo obb train data=dota8.yaml model=yolov8n-obb.pt epochs=100 imgsz=640 # Build a new model from YAML, transfer pretrained weights to it and start training - yolo obb train data=dota8-obb.yaml model=yolov8n-obb.yaml pretrained=yolov8n-obb.pt epochs=100 imgsz=640 + yolo obb train data=dota8.yaml model=yolov8n-obb.yaml pretrained=yolov8n-obb.pt epochs=100 imgsz=640 ``` ### Dataset format @@ -78,7 +78,7 @@ OBB dataset format can be found in detail in the [Dataset Guide](../datasets/obb ## Val -Validate trained YOLOv8n-obb model accuracy on the dota8-obb dataset. No argument need to passed as the `model` +Validate trained YOLOv8n-obb model accuracy on the DOTA8 dataset. No argument need to passed as the `model` retains it's training `data` and arguments as model attributes. !!! Example @@ -93,7 +93,7 @@ retains it's training `data` and arguments as model attributes. model = YOLO('path/to/best.pt') # load a custom model # Validate the model - metrics = model.val() # no arguments needed, dataset and settings remembered + metrics = model.val(data='dota8.yaml') # no arguments needed, dataset and settings remembered metrics.box.map # map50-95(B) metrics.box.map50 # map50(B) metrics.box.map75 # map75(B) @@ -102,8 +102,8 @@ retains it's training `data` and arguments as model attributes. === "CLI" ```bash - yolo obb val model=yolov8n-obb.pt # val official model - yolo obb val model=path/to/best.pt # val custom model + yolo obb val model=yolov8n-obb.pt data=dota8.yaml # val official model + yolo obb val model=path/to/best.pt data=path/to/data.yaml # val custom model ``` ## Predict diff --git a/examples/heatmaps.ipynb b/examples/heatmaps.ipynb index b09a8e69..0cc520c5 100644 --- a/examples/heatmaps.ipynb +++ b/examples/heatmaps.ipynb @@ -83,20 +83,19 @@ "model = YOLO(\"yolov8n.pt\")\n", "cap = cv2.VideoCapture(\"path/to/video/file.mp4\")\n", "assert cap.isOpened(), \"Error reading video file\"\n", - "\n", "w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))\n", "\n", "# Video writer\n", - "video_writer = cv2.VideoWriter(\"/content/people walking gray.mp4\",\n", + "video_writer = cv2.VideoWriter(\"heatmap_output.avi\",\n", " cv2.VideoWriter_fourcc(*'mp4v'),\n", " fps,\n", - " (w, h))\n", + " (w, h))\n", "\n", "# Init heatmap\n", "heatmap_obj = heatmap.Heatmap()\n", - "heatmap_obj.set_args(colormap=cv2.COLORMAP_PARULA ,\n", - " imw=cap.get(4), # should same as cap height\n", - " imh=cap.get(3), # should same as cap width\n", + "heatmap_obj.set_args(colormap=cv2.COLORMAP_PARULA,\n", + " imw=w,\n", + " imh=h,\n", " view_img=True,\n", " shape=\"circle\")\n", "\n", @@ -143,4 +142,4 @@ } } ] -} +} \ No newline at end of file diff --git a/examples/object_counting.ipynb b/examples/object_counting.ipynb index 27744263..ce11044d 100644 --- a/examples/object_counting.ipynb +++ b/examples/object_counting.ipynb @@ -83,11 +83,10 @@ "model = YOLO(\"yolov8n.pt\")\n", "cap = cv2.VideoCapture(\"path/to/video/file.mp4\")\n", "assert cap.isOpened(), \"Error reading video file\"\n", - "\n", "w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))\n", "\n", - "# Define line points\n", - "line_points = [(20, 400), (1080, 400)]\n", + "# Define region points\n", + "region_points = [(20, 400), (1080, 404), (1080, 360), (20, 360)]\n", "\n", "# Video writer\n", "video_writer = cv2.VideoWriter(\"object_counting_output.avi\",\n", @@ -98,7 +97,7 @@ "# Init Object Counter\n", "counter = object_counter.ObjectCounter()\n", "counter.set_args(view_img=True,\n", - " reg_pts=line_points,\n", + " reg_pts=region_points,\n", " classes_names=model.names,\n", " draw_tracks=True)\n", "\n", @@ -145,4 +144,4 @@ } } ] -} +} \ No newline at end of file diff --git a/ultralytics/cfg/__init__.py b/ultralytics/cfg/__init__.py index 7d9aca7e..313d6518 100644 --- a/ultralytics/cfg/__init__.py +++ b/ultralytics/cfg/__init__.py @@ -37,7 +37,7 @@ TASK2DATA = { "segment": "coco8-seg.yaml", "classify": "imagenet10", "pose": "coco8-pose.yaml", - "obb": "dota8-obb.yaml", + "obb": "dota8.yaml", } TASK2MODEL = { "detect": "yolov8n.pt", diff --git a/ultralytics/utils/callbacks/tensorboard.py b/ultralytics/utils/callbacks/tensorboard.py index 0a39d094..b78412f7 100644 --- a/ultralytics/utils/callbacks/tensorboard.py +++ b/ultralytics/utils/callbacks/tensorboard.py @@ -10,8 +10,9 @@ try: assert SETTINGS["tensorboard"] is True # verify integration is enabled WRITER = None # TensorBoard SummaryWriter instance -except (ImportError, AssertionError, TypeError): +except (ImportError, AssertionError, TypeError, AttributeError): # TypeError for handling 'Descriptors cannot not be created directly.' protobuf errors in Windows + # AttributeError: module 'tensorflow' has no attribute 'io' if 'tensorflow' not installed SummaryWriter = None