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

open vocabulary object detection in the wild #40

Open
meidachen opened this issue Aug 31, 2023 · 0 comments
Open

open vocabulary object detection in the wild #40

meidachen opened this issue Aug 31, 2023 · 0 comments

Comments

@meidachen
Copy link

First, thanks a lot for the great work! Congratulations on your achievements on different challenges!
I'm trying to use your pre-trained model to do open vocabulary object detection in the wild kind of task, by simply providing an image and giving some arbitrary vocabulary (e.g., house, car, tree, light pole, fence, etc.) and hopping to do an object detection on the given image. I'm unsure if I understand your work's capability correctly and if this is a suitable task. I tried to naively change the following code in the demo script to hard code the object classes.

if test_categories is not None:

to:

        test_categories = [{'color': [220, 20, 60], 'isthing': 1, 'id': 1, 'name': 'ground'}, {'color': [119, 11, 32], 'isthing': 1, 'id': 2, 'name': 'house'}, {'color': [0, 0, 142], 'isthing': 1, 'id': 3, 'name': 'tree'}, {'color': [0, 0, 230], 'isthing': 1, 'id': 4, 'name': 'car'}, {'color': [106, 0, 228], 'isthing': 1, 'id': 5, 'name': 'light pole'},{'color': [106, 0, 228], 'isthing': 1, 'id': 6, 'name': 'fence'}]
        # test_categories = None
        if test_categories is not None:
            prompt_test, positive_map_label_to_token = create_queries_and_maps(test_categories, self.tokenizer) # for example, test_categories = [{"name": "person"}]
            self.prompt_test_dict["xxx"] = prompt_test
            self.positive_map_label_to_token_dict["xxx"] = positive_map_label_to_token

But when testing on different images, it seems like only the cars can be detected and the other objects can not. Could you please help me with this?

Thank you in advance!

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

1 participant