Determine `donwsample_img` automatically
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start at download_parallel_dataset and inspect how downsample_ref, downsample_img, image shape, and API metadata are handled for image id 101349501. Evaluate the proposed integer formula against refspace_shape and the download API's supported maximum; done means downsample_img is inferred safely while avoiding synchronization artifacts and unsupported values.
Written by the indexing model from the issue text.
Description
In download_parallel_dataset one can specify both the downsample_ref and downsample_img manually. However,
it might be very useful to imply a reasonable downsample_img from the selected downsample_ref and the resolution of a given image (can be found in the API metadata).
Intuitively, the following should be true to avoid artifacts in the synchronized image
img_shape / (2 ** downsample_img) > refspace_shape / downsample_ref
At the same time, we want the downsample_img to be as large as possible to make the download fast + avoid wasting disk space.
So specifically let's take a section image id = 101349501. It comes from a coronal dataset and has a shape of (4344, 5096). As usually, we set downsample_ref to 25.
Therefore
refspace_shape = (8000, 11400)
downsample_ref = 25
img_shape = (4344, 5096)
downsample_img = x # we want to solve for this and it must be an integer
Just using the above unequality one proposition could be
downsample_img < log_2((min(img_shape) * downsample_ref) / max(refspace_shape)))
So the below formula could work?
int(np.log2((min(img_shape) * downsample_ref) / max(refspace_shape)))
3
I checked the synchronized image and there seem to be no artifacts.
Finally, we should be also careful about downsample_img being too high because the image download API does not support high values.
- Dominant language
- Python
- Stars
- 17
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BlueBrain/Atlas-Download-Tools
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Some RMA queries never return all resultsMay be free again @Stannislav claimed this 1755 days ago, and no pull request is open. Open
BlueBrain/Atlas-Download-Tools#98 · 1 assignee ·
-
Add the "downloads faithful dataset" CLI commandMay be free again @Stannislav claimed this 1791 days ago, and no pull request is open. Open
BlueBrain/Atlas-Download-Tools#95 · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
BlueBrain/Atlas-Download-Tools#93 · 1 reaction ·
All issues in BlueBrain/Atlas-Download-Tools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kornia/kornia#5263 · 1 comment ·
Maintainers usually reply within 1 day
-
approved correction metadata
Difficulty 1/5 Under an hour Newbie friendliness 88/100
acl-org/acl-anthology#10133 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BasedHardware/omi#20084 ·
Maintainers usually reply within 1 day
-
bug needs-acceptance wg/evaluation-quality
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vllm-project/semantic-router#4424 ·
Maintainers usually reply within 1 day