-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Plots: Add the bounding boxes informations in the dvc plots diff
command so that VScode can display them.
#10312
Conversation
@AlexandreKempf I guess the tests are still WIP? |
dvc/repo/plots/__init__.py
Outdated
if ImageRenderer.matches(path) and annotation_file in target["data"]: | ||
annotations = {"annotations": annotation_file} | ||
# empty dict all share the same reference, so override them | ||
if target["data"][path]: | ||
target["data"][path].update({"annotations": annotation_file}) | ||
else: | ||
target["data"][path] = annotations | ||
path_to_remove.append(annotation_file) |
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.
Can you explain a bit what's happening here?
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.
Let me know if it is clear now ;)
Needs tests |
bdd4885
to
b0c4496
Compare
Hey @mattseddon. Could you please take a look at this PR (and maybe takeover)? |
…y bbox on images Fixes #10198
for more information, see https://pre-commit.ci
Co-authored-by: Dave Berenbaum <[email protected]>
33c16ae
to
7b5a55a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10312 +/- ##
==========================================
- Coverage 90.63% 90.58% -0.06%
==========================================
Files 500 500
Lines 38626 38675 +49
Branches 5584 5594 +10
==========================================
+ Hits 35010 35034 +24
- Misses 2971 2991 +20
- Partials 645 650 +5 ☔ View full report in Codecov by Sentry. |
will get back to this later |
Works with this DVClive PR and this VSCode PR.
DVClive is responsible for saving JSON annotation files. The annotations files have the same path as the image they match, but ends with
.json
.Example:
Or for
step
images:The JSON files have this format:
After the
dvc plots diff --split --json
the expected output is to have the annotations alongside the imageFixes #10198
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏