-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed "prepare data on the fly" functionality (#2217)
* Added ability to upload meta information with video & some fixes * Added documentation for data on the fly preparation * Added ability to prepare meta information for video manually * fix * style: fix codacy issues * Refactoring * docs: add optional parameter * Add test * Add license header * Update CHANGELOG Co-authored-by: Boris Sekachev <[email protected]>
- Loading branch information
1 parent
e9552f8
commit 072482f
Showing
11 changed files
with
292 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Data preparation on the fly | ||
|
||
## Description | ||
Data on the fly processing is a way of working with data, the main idea of which is as follows: | ||
Minimum necessary meta information is collected, when task is created. | ||
This meta information allows in the future to create a necessary chunks when receiving a request from a client. | ||
|
||
Generated chunks are stored in a cache of limited size with a policy of evicting less popular items. | ||
|
||
When a request received from a client, the required chunk is searched for in the cache. | ||
If the chunk does not exist yet, it is created using a prepared meta information and then put into the cache. | ||
|
||
This method of working with data allows: | ||
- reduce the task creation time. | ||
- store data in a cache of limited size with a policy of evicting less popular items. | ||
|
||
## Prepare meta information | ||
Different meta information is collected for different types of uploaded data. | ||
### Video | ||
For video, this is a valid mapping of key frame numbers and their timestamps. This information is saved to `meta_info.txt`. | ||
|
||
Unfortunately, this method will not work for all videos with valid meta information. | ||
If there are not enough keyframes in the video for smooth video decoding, the task will be created in the old way. | ||
|
||
#### Uploading meta information along with data | ||
|
||
When creating a task, you can upload a file with meta information along with the video, | ||
which will further reduce the time for creating a task. | ||
You can see how to prepare meta information [here](/utils/prepare_meta_information/README.md). | ||
|
||
It is worth noting that the generated file also contains information about the number of frames in the video at the end. | ||
|
||
### Images | ||
Mapping of chunk number and paths to images that should enter the chunk | ||
is saved at the time of creating a task in a files `dummy_{chunk_number}.txt` |
Binary file not shown.
Binary file added
BIN
+37.9 KB
cvat/apps/documentation/static/documentation/images/image128_use_cache.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Oops, something went wrong.