Skip to content

Commit 1603b26

Browse files
Michael Waechtermeta-codesync[bot]
authored andcommitted
Revert pyfeatures + pyrobust to stubgen_binary (v1)
Reviewed By: ahojnnes Differential Revision: D102701868 fbshipit-source-id: 3e4bf5b8fa1427e65dae6cf54d032d7fdb2a9eba
1 parent 6663c64 commit 1603b26

2 files changed

Lines changed: 164 additions & 235 deletions

File tree

opensfm/src/features/pyfeatures.pyi

Lines changed: 84 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@
1010
# Ignore errors for [24] untyped generics.
1111
# pyre-ignore-all-errors[24]
1212

13-
from __future__ import annotations
14-
1513
import collections.abc
1614
import typing
1715

1816
import numpy
17+
import numpy.typing
18+
from typing import *
1919

20-
__all__: list[str] = [
20+
__all__ = [
2121
"AKAZEOptions",
2222
"AkazeDescriptorType",
2323
"AkazeDiffusivityType",
24+
"StaticExtensionLoader",
2425
"akaze",
2526
"compute_vlad_descriptor",
2627
"compute_vlad_distances",
@@ -29,194 +30,169 @@ __all__: list[str] = [
2930
]
3031

3132
class AKAZEOptions:
32-
descriptor: AkazeDescriptorType
33-
diffusivity: AkazeDiffusivityType
34-
save_keypoints: bool
35-
save_scale_space: bool
36-
use_adaptive_suppression: bool
37-
use_isotropic_diffusion: bool
38-
verbosity: bool
3933
def __init__(self) -> None: ...
4034
@property
4135
def derivative_factor(self) -> float: ...
4236
@derivative_factor.setter
43-
def derivative_factor(
44-
self, arg0: typing.SupportsFloat | typing.SupportsIndex
45-
) -> None: ...
37+
def derivative_factor(self, arg0: float) -> None: ...
38+
@property
39+
def descriptor(self) -> AkazeDescriptorType: ...
40+
@descriptor.setter
41+
def descriptor(self, arg0: AkazeDescriptorType) -> None: ...
4642
@property
4743
def descriptor_channels(self) -> int: ...
4844
@descriptor_channels.setter
49-
def descriptor_channels(
50-
self, arg0: typing.SupportsInt | typing.SupportsIndex
51-
) -> None: ...
45+
def descriptor_channels(self, arg0: int) -> None: ...
5246
@property
5347
def descriptor_pattern_size(self) -> int: ...
5448
@descriptor_pattern_size.setter
55-
def descriptor_pattern_size(
56-
self, arg0: typing.SupportsInt | typing.SupportsIndex
57-
) -> None: ...
49+
def descriptor_pattern_size(self, arg0: int) -> None: ...
5850
@property
5951
def descriptor_size(self) -> int: ...
6052
@descriptor_size.setter
61-
def descriptor_size(
62-
self, arg0: typing.SupportsInt | typing.SupportsIndex
63-
) -> None: ...
53+
def descriptor_size(self, arg0: int) -> None: ...
54+
@property
55+
def diffusivity(self) -> AkazeDiffusivityType: ...
56+
@diffusivity.setter
57+
def diffusivity(self, arg0: AkazeDiffusivityType) -> None: ...
6458
@property
6559
def dthreshold(self) -> float: ...
6660
@dthreshold.setter
67-
def dthreshold(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: ...
61+
def dthreshold(self, arg0: float) -> None: ...
6862
@property
6963
def img_height(self) -> int: ...
7064
@img_height.setter
71-
def img_height(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: ...
65+
def img_height(self, arg0: int) -> None: ...
7266
@property
7367
def img_width(self) -> int: ...
7468
@img_width.setter
75-
def img_width(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: ...
69+
def img_width(self, arg0: int) -> None: ...
7670
@property
7771
def kcontrast(self) -> float: ...
7872
@kcontrast.setter
79-
def kcontrast(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: ...
73+
def kcontrast(self, arg0: float) -> None: ...
8074
@property
8175
def kcontrast_nbins(self) -> int: ...
8276
@kcontrast_nbins.setter
83-
def kcontrast_nbins(
84-
self, arg0: typing.SupportsInt | typing.SupportsIndex
85-
) -> None: ...
77+
def kcontrast_nbins(self, arg0: int) -> None: ...
8678
@property
8779
def kcontrast_percentile(self) -> float: ...
8880
@kcontrast_percentile.setter
89-
def kcontrast_percentile(
90-
self, arg0: typing.SupportsFloat | typing.SupportsIndex
91-
) -> None: ...
81+
def kcontrast_percentile(self, arg0: float) -> None: ...
9282
@property
9383
def min_dthreshold(self) -> float: ...
9484
@min_dthreshold.setter
95-
def min_dthreshold(
96-
self, arg0: typing.SupportsFloat | typing.SupportsIndex
97-
) -> None: ...
85+
def min_dthreshold(self, arg0: float) -> None: ...
9886
@property
9987
def nsublevels(self) -> int: ...
10088
@nsublevels.setter
101-
def nsublevels(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: ...
89+
def nsublevels(self, arg0: int) -> None: ...
10290
@property
10391
def omax(self) -> int: ...
10492
@omax.setter
105-
def omax(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: ...
93+
def omax(self, arg0: int) -> None: ...
10694
@property
10795
def omin(self) -> int: ...
10896
@omin.setter
109-
def omin(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None: ...
97+
def omin(self, arg0: int) -> None: ...
98+
@property
99+
def save_keypoints(self) -> bool: ...
100+
@save_keypoints.setter
101+
def save_keypoints(self, arg0: bool) -> None: ...
102+
@property
103+
def save_scale_space(self) -> bool: ...
104+
@save_scale_space.setter
105+
def save_scale_space(self, arg0: bool) -> None: ...
110106
@property
111107
def sderivatives(self) -> float: ...
112108
@sderivatives.setter
113-
def sderivatives(
114-
self, arg0: typing.SupportsFloat | typing.SupportsIndex
115-
) -> None: ...
109+
def sderivatives(self, arg0: float) -> None: ...
116110
@property
117111
def soffset(self) -> float: ...
118112
@soffset.setter
119-
def soffset(self, arg0: typing.SupportsFloat | typing.SupportsIndex) -> None: ...
113+
def soffset(self, arg0: float) -> None: ...
120114
@property
121115
def target_num_features(self) -> int: ...
122116
@target_num_features.setter
123-
def target_num_features(
124-
self, arg0: typing.SupportsInt | typing.SupportsIndex
125-
) -> None: ...
117+
def target_num_features(self, arg0: int) -> None: ...
118+
@property
119+
def use_adaptive_suppression(self) -> bool: ...
120+
@use_adaptive_suppression.setter
121+
def use_adaptive_suppression(self, arg0: bool) -> None: ...
122+
@property
123+
def use_isotropic_diffusion(self) -> bool: ...
124+
@use_isotropic_diffusion.setter
125+
def use_isotropic_diffusion(self, arg0: bool) -> None: ...
126+
@property
127+
def verbosity(self) -> bool: ...
128+
@verbosity.setter
129+
def verbosity(self, arg0: bool) -> None: ...
126130

127131
class AkazeDescriptorType:
128-
MLDB: typing.ClassVar[AkazeDescriptorType] # value = <AkazeDescriptorType.MLDB: 5>
129-
MLDB_UPRIGHT: typing.ClassVar[
130-
AkazeDescriptorType
131-
] # value = <AkazeDescriptorType.MLDB_UPRIGHT: 4>
132-
MSURF: typing.ClassVar[
133-
AkazeDescriptorType
134-
] # value = <AkazeDescriptorType.MSURF: 3>
135-
MSURF_UPRIGHT: typing.ClassVar[
136-
AkazeDescriptorType
137-
] # value = <AkazeDescriptorType.MSURF_UPRIGHT: 2>
138-
SURF: typing.ClassVar[AkazeDescriptorType] # value = <AkazeDescriptorType.SURF: 1>
139-
SURF_UPRIGHT: typing.ClassVar[
140-
AkazeDescriptorType
141-
] # value = <AkazeDescriptorType.SURF_UPRIGHT: 0>
142-
__members__: typing.ClassVar[
143-
dict[str, AkazeDescriptorType]
144-
] # value = {'SURF_UPRIGHT': <AkazeDescriptorType.SURF_UPRIGHT: 0>, 'SURF': <AkazeDescriptorType.SURF: 1>, 'MSURF_UPRIGHT': <AkazeDescriptorType.MSURF_UPRIGHT: 2>, 'MSURF': <AkazeDescriptorType.MSURF: 3>, 'MLDB_UPRIGHT': <AkazeDescriptorType.MLDB_UPRIGHT: 4>, 'MLDB': <AkazeDescriptorType.MLDB: 5>}
145-
def __eq__(self, other: object) -> bool: ...
146132
def __getstate__(self) -> int: ...
147133
def __hash__(self) -> int: ...
148134
def __index__(self) -> int: ...
149-
def __init__(self, value: typing.SupportsInt | typing.SupportsIndex) -> None: ...
135+
def __init__(self, value: int) -> None: ...
150136
def __int__(self) -> int: ...
151-
def __ne__(self, other: object) -> bool: ...
152137
def __repr__(self) -> str: ...
153-
def __setstate__(
154-
self, state: typing.SupportsInt | typing.SupportsIndex
155-
) -> None: ...
138+
def __setstate__(self, state: int) -> None: ...
156139
def __str__(self) -> str: ...
157140
@property
158141
def name(self) -> str: ...
159142
@property
160143
def value(self) -> int: ...
144+
SURF_UPRIGHT: "AkazeDescriptorType"
145+
SURF: "AkazeDescriptorType"
146+
MSURF_UPRIGHT: "AkazeDescriptorType"
147+
MSURF: "AkazeDescriptorType"
148+
MLDB_UPRIGHT: "AkazeDescriptorType"
149+
MLDB: "AkazeDescriptorType"
150+
__members__: Dict[str, "AkazeDescriptorType"]
151+
__entries: "dict"
161152

162153
class AkazeDiffusivityType:
163-
CHARBONNIER: typing.ClassVar[
164-
AkazeDiffusivityType
165-
] # value = <AkazeDiffusivityType.CHARBONNIER: 3>
166-
PM_G1: typing.ClassVar[
167-
AkazeDiffusivityType
168-
] # value = <AkazeDiffusivityType.PM_G1: 0>
169-
PM_G2: typing.ClassVar[
170-
AkazeDiffusivityType
171-
] # value = <AkazeDiffusivityType.PM_G2: 1>
172-
WEICKERT: typing.ClassVar[
173-
AkazeDiffusivityType
174-
] # value = <AkazeDiffusivityType.WEICKERT: 2>
175-
__members__: typing.ClassVar[
176-
dict[str, AkazeDiffusivityType]
177-
] # value = {'PM_G1': <AkazeDiffusivityType.PM_G1: 0>, 'PM_G2': <AkazeDiffusivityType.PM_G2: 1>, 'WEICKERT': <AkazeDiffusivityType.WEICKERT: 2>, 'CHARBONNIER': <AkazeDiffusivityType.CHARBONNIER: 3>}
178-
def __eq__(self, other: object) -> bool: ...
179154
def __getstate__(self) -> int: ...
180155
def __hash__(self) -> int: ...
181156
def __index__(self) -> int: ...
182-
def __init__(self, value: typing.SupportsInt | typing.SupportsIndex) -> None: ...
157+
def __init__(self, value: int) -> None: ...
183158
def __int__(self) -> int: ...
184-
def __ne__(self, other: object) -> bool: ...
185159
def __repr__(self) -> str: ...
186-
def __setstate__(
187-
self, state: typing.SupportsInt | typing.SupportsIndex
188-
) -> None: ...
160+
def __setstate__(self, state: int) -> None: ...
189161
def __str__(self) -> str: ...
190162
@property
191163
def name(self) -> str: ...
192164
@property
193165
def value(self) -> int: ...
166+
PM_G1: "AkazeDiffusivityType"
167+
PM_G2: "AkazeDiffusivityType"
168+
WEICKERT: "AkazeDiffusivityType"
169+
CHARBONNIER: "AkazeDiffusivityType"
170+
__members__: Dict[str, "AkazeDiffusivityType"]
171+
__entries: "dict"
194172

195-
def akaze(
196-
arg0: typing.Annotated[numpy.typing.ArrayLike, numpy.uint8], arg1: AKAZEOptions
197-
) -> tuple: ...
173+
class StaticExtensionLoader:
174+
pass
175+
176+
def akaze(arg0: numpy.typing.NDArray, arg1: AKAZEOptions) -> tuple: ...
198177
def compute_vlad_descriptor(
199-
arg0: typing.Annotated[numpy.typing.ArrayLike, numpy.float32, "[m, n]"],
200-
arg1: typing.Annotated[numpy.typing.ArrayLike, numpy.float32, "[m, n]"],
201-
) -> typing.Annotated[numpy.typing.NDArray[numpy.float32], "[m, 1]"]: ...
178+
arg0: numpy.typing.NDArray, arg1: numpy.typing.NDArray
179+
) -> numpy.typing.NDArray: ...
202180
def compute_vlad_distances(
203-
arg0: collections.abc.Mapping[
204-
str, typing.Annotated[numpy.typing.ArrayLike, numpy.float32, "[m, 1]"]
205-
],
181+
arg0: collections.abc.Mapping[str, numpy.typing.NDArray],
206182
arg1: str,
207183
arg2: collections.abc.Set[str],
208184
) -> tuple[list[float], list[str]]: ...
209185
def hahog(
210-
image: typing.Annotated[numpy.typing.ArrayLike, numpy.float32],
211-
peak_threshold: typing.SupportsFloat | typing.SupportsIndex = 0.003,
212-
edge_threshold: typing.SupportsFloat | typing.SupportsIndex = 10,
213-
target_num_features: typing.SupportsInt | typing.SupportsIndex = 0,
186+
image: numpy.typing.NDArray,
187+
peak_threshold: float = 0.003,
188+
edge_threshold: float = 10,
189+
target_num_features: int = 0,
214190
) -> tuple: ...
215191
def match_using_words(
216-
arg0: typing.Annotated[numpy.typing.ArrayLike, numpy.float32],
217-
arg1: typing.Annotated[numpy.typing.ArrayLike, numpy.int32],
218-
arg2: typing.Annotated[numpy.typing.ArrayLike, numpy.float32],
219-
arg3: typing.Annotated[numpy.typing.ArrayLike, numpy.int32],
220-
arg4: typing.SupportsFloat | typing.SupportsIndex,
221-
arg5: typing.SupportsInt | typing.SupportsIndex,
192+
arg0: numpy.typing.NDArray,
193+
arg1: numpy.typing.NDArray,
194+
arg2: numpy.typing.NDArray,
195+
arg3: numpy.typing.NDArray,
196+
arg4: float,
197+
arg5: int,
222198
) -> numpy.typing.NDArray[numpy.int32]: ...

0 commit comments

Comments
 (0)