ultralytics 8.0.136 refactor and simplify package (#3748)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Laughing 2023-07-16 23:47:45 +08:00 committed by GitHub
parent 8ebe94d1e9
commit 620f3eb218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
383 changed files with 4213 additions and 4646 deletions

View file

@ -15,14 +15,14 @@ custom model and dataloader by just overriding these functions:
* `get_model(cfg, weights)` - The function that builds the model to be trained
* `get_dataloder()` - The function that builds the dataloader
More details and source code can be found in [`BaseTrainer` Reference](../reference/yolo/engine/trainer.md)
More details and source code can be found in [`BaseTrainer` Reference](../reference/engine/trainer.md)
## DetectionTrainer
Here's how you can use the YOLOv8 `DetectionTrainer` and customize it.
```python
from ultralytics.yolo.v8.detect import DetectionTrainer
from ultralytics.models.yolo.detect import DetectionTrainer
trainer = DetectionTrainer(overrides={...})
trainer.train()
@ -35,7 +35,7 @@ Let's customize the trainer **to train a custom detection model** that is not su
simply overloading the existing the `get_model` functionality:
```python
from ultralytics.yolo.v8.detect import DetectionTrainer
from ultralytics.models.yolo.detect import DetectionTrainer
class CustomTrainer(DetectionTrainer):
@ -54,7 +54,7 @@ You now realize that you need to customize the trainer further to:
Here's how you can do it:
```python
from ultralytics.yolo.v8.detect import DetectionTrainer
from ultralytics.models.yolo.detect import DetectionTrainer
from ultralytics.nn.tasks import DetectionModel