lovell / lovell/sharp

attention_x and attention_y give wrong values in some cases when image is resized

Open
#3,675 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
JavaScript
Stars
32.7k
Forks
1.4k
Avg merge
1d 14h
Merged PRs (30d)
5

Description

This bug report is regarding the attention_x and attention_y output params introduced in #3470.

The output given for attention_x and attention_y is incorrect when the image is resized. My assumption is that two-stage resizing is not handled correctly, specifically here.

I find the resizing code in pipeline.cc very hard to follow - @lovell do you have any advice on this by chance?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading pipeline.cc around line 484, where the report suspects two-stage resizing mishandles attention_x and attention_y. Reproduce the incorrect outputs with resized images, trace the resizing calculations, and verify that both output parameters remain correct after the fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript, node.js
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.