📄 docs update

This commit is contained in:
SkalskiP 2023-04-19 12:59:29 +02:00
parent 0394a3f545
commit 49d4441419
6 changed files with 27 additions and 8 deletions

View File

@ -1,3 +0,0 @@
## detections_to_voc_xml
:::supervision.annotation.voc.detections_to_voc_xml

8
docs/dataset/core.md Normal file
View File

@ -0,0 +1,8 @@
!!! warning
`Dataset` API is still fluid and may change. If you use Dataset in your project until further notice, freeze the
`supervision` version in your `requirements.txt`.
## Dataset
:::supervision.dataset.core.Dataset

View File

@ -24,19 +24,19 @@ extra:
nav:
- Home: index.md
- API reference:
- Video: video.md
- Detection:
- Core: detection/core.md
- Annotate: detection/annotate.md
- Utils: detection/utils.md
- Tools:
- Polygon Zone: detection/tools/polygon_zone.md
- Dataset:
- Core: dataset/core.md
- Draw:
- Utils: draw/utils.md
- Annotations:
- Pascal VOC XML: annotation/voc.md
- Notebook:
- Utils: notebook/utils.md
- Video: video.md
- Changelog: changelog.md
theme:

View File

@ -31,6 +31,21 @@ class Dataset:
minimum_detection_area_percentage: float = 0.0,
maximum_detection_area_percentage: float = 1.0,
) -> None:
"""
Exports the dataset to PASCAL VOC format. This method saves the images and their corresponding annotations in
PASCAL VOC format, which consists of XML files. The method allows filtering the detections based on their area
percentage.
Args:
images_directory_path (Optional[str]): The path to the directory where the images should be saved.
If not provided, images will not be saved.
annotations_directory_path (Optional[str]): The path to the directory where the annotations in
PASCAL VOC format should be saved. If not provided, annotations will not be saved.
minimum_detection_area_percentage (float): The minimum percentage of detection area relative to
the image area for a detection to be included.
maximum_detection_area_percentage (float): The maximum percentage of detection area relative to
the image area for a detection to be included.
"""
if images_directory_path:
images_path = Path(images_directory_path)
images_path.mkdir(parents=True, exist_ok=True)

View File

@ -12,7 +12,6 @@ from supervision.detection.utils import (
polygon_to_xyxy,
)
EPSILON = 0.05

View File

@ -1,5 +1,5 @@
from pathlib import Path
from typing import Union, Optional, List
from typing import List, Optional, Union
def write_text_to_file(content: str, output_path: str) -> None: