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'
Loading...
Searching...
No Matches
Classes | Functions
msecnn_raulkviana.custom_dataset Namespace Reference

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.
 

Detailed Description

@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

Function Documentation

◆ bgr2yuv()

msecnn_raulkviana.custom_dataset.bgr2yuv (   matrix)

Converts BGR matrix to YUV matrix.

Parameters
[in]matrixBGR matrix
[out]YUVYUV conversion

◆ get_cu()

msecnn_raulkviana.custom_dataset.get_cu (   f_path,
  f_size,
  cu_pos,
  cu_size,
  frame_number 
)

Get CU from image.

Parameters
[in]f_pathPath of file to get the CU from
[in]f_sizeYUV file dimensions (height, width)
[in]cu_posTuple with the position of the CU (y position (height), x position (width))
[in]cu_sizeTuple with the size of the CU (y position (height), x position (width))
[in]frame_numberNumber of the frame containing the CU
[out]CUCU with all the information from all the components(Luminance and Chroma)
[out]CU_YCU with the Luminance component
[out]CU_UCU with the Chroma (Blue) component
[out]CU_VCU with the Chroma (Red) component
[out]frame_CUspecified frame that contains the CU

◆ get_cu_v2()

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.

Parameters
[in]imgImage in YUV420 format
[in]f_sizeYUV image dimensions (height, width)
[in]cu_posTuple with the position of the CU (y position (height), x position (width))
[in]cu_sizeTuple with the size of the CU (y position (height), x position (width))
[out]CUCU with all the information from all the components(Luminance and Chroma)
[out]CU_YCU with the Luminance component
[out]CU_UCU with the Chroma (Blue) component
[out]CU_VCU with the Chroma (Red) component
[out]frame_CUspecified frame that contains the CU

◆ get_file_size()

msecnn_raulkviana.custom_dataset.get_file_size (   name)

Retrieves information about the YUV file info (width and height)

Parameters
[in]nameName of the file where the file is located
[out]file_infoDictionary with information about the yuv file

◆ resize()

msecnn_raulkviana.custom_dataset.resize (   img,
  scale_percent 
)

Resizes a BGR image.

◆ show_all_CUs()

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.

◆ show_CU()

msecnn_raulkviana.custom_dataset.show_CU (   image,
  cu_size,
  cu_pos 
)

Shows CU in a image.

◆ yuv2bgr()

msecnn_raulkviana.custom_dataset.yuv2bgr (   matrix)

Converts yuv matrix to bgr matrix.

Parameters
[in]matrixYuv matrix
[out]bgrBgr conversion