-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix two problems with the task segmentation algorithm
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.
- Loading branch information
Showing
2 changed files
with
67 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters