This is the official PyTorch implementations of our ICASSP 2021 paper "Real Versus Fake 4K - Authentic Resolution Assessment"
- 1. Brief Introduction
- 2. Dataset
- 3. Prerequest
- 4. Running the code
- 5. Codes for comparing models
- 6. License
- In recent times, streaming 4K/UHD or even higher resolution image/video content has been increasing steadily because of the potential to deliver crisp and detail rich quality-of-experience (QoE) to end-users.
- In practice, however, the pipeline of video acquisition, production, postproduction, and delivery often involves stages where video frames are scaled down to lower resolutions, and then upscaled back to 4K/UHD resolution at later stages. As a result, the authentic 4K resolution has been lost in the process while end-users are often poorly informed of such quality degradations. Therefore, we need True/Fake 4K decision in practical applications to ensure detail rich quality-of-experience (QoE).
- We introduced one of the first, the largest, and the only public dataset for real vs fake 4K image detection, which contains 10,824 True and Fake4K images.
- We proposed highly efficient DNN based TSARA (Two Stage Authentic Resolution Assessment) algorithm that can classify the image based on its native resolution in real time.
- First stage of algorithm - A CNN model is used to predict the class labels of the local patches.
- Second stage of algorithm - Patch level label predictions are aggregated and a logistic regression on detection frequency is used to make an overall assessment of the whole image or video frame.
The dataset has been published here https://zenodo.org/record/4526657
The code has been tested on Ubuntu 18.04
with Python 3.8
and cuda 10.2
pytorch=1.3
, torchvision=0.4
, scikit-learn
, pandas
, pillow
(or pillow-simd
)
- Pretrained model could be found in folder
pretrained_model/
- This section only shows basic usages, please refer to the code for more options.
- Please make sure to open python file and mention correct image name and local image path in variable.
python demo.py
- The output should be 'True4K' for given input image.
For other model compared in the paper, you can find the code in
- FQPath: https://github.com/mahdihosseini/FQPath
- HVS-MaxPol: https://github.com/mahdihosseini/HVS-MaxPol
- Synthetic-MaxPol: https://github.com/mahdihosseini/Synthetic-MaxPol
- LPC-SI: https://ece.uwaterloo.ca/~z70wang/research/lpcsi/
- GPC: http://helios.mi.parisdescartes.fr/~moisan/sharpness/
- MLV: https://www.mathworks.com/matlabcentral/fileexchange/49991-maximum-local-variation-mlv-code-for-sharpness-assessment-of-images
- SPARISH: https://www.mathworks.com/matlabcentral/fileexchange/55106-sparish