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

Forward all image objects at once instead of single object #74

Open
chamecall opened this issue Feb 12, 2021 · 1 comment
Open

Forward all image objects at once instead of single object #74

chamecall opened this issue Feb 12, 2021 · 1 comment

Comments

@chamecall
Copy link

Hi there.
I'd like to know why forward only one object from an image at once?
Doesn't it wrong cause it penalizes another true detected objects which is not in your targets?

For example I have an image with a 15 objects.
Now we forward every time with only one object like that:
target = [{'boxes': torch.tensor([[345, 191, 369, 204]]), 'labels': ['cat']}]

Why we cannot construct a target for all objects in the image like this?

target = [{
    'boxes': torch.tensor([[154.1306, 209.2777, 175.7699, 220.8761],
            [400.9026,  75.6102, 435.0026,  97.2690],
            [300.3522,  77.9024, 342.0962,  99.5374],
            [100.9261,  91.8649, 136.6947, 116.0395],
            [490.7898, 212.4188, 511.1520, 225.7012],
            [120.4079, 151.2391, 141.3405, 164.4484],
            [518.1366, 124.5545, 538.5353, 138.7017],
            [226.5043,  89.2378, 259.0278, 114.6481],
            [ 93.8250, 242.2077, 117.7525, 254.9148],
            [277.7056, 157.6328, 299.1886, 169.3138],
            [345.6203, 191.2927, 370.4335, 204.7901],
            [418.2974, 117.0767, 437.9148, 129.0135],
            [ 77.0144, 148.9221,  93.8439, 159.8789],
            [ 51.7220, 280.8792,  71.1462, 291.9274],
            [534.0248, 230.2854, 554.2579, 237.8878]]),
    'labels': ['cat'] * 15
}]

Thankx in advance.

@chamecall chamecall changed the title Whole image objects train forward at once instead of single object Forward all image objects at once instead of single object Feb 12, 2021
@alankbi
Copy link
Owner

alankbi commented Feb 12, 2021

Could you clarify the code or situation in which this happens?

If you're using the core.Dataset class I think it should have been fixed in PR #62 and release v1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants