borglab / borglab/gtsfm

Indexing out of bounds for Palace of Fine Arts

Open
#465 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
524
Forks
64
Avg merge
4h 1m
Merged PRs (30d)
3

Description

Very rarely (but sometimes), we get an indexing out of bounds issue for (sift_front_end, palace-fine-arts-281, 25, jpg, wget, olsson-loader, 320, true)

[Benchmark (sift_front_end, palace-fine-arts-281, 25, jpg, wget, olsson-loader, 320, true)](https://github.com/borglab/gtsfm/runs/5233761405?check_suite_focus=true#logs)

This suggests some indexing is incorrect:
```python
[2022-02-17 15:37:07,505 INFO loader_base.py line 158 4819] Image 256 resized from (H,W)=(1296,1936) -> (320,478)
Traceback (most recent call last):
File "gtsfm/runner/run_scene_optimizer_olssonloader.py", line 41, in
runner.run()
File "/home/runner/work/gtsfm/gtsfm/gtsfm/runner/gtsfm_runner_base.py", line 106, in run
sfm_result = sfm_result_graph.compute()
File "/usr/share/miniconda3/envs/gtsfm-v1/lib/python3.8/site-packages/dask/base.py", line 290, in compute
(result,) = compute(self, traverse=False, **kwargs)
File "/usr/share/miniconda3/envs/gtsfm-v1/lib/python3.8/site-packages/dask/base.py", line 573, in compute
results = schedule(dsk, keys, **kwargs)
File "/usr/share/miniconda3/envs/gtsfm-v1/lib/python3.8/site-packages/distributed/client.py", line 2994, in get
results = self.gather(packed, asynchronous=asynchronous, direct=direct)
File "/usr/share/miniconda3/envs/gtsfm-v1/lib/python3.8/site-packages/distributed/client.py", line 2146, in gather
return self.sync(
File "/usr/share/miniconda3/envs/gtsfm-v1/lib/python3.8/site-packages/distributed/utils.py", line 309, in sync
return sync(
File "/usr/share/miniconda3/envs/gtsfm-v1/lib/python3.8/site-packages/distributed/utils.py", line 376, in sync
raise exc.with_traceback(tb)
File "/usr/share/miniconda3/envs/gtsfm-v1/lib/python3.8/site-packages/distributed/utils.py", line 349, in f
result = yield future
File "/usr/share/miniconda3/envs/gtsfm-v1/lib/python3.8/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/usr/share/miniconda3/envs/gtsfm-v1/lib/python3.8/site-packages/distributed/client.py", line 2009, in _gather
raise exception.with_traceback(traceback)
File "/home/runner/work/gtsfm/gtsfm/gtsfm/frontend/verifier/ransac.py", line 100, in verify
uv_norm_i1[match_indices[:, 0]],
IndexError: index 1087 is out of bounds for axis 0 with size 1086
Error: Process completed with exit code 1.
```

Contributor guide

Open the contributing guide

Research direction

Start with gtsfm/frontend/verifier/ransac.py at verify(), where match_indices indexes uv_norm_i1, then reproduce the Palace of Fine Arts benchmark from the linked run. Trace why match_indices can contain 1087 while uv_norm_i1 has size 1086. Done means the intermittent indexing error no longer occurs and the benchmark completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.