-
Notifications
You must be signed in to change notification settings - Fork 100
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
Provide a code snippet for extracting annotations #132
Comments
here's an example pseudo-code snippet (unverified). Please give this a try and let me know how it goes :) First, from annotator.models import Video
for video in Video.objects.all(): # or Video.objects.filter( ... )
print(video.annotation) |
Thank you for a quick response, |
Yes, it's linear interpolation. There's currently no backend tool to do this, but it shouldn't be too difficult. You can look at the frontend javascript interpolation code for reference. |
And few why questions: |
I have a plan to make simple script to exctract annotations. Is it a good idea to add it to your repo? |
Rounding both of these should probably be just fine, but there wasn't a reason to round. And yeah, happy to merge a script |
I have included two methods of downloading video annotations below that would be in a script included in the The first method assumes that the server is running locally and just queries the same endpoints that the front end queries for annotations so the video id's must be specified manually.
The second method actually sets up the django environment and queries the Video django model objects themselves and can use the built in django filters to filter objects based on properties. Method assumes that code is being run at
Example code will be commented step by step with more detail and committed but a more long term solution will be a custom admin action to download selected videos in the admin interface. |
Hi everyone, I've created a new command to export annotations from BeaverDam in a fork of mine. https://github.com/cheind/BeaverDam Command implementation can be found here https://github.com/cheind/BeaverDam/blob/master/annotator/management/commands/export_annotations.py It supports sparse / dense annotations and writes files in standard JSON format (dense annotations will have a new JSON field named Type A simple annotation viewer using OpenCV can be found here @antingshen would be happy to file a PR if desired. |
Yeah happy to merge it |
Now it seem almost impossible to understand how get annotations.
Please explain how do this, because #131 doesn't help
If it will be usefull, someone (or I) can make an PR with something like button 'export annotations'.
Thank you in andvance!
The text was updated successfully, but these errors were encountered: