PyCharm Docs Inspect fixes (#18432)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
ef16c56c99
commit
f7b9009c91
15 changed files with 52 additions and 50 deletions
|
|
@ -32,7 +32,7 @@ Dataset annotation is a very resource intensive and time-consuming process. If y
|
|||
```{ .py .annotate }
|
||||
from ultralytics.data.annotator import auto_annotate
|
||||
|
||||
auto_annotate( # (1)!
|
||||
auto_annotate(
|
||||
data="path/to/new/data",
|
||||
det_model="yolo11n.pt",
|
||||
sam_model="mobile_sam.pt",
|
||||
|
|
@ -41,17 +41,16 @@ auto_annotate( # (1)!
|
|||
)
|
||||
```
|
||||
|
||||
1. Nothing returns from this function
|
||||
This function does not return any value. For further details on how the function operates:
|
||||
|
||||
- [See the reference section for `annotator.auto_annotate`](../reference/data/annotator.md#ultralytics.data.annotator.auto_annotate) for more insight on how the function operates.
|
||||
|
||||
- Use in combination with the [function `segments2boxes`](#convert-segments-to-bounding-boxes) to generate object detection bounding boxes as well
|
||||
|
||||
### Convert Segmentation Masks into YOLO Format
|
||||
|
||||

|
||||
|
||||
Use to convert a dataset of segmentation mask images to the `YOLO` segmentation format.
|
||||
Use to convert a dataset of segmentation mask images to the [`YOLO`](../models/yolo11.md) segmentation format.
|
||||
This function takes the directory containing the binary format mask images and converts them into YOLO segmentation format.
|
||||
|
||||
The converted masks will be saved in the specified output directory.
|
||||
|
|
@ -59,7 +58,8 @@ The converted masks will be saved in the specified output directory.
|
|||
```python
|
||||
from ultralytics.data.converter import convert_segment_masks_to_yolo_seg
|
||||
|
||||
# The classes here is the total classes in the dataset, for COCO dataset we have 80 classes
|
||||
# The classes here is the total classes in the dataset.
|
||||
# for COCO dataset we have 80 classes.
|
||||
convert_segment_masks_to_yolo_seg(masks_dir="path/to/masks_dir", output_dir="path/to/output_dir", classes=80)
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue