__init__.pyi 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import cv2.typing
  2. import typing
  3. # Enumerations
  4. TraitAs_TENSOR: int
  5. TRAIT_AS_TENSOR: int
  6. TraitAs_IMAGE: int
  7. TRAIT_AS_IMAGE: int
  8. TraitAs = int
  9. """One of [TraitAs_TENSOR, TRAIT_AS_TENSOR, TraitAs_IMAGE, TRAIT_AS_IMAGE]"""
  10. Sync: int
  11. SYNC: int
  12. Async: int
  13. ASYNC: int
  14. InferMode = int
  15. """One of [Sync, SYNC, Async, ASYNC]"""
  16. # Classes
  17. class PyParams:
  18. # Functions
  19. @typing.overload
  20. def __init__(self) -> None: ...
  21. @typing.overload
  22. def __init__(self, tag: str, model: str, weights: str, device: str) -> None: ...
  23. @typing.overload
  24. def __init__(self, tag: str, model: str, device: str) -> None: ...
  25. def constInput(self, layer_name: str, data: cv2.typing.MatLike, hint: TraitAs = ...) -> PyParams: ...
  26. def cfgNumRequests(self, nireq: int) -> PyParams: ...
  27. def cfgBatchSize(self, size: int) -> PyParams: ...
  28. # Functions
  29. @typing.overload
  30. def params(tag: str, model: str, weights: str, device: str) -> PyParams: ...
  31. @typing.overload
  32. def params(tag: str, model: str, device: str) -> PyParams: ...