🧹 cleanup before `supervision` `0.9.0` release

This commit is contained in:
SkalskiP 2023-06-07 11:47:34 +02:00
parent 920019c887
commit 802347f4d8
18 changed files with 48 additions and 42 deletions

View File

@ -1,3 +0,0 @@
## ImageSink
:::supervision.image.ImageSink

View File

@ -1,7 +0,0 @@
## plot_image
:::supervision.notebook.utils.plot_image
## plot_images_grid
:::supervision.notebook.utils.plot_images_grid

3
docs/utils/file.md Normal file
View File

@ -0,0 +1,3 @@
## list_files_with_extensions
:::supervision.utils.file.list_files_with_extensions

3
docs/utils/image.md Normal file
View File

@ -0,0 +1,3 @@
## ImageSink
:::supervision.utils.image.ImageSink

7
docs/utils/notebook.md Normal file
View File

@ -0,0 +1,7 @@
## plot_image
:::supervision.utils.notebook.plot_image
## plot_images_grid
:::supervision.utils.notebook.plot_images_grid

15
docs/utils/video.md Normal file
View File

@ -0,0 +1,15 @@
## VideoInfo
:::supervision.utils.video.VideoInfo
## VideoSink
:::supervision.utils.video.VideoSink
## get_video_frames_generator
:::supervision.utils.video.get_video_frames_generator
## process_video
:::supervision.utils.video.process_video

View File

@ -1,15 +0,0 @@
## VideoInfo
:::supervision.video.VideoInfo
## VideoSink
:::supervision.video.VideoSink
## get_video_frames_generator
:::supervision.video.get_video_frames_generator
## process_video
:::supervision.video.process_video

View File

@ -39,12 +39,11 @@ nav:
- Core: dataset/core.md
- Draw:
- Utils: draw/utils.md
- Notebook:
- Utils: notebook/utils.md
- Video:
- Utils: video.md
- Image:
- Utils: image.md
- Utils:
- Video: utils/video.md
- Image: utils/image.md
- Notebook: utils/notebook.md
- File: utils/file.md
- Changelog: changelog.md
theme:

View File

@ -1,4 +1,4 @@
__version__ = "0.8.0"
__version__ = "0.9.0"
from supervision.dataset.core import BaseDataset, DetectionDataset
from supervision.detection.annotate import BoxAnnotator, MaskAnnotator
@ -16,12 +16,12 @@ from supervision.detection.utils import (
)
from supervision.draw.color import Color, ColorPalette
from supervision.draw.utils import draw_filled_rectangle, draw_polygon, draw_text
from supervision.file import list_files_with_extensions
from supervision.geometry.core import Point, Position, Rect
from supervision.geometry.utils import get_polygon_center
from supervision.image import ImageSink
from supervision.notebook.utils import plot_image, plot_images_grid
from supervision.video import (
from supervision.utils.file import list_files_with_extensions
from supervision.utils.image import ImageSink
from supervision.utils.notebook import plot_image, plot_images_grid
from supervision.utils.video import (
VideoInfo,
VideoSink,
get_video_frames_generator,

View File

@ -19,7 +19,7 @@ from supervision.dataset.formats.yolo import (
)
from supervision.dataset.ultils import save_dataset_images, train_test_split
from supervision.detection.core import Detections
from supervision.file import list_files_with_extensions
from supervision.utils.file import list_files_with_extensions
@dataclass

View File

@ -9,7 +9,11 @@ import yaml
from supervision.dataset.ultils import approximate_mask_with_polygons
from supervision.detection.core import Detections
from supervision.detection.utils import polygon_to_mask, polygon_to_xyxy
from supervision.file import list_files_with_extensions, read_txt_file, save_text_file
from supervision.utils.file import (
list_files_with_extensions,
read_txt_file,
save_text_file,
)
def _parse_box(values: List[str]) -> np.ndarray:

View File

@ -12,7 +12,7 @@ from supervision.detection.utils import (
xywh_to_xyxy,
)
from supervision.geometry.core import Position
from supervision.internal import deprecated
from supervision.utils.internal import deprecated
def _validate_xyxy(xyxy: Any, n: int) -> None:

View File

@ -17,13 +17,13 @@ def list_files_with_extensions(
Examples:
```python
>>> from supervision import list_files_with_extensions
>>> import supervision as sv
>>> # List all files in the directory
>>> files = list_files_with_extensions(directory='my_directory')
>>> files = sv.list_files_with_extensions(directory='my_directory')
>>> # List only files with '.txt' and '.md' extensions
>>> files = list_files_with_extensions(directory='my_directory', extensions=['txt', 'md'])
>>> files = sv.list_files_with_extensions(directory='my_directory', extensions=['txt', 'md'])
```
"""
directory = Path(directory)