-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support frame selection when create from video #437
Conversation
@zliang7 , thank you for the merge request. I hope today we will merge updated documentation. After that I will create a new release for CVAT. After that I will review and merge your PR. Please expect delays because we have a lot of public holidays in Russia. I will try to review the patch ASAP in any case. |
@zliang7 , Could you please look at comments from Boris Sekachev? My comments below:
|
I've tried to reuse the fields in Video table. But it seems every parameter in POST request needs a field in task table. If I didn't add these fields, the request failed.
This PR is to implement the 'step' feature. You can see the generation of the command line of ffmepg, nothing else. I think supporting sophisticated filter is not an easy task, especially "frames which contain a car". How to express it on UI and internal data structure? I think this needs a serious design.
I'm not quite understand. A video is a file contains many continuous images. It make sense to pick necessary images. But image files already are files, so why put those unnecessary image files into "share"? Many file utilities can do the task. I'm OK if you do think it make sense. |
@zliang7 ,
I don't understand the statement. We don't need to have duplicated fields. Please keep them in Task table only and remove from Video table.
In UI now it should be just a string. For now you need to implement
I can say that for a video file there are a lot of utilities which can convert them to a number of frames with a specific step (like ffmpeg). But we want to implement the functionality because our customers don't want to do that manually. The same for images. Of course you can manually filter them, create another directory, put all matched files into the new directory but again it is a lot of manual work. I believe in unification. If we have a feature A which is applicable for a video file and it makes sense for images as well (especially if you think about filters) I don't understand why we should implement the feature only for a video file. |
@nmanovic I removed the 'start_frame', 'stop_frame' and 'step' fields from video table, and changed 'step' in task table to 'frame_filter' which accept 'step=N' format parameter. |
@zliang7 , Again, thanks for your patience. The patch looks much better. I have found a couple of problems which should be fixed before the merge. It is normal because CVAT is quite complex software and it is very difficult for a new developer to find a correct way to implement a feature. This is why I'm here and try to advice. I don't really think that we need to hurry. I'm OK to commit the functionality in two steps but I don't see any reasons for that. I believe it is very easy to extend your patch on the image case. Should be a couple of lines of code. |
1885922
to
73cb93f
Compare
@nmanovic I'm back and I updated the PR as per your comments. |
@zliang7 , need to add information about the feature into CHANGELOG.md as well. |
The change is in apps/engine/annotation.py. Here is an example of "Dump Annotation":
|
Updated. |
@zliang7 , thanks! It is a great patch. I hope we have to do only one final step. I asked you provide me an example of a dump file to be sure that you dumped the following frames: 0, 200, 400, .... Could you please confirm that? Could you please annotate a couple of frames and provide the dump file again? I just cannot see the code in your patch. As we discussed we need to dump right frames number instead of 0, 1, 2, ... in this case. |
Updated the PR. A dump 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.
@zliang7 , It looks good to me. Thanks for the contribution. It was first and it was difficult but the final result is awesome. I was able to create a task with step 10, annotate it and load the annotation into a task with step 1. It works as expected (at least I was not able to see artefacts).
@nmanovic PTAL