Skip to content

Commit

Permalink
added registries (#1862)
Browse files Browse the repository at this point in the history
Co-authored-by: Ofri Masad <[email protected]>
  • Loading branch information
shaydeci and ofrimasad authored Feb 26, 2024
1 parent 9385f93 commit 8819667
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from super_gradients.common.abstractions.abstract_logger import get_logger
from super_gradients.common.exceptions.dataset_exceptions import DatasetValidationException, ParameterMismatchException
from super_gradients.common.deprecate import deprecated_parameter
from super_gradients.common.registry import register_dataset
from super_gradients.training.datasets.data_formats.bbox_formats.xywh import xywh_to_xyxy_inplace
from super_gradients.training.datasets.detection_datasets.detection_dataset import DetectionDataset
from super_gradients.training.datasets.data_formats.default_formats import XYXY_LABEL
Expand All @@ -17,6 +18,7 @@
logger = get_logger(__name__)


@register_dataset("COCOFormatDetectionDataset")
class COCOFormatDetectionDataset(DetectionDataset):
"""Base dataset to load ANY dataset that is with a similar structure to the COCO dataset.
- Annotation file (.json). It has to respect the exact same format as COCO, for both the json schema and the bbox format (xywh).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import List, Optional, Tuple

from super_gradients.common.abstractions.abstract_logger import get_logger
from super_gradients.common.registry import register_dataset
from super_gradients.training.utils.media.image import is_image
from super_gradients.training.datasets.detection_datasets.detection_dataset import DetectionDataset
from super_gradients.training.datasets.data_formats import ConcatenatedTensorFormatConverter
Expand All @@ -13,6 +14,7 @@
logger = get_logger(__name__)


@register_dataset("YoloDarknetFormatDetectionDataset")
class YoloDarknetFormatDetectionDataset(DetectionDataset):
"""Base dataset to load ANY dataset that is with a similar structure to the Yolo/Darknet dataset.
Expand Down

0 comments on commit 8819667

Please sign in to comment.