Add FAQ sections to Modes and Tasks (#14181)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Abirami Vina <abirami.vina@gmail.com> Co-authored-by: RizwanMunawar <chr043416@gmail.com> Co-authored-by: Muhammad Rizwan Munawar <muhammadrizwanmunawar123@gmail.com>
This commit is contained in:
parent
e285d3d1b2
commit
6c13bea7b8
39 changed files with 2247 additions and 481 deletions
|
|
@ -330,3 +330,89 @@ Explorer API can be used to explore datasets with advanced semantic, vector-simi
|
|||
You can easily customize Trainers to support custom tasks or explore R&D ideas. Learn more about Customizing `Trainers`, `Validators` and `Predictors` to suit your project needs in the Customization Section.
|
||||
|
||||
[Customization tutorials](engine.md){ .md-button }
|
||||
|
||||
## FAQ
|
||||
|
||||
### How can I integrate YOLOv8 into my Python project for object detection?
|
||||
|
||||
Integrating Ultralytics YOLOv8 into your Python projects is simple. You can load a pre-trained model or train a new model from scratch. Here's how to get started:
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
# Load a pretrained YOLO model
|
||||
model = YOLO("yolov8n.pt")
|
||||
|
||||
# Perform object detection on an image
|
||||
results = model("https://ultralytics.com/images/bus.jpg")
|
||||
|
||||
# Visualize the results
|
||||
for result in results:
|
||||
result.show()
|
||||
```
|
||||
|
||||
See more detailed examples in our [Predict Mode](../modes/predict.md) section.
|
||||
|
||||
### What are the different modes available in YOLOv8?
|
||||
|
||||
Ultralytics YOLOv8 provides various modes to cater to different machine learning workflows. These include:
|
||||
|
||||
- **[Train](../modes/train.md)**: Train a model using custom datasets.
|
||||
- **[Val](../modes/val.md)**: Validate model performance on a validation set.
|
||||
- **[Predict](../modes/predict.md)**: Make predictions on new images or video streams.
|
||||
- **[Export](../modes/export.md)**: Export models to various formats like ONNX, TensorRT.
|
||||
- **[Track](../modes/track.md)**: Real-time object tracking in video streams.
|
||||
- **[Benchmark](../modes/benchmark.md)**: Benchmark model performance across different configurations.
|
||||
|
||||
Each mode is designed to provide comprehensive functionalities for different stages of model development and deployment.
|
||||
|
||||
### How do I train a custom YOLOv8 model using my dataset?
|
||||
|
||||
To train a custom YOLOv8 model, you need to specify your dataset and other hyperparameters. Here's a quick example:
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
# Load the YOLO model
|
||||
model = YOLO("yolov8n.yaml")
|
||||
|
||||
# Train the model with custom dataset
|
||||
model.train(data="path/to/your/dataset.yaml", epochs=10)
|
||||
```
|
||||
|
||||
For more details on training and hyperlinks to example usage, visit our [Train Mode](../modes/train.md) page.
|
||||
|
||||
### How do I export YOLOv8 models for deployment?
|
||||
|
||||
Exporting YOLOv8 models in a format suitable for deployment is straightforward with the `export` function. For example, you can export a model to ONNX format:
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
# Load the YOLO model
|
||||
model = YOLO("yolov8n.pt")
|
||||
|
||||
# Export the model to ONNX format
|
||||
model.export(format="onnx")
|
||||
```
|
||||
|
||||
For various export options, refer to the [Export Mode](../modes/export.md) documentation.
|
||||
|
||||
### Can I validate my YOLOv8 model on different datasets?
|
||||
|
||||
Yes, validating YOLOv8 models on different datasets is possible. After training, you can use the validation mode to evaluate the performance:
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
# Load a YOLOv8 model
|
||||
model = YOLO("yolov8n.yaml")
|
||||
|
||||
# Train the model
|
||||
model.train(data="coco8.yaml", epochs=5)
|
||||
|
||||
# Validate the model on a different dataset
|
||||
model.val(data="path/to/separate/data.yaml")
|
||||
```
|
||||
|
||||
Check the [Val Mode](../modes/val.md) page for detailed examples and usage.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue