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

Video single frame annotation #1019

Merged
merged 17 commits into from
Feb 12, 2025
Merged

Video single frame annotation #1019

merged 17 commits into from
Feb 12, 2025

Conversation

aneust
Copy link
Contributor

@aneust aneust commented Dec 19, 2024

Add a settings option to the video annotation tool to automatically finish new annotations after the first frame

  • Add button to settings
  • Add description in manual
  • Disabled "Finish" and "Track Annotation" control buttons, when option is activated
  • Prevented double-click behavior for point annotations

closes #786

@aneust aneust marked this pull request as ready for review December 19, 2024 20:54
@aneust aneust requested a review from lehecht December 19, 2024 20:54
@aneust aneust closed this Dec 25, 2024
@mzur
Copy link
Member

mzur commented Jan 6, 2025

@aneust Was this closed on purpose?

@aneust
Copy link
Contributor Author

aneust commented Jan 6, 2025

@mzur Closed on purpose, Leane found some strange behavior I first could not reproduce. Think now it was caused by the settings.

@mzur
Copy link
Member

mzur commented Jan 6, 2025

Ok, thanks. You could also keep this as a Draft PR while you keep working on the issue.

@aneust aneust reopened this Jan 7, 2025
@aneust aneust removed the request for review from lehecht January 7, 2025 09:33
@lehecht
Copy link
Contributor

lehecht commented Jan 14, 2025

Regarding the issue with the sketch lines:
The sketch lines don't disappear, because finishDrawAnnotation is called before the annotation could be completely added to this.pendingAnnotationSource. You need to use this.pendingAnnotationSource.once('addfeature', this.finishDrawAnnotation); here. It calls finishDrawAnnotation after the annotation was added to that source.
I hope it helps. If there is still or another problem, let me know!

@aneust
Copy link
Contributor Author

aneust commented Jan 14, 2025

@lehecht Thanks, that was helpful!

@aneust aneust requested a review from lehecht January 14, 2025 14:37
@aneust aneust requested a review from lehecht January 28, 2025 15:06
- update computed properties for better readability
@aneust aneust requested a review from lehecht January 30, 2025 16:28
Copy link
Contributor

@lehecht lehecht left a comment

Choose a reason for hiding this comment

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

Looks good to me now. Please request a review from @mzur.

@mzur mzur self-requested a review January 31, 2025 10:49
@mzur
Copy link
Member

mzur commented Jan 31, 2025

I saw the mention and self-requested the review 😉 @lehecht You can also request the review from me when you are done.

Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

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

Two comments about the UI:

  • The setting doesn't affect whole-frame annotations but it should.

  • To be more user-friendly, the "finish annotation" and "track annotation" buttons (which are disabled) could get titles like "Disable the single-frame annotation option to create multi-frame annotations" ("Disable the single-frame annotation option to track annotations"). This way users are reminded of what to do if they want to use the buttons again. You could implement this with v-if showing a completely different set of buttons which are always disabled and have the new title.

Otherwise it works great. See some comments about the code below.

@aneust aneust requested a review from mzur February 5, 2025 14:55
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

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

While the setting now affects whole frame annotations, I can't create these any more. The tool is activated but I no longer have a way to "finish" it. When the setting is activated, the whole frame annotation should be immediately created when the button is clicked.

Apart from that, only minor comments are left.

@aneust aneust requested a review from mzur February 10, 2025 09:15
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

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

One last general comment:

When the new settings option is active, the title text of the buttons still reads "Start a point annotation", "Start a rectangle annotation", etc. It should change to something similar to the image annotation tool ("Set a point", "Draw a rectangle", ...).

@aneust aneust requested a review from mzur February 12, 2025 11:57
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

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

All good now, thanks!

@mzur mzur merged commit b03aabf into master Feb 12, 2025
6 checks passed
@mzur mzur deleted the videoAnnotation branch February 12, 2025 12:29
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.

Settings option to create single-frame video annotations by default
3 participants