A Python wrapper for 18 image quality indicators.
Project description
agh-vqis
A Python package computing a set of image quality indicators (IQIs) for a given input video.
Following IQIs are included in the package:
- A set of 15 Video Quality Indicators (VQIs) developed by the team from AGH. See the following website for more information: https://qoe.agh.edu.pl/indicators/.
- Our Python reimplementation of the Colourfulness IQI. See this paper for more information regarding this IQI.
- Blur Amount IQI. See package's Python Package Index web page for more information.
- UGC IQI (User-generated content).
Authors: Jakub Nawała <jakub.nawala@agh.edu.pl>, Filip Korus <fkorus@student.agh.edu.pl>
Requirements
- ffmpeg - version >= 4.4.2
- Python - version >= 3.9
Installation
pip install agh_vqis
Usage
-
Single multimedia file:
from agh_vqis import process_single_mm_file, VQIs from pathlib import Path if __name__ == '__main__': process_single_mm_file(Path('/path/to/single/video.mp4'))
-
Folder with multimedia files:
from agh_vqis import process_folder_w_mm_files, VQIs from pathlib import Path if __name__ == '__main__': process_folder_w_mm_files(Path('/path/to/multimedia/folder/'))
-
Options parameter - in either
process_single_mm_file
andprocess_folder_w_mm_files
function options could be provided as an optional argument. It is being passed to function as a dictionary like below.process_single_mm_file(Path('/path/to/single/video.mp4'), options={ VQIs.contrast: False, # disable contrast indicator VQIs.colourfulness: False, # disable colourfulness indicator })
-
How to disable/enable indicators to count? Every indicator is enabled by default except
blue_amount
due to long computing time. To disable one of following indicators(blockiness, SA, letterbox, pillarbox, blockloss, blur, TA, blackout, freezing, exposure, contrast, interlace, noise, slice, flickering, colourfulness, ugc)
passVQIs.indicator_name: False
to options dictionary. Whereas to enable
blur_amount
indicator passTrue
value. -
agh-vqis package could be used from command line interface as well. For example:
python3 -m agh_vqis /path/to/single/movie.mp4 # will run VQIS for single file
or
python3 -m agh_vqis /path/to/multimedia/folder/ # will run VQIS for folder
Whereas this command will display help:
$ python3 -m agh_vqis -h
-
Supported multimedia files:
mp4
,y4m
,mov
,mkv
,avi
,ts
,jpg
,jpeg
,png
,gif
,bmp
. -
First row of the output CSV file contains header with image quality indicators (IQIs) names, whereas each row below the header represents single video frame from the input video file. Each column provides a numerical result as returned by a given IQI when applied to the respective frame.
-
Cast chosen indicators for different resolutions (experimental). For example: to cast Blur to 1440p and Blockiness to 2160p you should pass two additional lines in
options
dictionary like below.
from agh_vqis import process_single_mm_file, CastVQI, DestResolution
from pathlib import Path
if __name__ == '__main__':
process_single_mm_file(Path('/path/to/single/video.mp4'), options={
CastVQI.blur: DestResolution.p1440,
CastVQI.blockiness: DestResolution.p2160
})
Available casts
Blockiness:
- 1080p -> 1440p
- 1080p -> 2160p
- 1440p -> 2160p
- 2160p -> 1440p
Blur:
- 1080p -> 1440p
- 1080p -> 2160p
- 1440p -> 1080p
- 1440p -> 2160p
- 2160p -> 1080p
- 2160p -> 1440p
- 240p -> 360p
- 240p -> 480p
- 360p -> 240p
- 360p -> 480p
- 360p -> 720p
- 480p -> 240p
- 480p -> 360p
- 480p -> 720p
- 720p -> 1080p
- 720p -> 360p
- 720p -> 480p
Contrast:
- 1080p -> 1440p
- 1080p -> 2160p
- 1080p -> 240p
- 1080p -> 360p
- 1080p -> 480p
- 1080p -> 720p
- 1440p -> 1080p
- 1440p -> 2160p
- 1440p -> 240p
- 1440p -> 360p
- 1440p -> 480p
- 1440p -> 720p
- 2160p -> 1080p
- 2160p -> 1440p
- 2160p -> 240p
- 2160p -> 360p
- 2160p -> 480p
- 2160p -> 720p
- 240p -> 1080p
- 240p -> 1440p
- 240p -> 2160p
- 240p -> 360p
- 240p -> 480p
- 240p -> 720p
- 360p -> 1080p
- 360p -> 1440p
- 360p -> 2160p
- 360p -> 240p
- 360p -> 480p
- 360p -> 720p
- 480p -> 1080p
- 480p -> 1440p
- 480p -> 2160p
- 480p -> 240p
- 480p -> 360p
- 480p -> 720p
- 720p -> 1080p
- 720p -> 1440p
- 720p -> 2160p
- 720p -> 240p
- 720p -> 360p
- 720p -> 480p
Exposure(bri):
- 1080p -> 1440p
- 1080p -> 2160p
- 1080p -> 360p
- 1080p -> 480p
- 1080p -> 720p
- 1440p -> 1080p
- 1440p -> 2160p
- 1440p -> 480p
- 1440p -> 720p
- 2160p -> 1080p
- 2160p -> 1440p
- 2160p -> 720p
- 240p -> 360p
- 240p -> 480p
- 240p -> 720p
- 360p -> 1080p
- 360p -> 240p
- 360p -> 480p
- 360p -> 720p
- 480p -> 1080p
- 480p -> 1440p
- 480p -> 240p
- 480p -> 360p
- 480p -> 720p
- 720p -> 1080p
- 720p -> 1440p
- 720p -> 2160p
- 720p -> 240p
- 720p -> 360p
- 720p -> 480p
Interlace:
- 1080p -> 1440p
- 240p -> 360p
- 360p -> 240p
- 360p -> 480p
- 480p -> 360p
- 480p -> 720p
- 720p -> 1080p
- 720p -> 480p
Noise:
- 1080p -> 1440p
- 1080p -> 2160p
- 1440p -> 1080p
- 1440p -> 2160p
- 2160p -> 1440p
- 240p -> 360p
- 360p -> 240p
- 360p -> 480p
- 480p -> 360p
- 480p -> 720p
- 720p -> 480p
License
The agh-vqis
Python package is provided via the Evaluation License Agreement.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.