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

#943 Add detection prediction tutorial

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-836-add_prediction_notebook
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  1. import importlib
  2. import inspect
  3. from super_gradients.common.abstractions.abstract_logger import get_logger
  4. logger = get_logger(__name__)
  5. imported_albumentations_failure = None
  6. try:
  7. from albumentations import BasicTransform, BaseCompose
  8. except (ImportError, NameError, ModuleNotFoundError) as import_err:
  9. logger.debug("Failed to import albumentations")
  10. imported_albumentations_failure = import_err
  11. if imported_albumentations_failure is None:
  12. ALBUMENTATIONS_TRANSFORMS = {
  13. name: cls for name, cls in inspect.getmembers(importlib.import_module("albumentations"), inspect.isclass) if issubclass(cls, BasicTransform)
  14. }
  15. ALBUMENTATIONS_TRANSFORMS.update(
  16. {name: cls for name, cls in inspect.getmembers(importlib.import_module("albumentations.pytorch"), inspect.isclass) if issubclass(cls, BasicTransform)}
  17. )
  18. ALBUMENTATIONS_COMP_TRANSFORMS = {
  19. name: cls
  20. for name, cls in inspect.getmembers(importlib.import_module("albumentations.core.composition"), inspect.isclass)
  21. if issubclass(cls, BaseCompose)
  22. }
  23. ALBUMENTATIONS_TRANSFORMS.update(ALBUMENTATIONS_COMP_TRANSFORMS)
  24. else:
  25. ALBUMENTATIONS_TRANSFORMS = None
  26. ALBUMENTATIONS_COMP_TRANSFORMS = None
Discard
Tip!

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