Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible indentation error #2350

Closed
ariG23498 opened this issue Feb 15, 2024 · 4 comments · Fixed by #2360
Closed

Possible indentation error #2350

ariG23498 opened this issue Feb 15, 2024 · 4 comments · Fixed by #2360
Assignees
Labels
type:Bug Something isn't working

Comments

@ariG23498
Copy link
Contributor

With the following code it seems that the first roi would return the regions.

If this is correct, I would send in a PR for this fix.

@ariG23498
Copy link
Contributor Author

I wanted to report another issue in this thread.

Using the

feature_map = tf.random.normal([2, 16, 16, 512])
roi_pooler = ROIPooler(
    bounding_box_format="yxyx", target_size=[7, 7], image_shape=[224, 224, 3]
)
rois = tf.constant(
    [
        [[15.0, 30.0, 25.0, 45.0], [16.0, 31.0, 26.0, 46.0]],
        [[22.0, 1.0, 30.0, 32.0], [23.0, 2.0, 31.0, 33.0]],
    ],
)
print(f"{feature_map.shape=}")
print(f"{rois.shape=}")
pooled_feature_map = roi_pooler(feature_map, rois)
print(f"{pooled_feature_map.shape=}")

# feature_map.shape=TensorShape([2, 16, 16, 512])
# rois.shape=TensorShape([2, 2, 4])
# pooled_feature_map.shape=TensorShape([2, 7, 7, 512])

Notice how the pooled_feature_map.shape does not conside the number of rois.

GitHub Gist

CC: @divyashreepathihalli

This issue directly affects the #2295

@divyashreepathihalli
Copy link
Collaborator

Looks like a bug, do you have a fix PR?

@ariG23498
Copy link
Contributor Author

Unfortunately I do not.

@divyashreepathihalli
Copy link
Collaborator

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants