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

I found that in sg2im/sg2im/data/vg.py per image maybe have different numbers of objects? #22

Open
alice-cool opened this issue Dec 14, 2020 · 4 comments

Comments

@alice-cool
Copy link

I found that in sg2im/sg2im/data/vg.py per image maybe have different numbers of objects?

@jcjohnson
Copy link
Collaborator

Yes, the number of objects can vary from image to image.

@alice-cool
Copy link
Author

Thanks for your timely reply.

    if len(obj_idxs) < self.max_objects - 1 and self.use_orphaned_objects:
      num_to_add = self.max_objects - 1 - len(obj_idxs)
      num_to_add = min(num_to_add, len(obj_idxs_without_rels))
      obj_idxs += random.sample(obj_idxs_without_rels, num_to_add)
    O = len(obj_idxs) + 1

And In the last training, different numbers of object don't impact the scene layout generation. I always think the fixed number of per image can be trained in end-to-end. Thanks for your share

@jcjohnson
Copy link
Collaborator

Sorry, I don't understand your question?

@alice-cool
Copy link
Author

alice-cool commented Dec 14, 2020

Dear scholar,
I want to say I always think the fixed numbers of objects per image (such as 10, if it isn't up to 10,then pad more empty object to meet the fixed number) can be trained in end-to-end. When seeing your code, I found it doesn't need fixed numbers as longas it is lower than 10(max_number_object), It also can form the scene layout and be trained end-to-end.

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