-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Redundant jobs created in task when segment_size is explicitly set #7675
Labels
bug
Something isn't working
Comments
5 tasks
SpecLad
added a commit
that referenced
this issue
Mar 26, 2024
1. When a task has non-zero overlap and exactly as many frames as needed to create 1 or more complete segments, the current algorithm generates a redundant segment at the end. For example, if size is 5, segment size is 3, and overlap is 1, it generates segments (0, 2), (2, 4), and (4, 4). The algorithm attempts to compensate for this, but it only works in the case where the segment size is unspecified (and defaults to the total size). Update the algorithm to handle this correctly in the general case. 2. The algorithm selects a default overlap size of 5 if the media file is a video. However, this might not be a valid value if the task has a very small segment size. In this case, a range of undesirable behaviors may occur, depending on the segment size: * segments getting generated such that more than 2 segments cover a single frame; * task creation crashing with an exception; * a task being created with no segments at all. Fix this by clamping the default overlap size the same way as a user-specified one. Fixes #7675.
g-kartik
pushed a commit
to g-kartik/cvat
that referenced
this issue
Mar 29, 2024
1. When a task has non-zero overlap and exactly as many frames as needed to create 1 or more complete segments, the current algorithm generates a redundant segment at the end. For example, if size is 5, segment size is 3, and overlap is 1, it generates segments (0, 2), (2, 4), and (4, 4). The algorithm attempts to compensate for this, but it only works in the case where the segment size is unspecified (and defaults to the total size). Update the algorithm to handle this correctly in the general case. 2. The algorithm selects a default overlap size of 5 if the media file is a video. However, this might not be a valid value if the task has a very small segment size. In this case, a range of undesirable behaviors may occur, depending on the segment size: * segments getting generated such that more than 2 segments cover a single frame; * task creation crashing with an exception; * a task being created with no segments at all. Fix this by clamping the default overlap size the same way as a user-specified one. Fixes cvat-ai#7675.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actions before raising this issue
Steps to Reproduce
Create a task with the following parameters:
This creates two jobs: one with frames 0-738, another with frames 734-738. The second job is completely redundant, since all frames in it are also in the first job.
Expected Behavior
Only the first job should be created.
Possible Solution
No response
Context
This happens if you already have a video task that was created without explicitly specifying a segment size, and you try to create a new task programmatically by copying parameters from the old task.
Environment
The text was updated successfully, but these errors were encountered: