Skip to content

Commit

Permalink
suppress errors in mapillary/opensfm
Browse files Browse the repository at this point in the history
Differential Revision: D53099888

fbshipit-source-id: 2dc5a3bf14b2e97958f394f87f8dc4fb8bc1a851
  • Loading branch information
generatedunixname89002005307016 authored and facebook-github-bot committed Jan 26, 2024
1 parent 569f6d3 commit a848b1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opensfm/multiview.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def ransac(kernel: Any, threshold: float) -> TRansacSolution:
try:
samples = kernel.sampling()
except AttributeError:
# pyre-fixme[20]: Argument `k` expected.
samples = random.sample(
range(kernel.num_samples()), kernel.required_samples
)
Expand Down Expand Up @@ -238,13 +239,16 @@ def sampling(self) -> Dict[str, Any]:
samples = {}
if len(self.vectors) > 0:
samples["points"] = self.points[
# pyre-fixme[20]: Argument `k` expected.
random.sample(range(len(self.points)), 2), :
]
samples["vectors"] = [
# pyre-fixme[20]: Argument `k` expected.
self.vectors[i] for i in random.sample(range(len(self.vectors)), 1)
]
else:
samples["points"] = self.points[
# pyre-fixme[20]: Argument `k` expected.
:, random.sample(range(len(self.points)), 3)
]
samples["vectors"] = None
Expand Down

0 comments on commit a848b1f

Please sign in to comment.