🛠️ small fixes
This commit is contained in:
parent
58181e6a7a
commit
55cd04d0aa
|
|
@ -4,7 +4,7 @@ from typing import Dict, List, Optional
|
|||
import numpy as np
|
||||
|
||||
from supervision.detection.core import Detections
|
||||
from supervision.dataset.formats.pascal_voc import dataset_to_pascal_voc
|
||||
# from supervision.dataset.formats.pascal_voc import dataset_to_pascal_voc
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
@ -21,13 +21,13 @@ class Dataset:
|
|||
images: Dict[str, np.ndarray]
|
||||
annotations: Dict[str, Detections]
|
||||
|
||||
def as_pascal_voc(
|
||||
self,
|
||||
images_directory_path: Optional[str],
|
||||
annotations_directory_path: Optional[str]
|
||||
) -> None:
|
||||
dataset_to_pascal_voc(
|
||||
detections=self,
|
||||
images_directory_path=images_directory_path,
|
||||
annotations_directory_path=annotations_directory_path
|
||||
)
|
||||
# def as_pascal_voc(
|
||||
# self,
|
||||
# images_directory_path: Optional[str],
|
||||
# annotations_directory_path: Optional[str]
|
||||
# ) -> None:
|
||||
# dataset_to_pascal_voc(
|
||||
# detections=self,
|
||||
# images_directory_path=images_directory_path,
|
||||
# annotations_directory_path=annotations_directory_path
|
||||
# )
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ def detections_to_pascal_voc(
|
|||
) -> str:
|
||||
"""
|
||||
Converts Detections object to Pascal VOC XML format.
|
||||
|
||||
Args:
|
||||
detections (Detections): A Detections object containing bounding boxes, class ids, and other relevant information.
|
||||
classes (List[str]): A list of class names corresponding to the class ids in the Detections object.
|
||||
|
|
|
|||
Loading…
Reference in New Issue