-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
113 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
stubs/D3DShot/d3dshot/capture_outputs/numpy_capture_output.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
from _typeshed import Incomplete | ||
from typing_extensions import TypeAlias | ||
|
||
import numpy as np | ||
import numpy.typing as npt | ||
from d3dshot.capture_output import CaptureOutput as CaptureOutput | ||
from PIL.Image import Image | ||
|
||
Pointer: TypeAlias = Incomplete | ||
NDArray: TypeAlias = npt.NDArray[np.int32] | ||
# TODO: Complete types once we can import non-types dependencies | ||
# See: https://github.com/python/typeshed/issues/5768 | ||
# import numpy as np | ||
# import numpy.typing as npt | ||
# NDArray: TypeAlias = npt.NDArray[np.int32] | ||
NDArray: TypeAlias = Incomplete | ||
_Pointer: TypeAlias = Incomplete | ||
|
||
class NumpyCaptureOutput(CaptureOutput): | ||
def __init__(self) -> None: ... | ||
def process( | ||
self, pointer: Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
self, pointer: _Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> NDArray: ... | ||
def to_pil(self, frame: NDArray) -> Image: ... | ||
def stack(self, frames: list[NDArray] | NDArray, stack_dimension: int) -> NDArray: ... |
13 changes: 8 additions & 5 deletions
13
stubs/D3DShot/d3dshot/capture_outputs/numpy_float_capture_output.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
from _typeshed import Incomplete | ||
from typing_extensions import TypeAlias | ||
|
||
import numpy as np | ||
import numpy.typing as npt | ||
from d3dshot.capture_output import CaptureOutput as CaptureOutput | ||
from PIL.Image import Image | ||
|
||
Pointer: TypeAlias = Incomplete | ||
NDArray: TypeAlias = npt.NDArray[np.float32] | ||
# TODO: Complete types once we can import non-types dependencies | ||
# See: https://github.com/python/typeshed/issues/5768 | ||
# import numpy as np | ||
# import numpy.typing as npt | ||
# NDArray: TypeAlias = npt.NDArray[np.float32] | ||
NDArray: TypeAlias = Incomplete | ||
_Pointer: TypeAlias = Incomplete | ||
|
||
class NumpyFloatCaptureOutput(CaptureOutput): | ||
def __init__(self) -> None: ... | ||
def process( | ||
self, pointer: Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
self, pointer: _Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> NDArray: ... | ||
def to_pil(self, frame: NDArray) -> Image: ... | ||
def stack(self, frames: list[NDArray] | NDArray, stack_dimension: int) -> NDArray: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 9 additions & 6 deletions
15
stubs/D3DShot/d3dshot/capture_outputs/pytorch_capture_output.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
from _typeshed import Incomplete | ||
from typing_extensions import TypeAlias | ||
|
||
import torch | ||
from d3dshot.capture_output import CaptureOutput as CaptureOutput | ||
from PIL.Image import Image | ||
|
||
Pointer: TypeAlias = Incomplete | ||
# TODO: Complete types once we can import non-types dependencies | ||
# See: https://github.com/python/typeshed/issues/5768 | ||
# from torch import Tensor | ||
_Tensor: TypeAlias = Incomplete | ||
_Pointer: TypeAlias = Incomplete | ||
|
||
class PytorchCaptureOutput(CaptureOutput): | ||
def __init__(self) -> None: ... | ||
def process( | ||
self, pointer: Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> torch.Tensor: ... | ||
def to_pil(self, frame: torch.Tensor) -> Image: ... | ||
def stack(self, frames: list[torch.Tensor], stack_dimension: int) -> torch.Tensor: ... | ||
self, pointer: _Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> _Tensor: ... | ||
def to_pil(self, frame: _Tensor) -> Image: ... | ||
def stack(self, frames: list[_Tensor], stack_dimension: int) -> _Tensor: ... |
15 changes: 9 additions & 6 deletions
15
stubs/D3DShot/d3dshot/capture_outputs/pytorch_float_capture_output.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
from _typeshed import Incomplete | ||
from typing_extensions import TypeAlias | ||
|
||
import torch | ||
from d3dshot.capture_output import CaptureOutput as CaptureOutput | ||
from PIL.Image import Image | ||
|
||
Pointer: TypeAlias = Incomplete | ||
# TODO: Complete types once we can import non-types dependencies | ||
# See: https://github.com/python/typeshed/issues/5768 | ||
# from torch import Tensor | ||
_Tensor: TypeAlias = Incomplete | ||
_Pointer: TypeAlias = Incomplete | ||
|
||
class PytorchFloatCaptureOutput(CaptureOutput): | ||
def __init__(self) -> None: ... | ||
def process( | ||
self, pointer: Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> torch.Tensor: ... | ||
def to_pil(self, frame: torch.Tensor) -> Image: ... | ||
def stack(self, frames: list[torch.Tensor], stack_dimension: int) -> torch.Tensor: ... | ||
self, pointer: _Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> _Tensor: ... | ||
def to_pil(self, frame: _Tensor) -> Image: ... | ||
def stack(self, frames: list[_Tensor], stack_dimension: int) -> _Tensor: ... |
18 changes: 11 additions & 7 deletions
18
stubs/D3DShot/d3dshot/capture_outputs/pytorch_float_gpu_capture_output.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
from _typeshed import Incomplete | ||
from typing_extensions import TypeAlias | ||
|
||
import torch | ||
from d3dshot.capture_output import CaptureOutput as CaptureOutput | ||
from PIL.Image import Image | ||
|
||
Pointer: TypeAlias = Incomplete | ||
# TODO: Complete types once we can import non-types dependencies | ||
# See: https://github.com/python/typeshed/issues/5768 | ||
# from torch import device, Tensor | ||
_Tensor: TypeAlias = Incomplete | ||
_device: TypeAlias = Incomplete | ||
_Pointer: TypeAlias = Incomplete | ||
|
||
class PytorchFloatGPUCaptureOutput(CaptureOutput): | ||
device: Incomplete | ||
device: _device | ||
def __init__(self) -> None: ... | ||
def process( | ||
self, pointer: Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> torch.Tensor: ... | ||
def to_pil(self, frame: torch.Tensor) -> Image: ... | ||
def stack(self, frames: list[torch.Tensor], stack_dimension: int) -> torch.Tensor: ... | ||
self, pointer: _Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> _Tensor: ... | ||
def to_pil(self, frame: _Tensor) -> Image: ... | ||
def stack(self, frames: list[_Tensor], stack_dimension: int) -> _Tensor: ... |
19 changes: 12 additions & 7 deletions
19
stubs/D3DShot/d3dshot/capture_outputs/pytorch_gpu_capture_output.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
from _typeshed import Incomplete | ||
from typing_extensions import TypeAlias | ||
|
||
import torch | ||
from d3dshot.capture_output import CaptureOutput as CaptureOutput | ||
from PIL.Image import Image | ||
|
||
Pointer: TypeAlias = Incomplete | ||
# TODO: Complete types once we can import non-types dependencies | ||
# See: https://github.com/python/typeshed/issues/5768 | ||
# from torch import device, Tensor | ||
_Tensor: TypeAlias = Incomplete | ||
_device: TypeAlias = Incomplete | ||
|
||
_Pointer: TypeAlias = Incomplete | ||
|
||
class PytorchGPUCaptureOutput(CaptureOutput): | ||
device: torch.device | ||
device: _device | ||
def __init__(self) -> None: ... | ||
def process( | ||
self, pointer: Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> torch.Tensor: ... | ||
def to_pil(self, frame: torch.Tensor) -> Image: ... | ||
def stack(self, frames: list[torch.Tensor], stack_dimension: int): ... | ||
self, pointer: _Pointer, size: int, width: int, height: int, region: tuple[int, int, int, int], rotation: int | ||
) -> _Tensor: ... | ||
def to_pil(self, frame: _Tensor) -> Image: ... | ||
def stack(self, frames: list[_Tensor], stack_dimension: int): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters