This is trivial set of scripts which process input videos and create report about their quality based on using metrics (PSNR for now). It assume that user provide list of pairs with two video files which are needed to be compared.
video-evaluation-tool - project folder structure
│ README.md
│ requirements.txt
│ main.py
|
└─── config
│ │ input_config.json
│
└───source
| │ config.py
| │ exceptions.py
| | metrics.py
| | psnr.py
| | report.py
| └───templates
| | base_template.html
|
└───test
The file with names of python packages required to run the project
The python module with the main function
####config
The folder with configuration files. Information about videos to evaluate is in configuration files.
The configuration file at least shall contain the following information:
{
"videos": [
{
"reference_video": "./test_1.mkv",
"compressed_video": "./test1.mp4",
}
]
}
###source
The folder with all project modules
config.py
- module with class to represent the configuration file
exceptions.py
- module with the project exceptions
metrics.py
- module with class of validation metrics.
Currently, min/max/median PSNR, and ratio of PSNR filtered by specified criteria to all PSNR (i.e. Ratio of PSNR being below a certain configurable threshold)
psnr.py
- module with functions to calculate PSNR for each video frames
report.py
- module with functions to create html-report with metrics for each processed videos
###test The folder with unit tests (currently empty)
- Open ./config/ folder create or update .json file with videos to check
- Go to main.py module, check the name of the configuration file and the report file name
- Run main function
- Check the report file