mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 21:44:22 +08:00
Add missing single-line docstrings (#8362)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Johannes Kaisinger <johannes.kaisinger@gmail.com>
This commit is contained in:
parent
2945cfc6ef
commit
8c28e0c3fe
@ -115,7 +115,7 @@ def update_subdir_edit_links(subdir="", docs_url=""):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# Build the docs
|
"""Builds docs, updates titles and edit links, and prints local server command."""
|
||||||
build_docs()
|
build_docs()
|
||||||
|
|
||||||
# Update titles
|
# Update titles
|
||||||
|
@ -555,6 +555,7 @@ def test_hub():
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def image():
|
def image():
|
||||||
|
"""Loads an image from a predefined source using OpenCV."""
|
||||||
return cv2.imread(str(SOURCE))
|
return cv2.imread(str(SOURCE))
|
||||||
|
|
||||||
|
|
||||||
@ -568,6 +569,7 @@ def image():
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_classify_transforms_train(image, auto_augment, erasing, force_color_jitter):
|
def test_classify_transforms_train(image, auto_augment, erasing, force_color_jitter):
|
||||||
|
"""Tests classification transforms during training with various augmentation settings."""
|
||||||
import torchvision.transforms as T
|
import torchvision.transforms as T
|
||||||
|
|
||||||
from ultralytics.data.augment import classify_augmentations
|
from ultralytics.data.augment import classify_augmentations
|
||||||
|
@ -15,7 +15,7 @@ class OBBTrainer(yolo.detect.DetectionTrainer):
|
|||||||
```python
|
```python
|
||||||
from ultralytics.models.yolo.obb import OBBTrainer
|
from ultralytics.models.yolo.obb import OBBTrainer
|
||||||
|
|
||||||
args = dict(model='yolov8n-seg.pt', data='coco8-seg.yaml', epochs=3)
|
args = dict(model='yolov8n-obb.pt', data='dota8.yaml', epochs=3)
|
||||||
trainer = OBBTrainer(overrides=args)
|
trainer = OBBTrainer(overrides=args)
|
||||||
trainer.train()
|
trainer.train()
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user