Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#561 Feature/sg 193 extend output formator

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-193-extend_detection_target_transform
@@ -6,8 +6,9 @@ import unittest
 import numpy as np
 import numpy as np
 import torch
 import torch
 
 
+
 from super_gradients.common.factories.bbox_format_factory import BBoxFormatFactory
 from super_gradients.common.factories.bbox_format_factory import BBoxFormatFactory
-from super_gradients.training.utils.bbox_formats import (
+from super_gradients.training.datasets.data_formats.bbox_formats import (
     CXCYWHCoordinateFormat,
     CXCYWHCoordinateFormat,
     NormalizedXYXYCoordinateFormat,
     NormalizedXYXYCoordinateFormat,
     NormalizedXYWHCoordinateFormat,
     NormalizedXYWHCoordinateFormat,
@@ -19,21 +20,21 @@ from super_gradients.training.utils.bbox_formats import (
     BBOX_FORMATS,
     BBOX_FORMATS,
     BoundingBoxFormat,
     BoundingBoxFormat,
 )
 )
-from super_gradients.training.utils.bbox_formats.normalized_cxcywh import (
+from super_gradients.training.datasets.data_formats.bbox_formats.normalized_cxcywh import (
     normalized_cxcywh_to_xyxy_inplace,
     normalized_cxcywh_to_xyxy_inplace,
     xyxy_to_normalized_cxcywh_inplace,
     xyxy_to_normalized_cxcywh_inplace,
     xyxy_to_normalized_cxcywh,
     xyxy_to_normalized_cxcywh,
     normalized_cxcywh_to_xyxy,
     normalized_cxcywh_to_xyxy,
 )
 )
-from super_gradients.training.utils.bbox_formats.normalized_xywh import (
+from super_gradients.training.datasets.data_formats.bbox_formats.normalized_xywh import (
     xyxy_to_normalized_xywh_inplace,
     xyxy_to_normalized_xywh_inplace,
     xyxy_to_normalized_xywh,
     xyxy_to_normalized_xywh,
     normalized_xywh_to_xyxy_inplace,
     normalized_xywh_to_xyxy_inplace,
     normalized_xywh_to_xyxy,
     normalized_xywh_to_xyxy,
 )
 )
-from super_gradients.training.utils.bbox_formats.xywh import xyxy_to_xywh, xywh_to_xyxy, xywh_to_xyxy_inplace, xyxy_to_xywh_inplace
-from super_gradients.training.utils.bbox_formats.yxyx import xyxy_to_yxyx, xyxy_to_yxyx_inplace
-from super_gradients.training.utils.output_adapters.detection_adapter import ConvertBoundingBoxes
+from super_gradients.training.datasets.data_formats.bbox_formats.xywh import xyxy_to_xywh, xywh_to_xyxy, xywh_to_xyxy_inplace, xyxy_to_xywh_inplace
+from super_gradients.training.datasets.data_formats.bbox_formats.yxyx import xyxy_to_yxyx, xyxy_to_yxyx_inplace
+from super_gradients.training.datasets.data_formats.output_adapters.detection_adapter import ConvertBoundingBoxes
 
 
 
 
 class BBoxFormatsTest(unittest.TestCase):
 class BBoxFormatsTest(unittest.TestCase):
@@ -255,7 +256,7 @@ class BBoxFormatsTest(unittest.TestCase):
                 with tempfile.TemporaryDirectory() as tmpdirname:
                 with tempfile.TemporaryDirectory() as tmpdirname:
                     adapter_fname = os.path.join(tmpdirname, "adapter.onnx")
                     adapter_fname = os.path.join(tmpdirname, "adapter.onnx")
                     # Just test that export works, we test the correctness in the detection_output_adapter_test.py
                     # Just test that export works, we test the correctness in the detection_output_adapter_test.py
-                    torch.onnx.export(module, gt_bboxes.clone(), adapter_fname)
+                    torch.onnx.export(module, gt_bboxes.clone(), adapter_fname, opset_version=11)
 
 
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
Discard
Tip!

Press p or to see the previous file or, n or to see the next file