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 (4.x.x should also work)
- Python - version >= 3.9
Installation
$ pip install agh_vqis
Usage
-
Single multimedia file:
from agh_vqis import process_single_mm_file from pathlib import Path if __name__ == '__main__': process_single_mm_file(Path('/path/to/single/movie.mp4'))
-
Folder with multimedia files:
from agh_vqis import process_folder_w_mm_files 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/movie.mp4'), options={ 'contrast': False, # disable contrast indicator 'colourfulness': False, # disable colourfulness indicator 'exec': '/path/to/vqis/executable/file/', 'shell': '/bin/bash' })
-
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)
pass'indicator_name': False
to options dictionary. Whereas to enable
blur_amount
indicator passTrue
value. -
Available optional parameters except indicators' flags:
- exec: Path to the binary file running 15 AGH VQIs. The default binaries (depending on system and CPU architecture) are provided in the package files and will run automatically. VQIS binary files could be downloaded from here.
- shell: Alternative Bash interpreter (instead of the default
/bin/bash
). Provide here a path to the interpreter of your choice.
-
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
,mov
,mkv
,avi
,ts
,jpg
,jpeg
,png
,gif
,bmp
.
Output file
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 image quality indicator (IQI) when applied to the respective frame.
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.