MSE-CNN Implementation 1
Code database with the implementation of MSE-CNN, from the paper 'DeepQTMT: A Deep Learning Approach for Fast QTMT-based CU Partition of Intra-mode VVC'
|
Classes | |
class | CUDatasetBase |
Dataset stage oriented with capability of loading different files and it's supposed to be used with the function dataset_utils.change_labels_function_again. More... | |
class | CUDatasetStg2Compl |
class | CUDatasetStg3Compl |
class | CUDatasetStg4Compl |
Dataset stage oriented with capability of loading different files and it's supposed to be used with the function dataset_utils.change_labels_function_again. More... | |
class | CUDatasetStg5Compl |
Dataset stage oriented with capability of loading different files and it's supposed to be used with the function dataset_utils.change_labels_function_again. More... | |
class | CUDatasetStg6Compl |
Dataset stage oriented with capability of loading different files and it's supposed to be used with the function dataset_utils.change_labels_function_again. More... | |
class | SamplerStg4 |
class | SamplerStg5 |
class | SamplerStg6 |
Functions | |
yuv2bgr (matrix) | |
Converts yuv matrix to bgr matrix. | |
bgr2yuv (matrix) | |
Converts BGR matrix to YUV matrix. | |
get_cu (f_path, f_size, cu_pos, cu_size, frame_number) | |
Get CU from image. | |
get_cu_v2 (img, f_size, cu_pos, cu_size) | |
Get CU from image. | |
get_file_size (name) | |
Retrieves information about the YUV file info (width and height) | |
resize (img, scale_percent) | |
Resizes a BGR image. | |
show_CU (image, cu_size, cu_pos) | |
Shows CU in a image. | |
show_all_CUs (CUDataset, file_name, POC, cu_size) | |
Shows all CUs in a image with a specific size, TO BE USED WITH THE CU ORIENTE LABELS. | |
@package docstring @file CustomDataset.py @brief This library contains usefull functions to visualise data and also Classes to store and organise data structures. @section libraries_CustomDataset Libraries - torch - numpy - dataset_utils - cv2 - torch.utils.data - random - re @section classes_CustomDataset Classes - CUDatasetBase - CUDatasetStg2Compl - CUDatasetStg3Compl - CUDatasetStg4Compl - CUDatasetStg5Compl - CUDatasetStg6Compl - SamplerStg6 - SamplerStg5 - SamplerStg4 @section functions_CustomDataset Functions - yuv2bgr(matrix) - bgr2yuv(matrix) - get_cu(f_path, f_size, cu_pos, cu_size, frame_number) - get_file_size(name) - resize(img, scale_percent) - show_CU(image, cu_size, cu_pos) - show_all_CUs(CUDataset, file_name, POC, cu_size) @section global_vars_CustomDataset Global Variables - None @section todo_CustomDataset TODO - None @section license License MIT License Copyright (c) 2022 Raul Kevin do Espirito Santo Viana Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @section author_CustomDataset Author(s) - Created by Raul Kevin Viana - Last time modified is 2023-01-29 22:22:04.113134
msecnn_raulkviana.custom_dataset.bgr2yuv | ( | matrix | ) |
Converts BGR matrix to YUV matrix.
[in] | matrix | BGR matrix |
[out] | YUV | YUV conversion |
msecnn_raulkviana.custom_dataset.get_cu | ( | f_path, | |
f_size, | |||
cu_pos, | |||
cu_size, | |||
frame_number | |||
) |
Get CU from image.
[in] | f_path | Path of file to get the CU from |
[in] | f_size | YUV file dimensions (height, width) |
[in] | cu_pos | Tuple with the position of the CU (y position (height), x position (width)) |
[in] | cu_size | Tuple with the size of the CU (y position (height), x position (width)) |
[in] | frame_number | Number of the frame containing the CU |
[out] | CU | CU with all the information from all the components(Luminance and Chroma) |
[out] | CU_Y | CU with the Luminance component |
[out] | CU_U | CU with the Chroma (Blue) component |
[out] | CU_V | CU with the Chroma (Red) component |
[out] | frame_CU | specified frame that contains the CU |
msecnn_raulkviana.custom_dataset.get_cu_v2 | ( | img, | |
f_size, | |||
cu_pos, | |||
cu_size | |||
) |
Get CU from image.
In this version, an YUV420 image is passed instead of a path.
[in] | img | Image in YUV420 format |
[in] | f_size | YUV image dimensions (height, width) |
[in] | cu_pos | Tuple with the position of the CU (y position (height), x position (width)) |
[in] | cu_size | Tuple with the size of the CU (y position (height), x position (width)) |
[out] | CU | CU with all the information from all the components(Luminance and Chroma) |
[out] | CU_Y | CU with the Luminance component |
[out] | CU_U | CU with the Chroma (Blue) component |
[out] | CU_V | CU with the Chroma (Red) component |
[out] | frame_CU | specified frame that contains the CU |
msecnn_raulkviana.custom_dataset.get_file_size | ( | name | ) |
Retrieves information about the YUV file info (width and height)
[in] | name | Name of the file where the file is located |
[out] | file_info | Dictionary with information about the yuv file |
msecnn_raulkviana.custom_dataset.resize | ( | img, | |
scale_percent | |||
) |
Resizes a BGR image.
msecnn_raulkviana.custom_dataset.show_all_CUs | ( | CUDataset, | |
file_name, | |||
POC, | |||
cu_size | |||
) |
Shows all CUs in a image with a specific size, TO BE USED WITH THE CU ORIENTE LABELS.
msecnn_raulkviana.custom_dataset.show_CU | ( | image, | |
cu_size, | |||
cu_pos | |||
) |
Shows CU in a image.
msecnn_raulkviana.custom_dataset.yuv2bgr | ( | matrix | ) |
Converts yuv matrix to bgr matrix.
[in] | matrix | Yuv matrix |
[out] | bgr | Bgr conversion |