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

Feat/clip annotation #45

Merged
merged 5 commits into from
Mar 15, 2024
Merged

Feat/clip annotation #45

merged 5 commits into from
Mar 15, 2024

Conversation

HonzaCuhel
Copy link
Contributor

This PR includes the following changes:

  • adding CLIP annotator for classification

@sokovninn
Copy link
Member

Have you compared clip-vit-large-patch14 and clip-vit-base-patch32?

Copy link

github-actions bot commented Mar 13, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1015 499 49% 0% 🟢

New Files

File Coverage Status
datadreamer/dataset_annotation/clip_annotator.py 52% 🟢
TOTAL 52% 🟢

Modified Files

File Coverage Status
datadreamer/dataset_annotation/init.py 100% 🟢
datadreamer/pipelines/generate_dataset_from_scratch.py 41% 🟢
TOTAL 71% 🟢

updated for commit: 5cf88ee by action🐍

Copy link

github-actions bot commented Mar 13, 2024

Test Results

  6 files    6 suites   46m 19s ⏱️
 85 tests  36 ✅  49 💤 0 ❌
510 runs  216 ✅ 294 💤 0 ❌

Results for commit 5cf88ee.

♻️ This comment has been updated with latest results.

@HonzaCuhel
Copy link
Contributor Author

No, I haven't, but I can test it.

@HonzaCuhel
Copy link
Contributor Author

I've manually compared clip-vit-large-patch14 and clip-vit-base-patch32 annotation on 100 generated images on JP using L4 GPU, I've used batch size 8 for annotation and these are the results:

Latency:

  • clip-vit-large-patch14 : 3s
  • clip-vit-base-patch32 : 1s

Comparison:

  • in 12 cases I found clip-vit-large-patch14's annotation better
  • in 7 case I found clip-vit-base-patch32's annotation better

Conclusion

Switched to using clip-vit-base-patch32 for the speed as the performance gap isn't big.

@HonzaCuhel HonzaCuhel requested a review from sokovninn March 15, 2024 13:46
Copy link
Member

@sokovninn sokovninn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good! I agree with switching to CLIP base.

@sokovninn sokovninn merged commit b2e7f1f into dev Mar 15, 2024
9 checks passed
@HonzaCuhel HonzaCuhel deleted the feat/clip-annotation branch March 16, 2024 13:05
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

Successfully merging this pull request may close these issues.

2 participants