-
Notifications
You must be signed in to change notification settings - Fork 446
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
Add visual prompting task #2203
Add visual prompting task #2203
Conversation
639f4c5
to
043bb8a
Compare
e329a8f
to
0f1fc88
Compare
This comment was marked as resolved.
This comment was marked as resolved.
python package |
visual prompting seems new task like classification or anomaly tasks. Should user install otx with |
Isn't it the default package from python? If so, I think we don't need to. |
Yes, it is already used in otx. |
Yes, it is required, but I think it would be better to implement it after implementing other tasks, export, deploy, and optimize. |
I don't think so. When I use pure python, there is no |
Yes, I agree with you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your huge effort :) I left some comments although I didn't check all the files. please take a look.
otx/algorithms/visual_prompting/adapters/pytorch_lightning/config/visual_prompting_config.py
Outdated
Show resolved
Hide resolved
otx/algorithms/visual_prompting/adapters/pytorch_lightning/config/visual_prompting_config.py
Outdated
Show resolved
Hide resolved
otx/algorithms/visual_prompting/adapters/pytorch_lightning/config/visual_prompting_config.py
Show resolved
Hide resolved
otx/algorithms/visual_prompting/adapters/pytorch_lightning/config/visual_prompting_config.py
Outdated
Show resolved
Hide resolved
otx/algorithms/visual_prompting/adapters/pytorch_lightning/datasets/dataset.py
Outdated
Show resolved
Hide resolved
otx/algorithms/visual_prompting/adapters/pytorch_lightning/datasets/dataset.py
Show resolved
Hide resolved
otx/algorithms/visual_prompting/adapters/pytorch_lightning/models/decoders/sam_mask_decoder.py
Outdated
Show resolved
Hide resolved
I'll consider it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM, I left a few comments.
otx/algorithms/visual_prompting/adapters/pytorch_lightning/datasets/dataset.py
Show resolved
Hide resolved
otx/algorithms/visual_prompting/configs/sam_vit_b/template.yaml
Outdated
Show resolved
Hide resolved
otx/algorithms/visual_prompting/configs/sam_vit_b/template.yaml
Outdated
Show resolved
Hide resolved
a70c521
to
84c8e16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Please clean commits, when you merge this PR
Summary
This PR is to add visual prompting task (reference paper: https://arxiv.org/abs/2304.12306).
This PR includes train and eval tasks, and others (deploy, export, ...) will be proceeded in the next PRs.
TODOs
VisualPromptingDatasetAdapter
DetectionDatasetAdapter
handles only images as inputs and others as annotations. It is required to create a new dataset adapter that can handle multiple inputs for visual prompting task.otx eval
,with_empty_annotations()
is applied and inputs of visual prompting but assigned as annotations are removed.training_extensions/otx/cli/tools/eval.py
Lines 135 to 138 in 6b045da
How to test
Unit tests (local execution)
otx/algorithms/visual_prompting/utils/visual_prompting_utils.py
will be implemented if needed.Integration test (local execution)
$ tox -vv -e tests-all-py310 -- tests/integration/cli/visual_prompting ================== 6 passed, 1 warning in 3278.82s (0:54:38) ===================
Checklist
License
Feel free to contact the maintainers if that's a concern.