Home > Preparation > Preparation for Degradation Category Rating (DCR)
The following steps should be performed to prepare the DCR test setup.
For all the resource files (steps 1-4) an example is provided in sample_inputs directory using
the MCL-JCV Dataset.
Note: make sure to first perform steps listed in the general preparation process.
Note: Within the DCR method, the quality of a Processed Video Sequence (PVS) is compared to a reference video
clip (src) i.e. a same clip without being processed.
-
Upload your PVS and the References video clips in a cloud server and make them publicly available. Use their URLs to create the
rating_clips.csvfile with two columns:pvsandsrc. Each row contain a URL of a PVS and URL of its corresponding reference clip. (see rating_clips_dcr.csv as an example).NOTE: Make sure that CORS are enabled in your server:
Access-Control-Allow-Origin: *.
NOTE: It is strongly recommended to setup a Content Delivery Network (CDN) to speed up video loading time for your participants. Same applies to all other video materials in the following. Note about file names/urls:- Later in the analyzes, clip's file name will be used as a unique key and appears in the results.
- In case you have 'conditions' which are represented with more than one clip, you may consider to use the condition's name in the clip's file name e.g. xxx_c01_xxxx.mp4. When you provide the corresponding pattern, the analyzes script will create aggregated results over conditions as well.
-
Upload your training clips in a cloud server and create the
training_clips.csvfile which contains all URLs in a column namedtraining_pvsand URLs to corresponding reference clips in columntraining_src(see training_clips_dcr.csv as an example).Hint: Training clips are used for anchoring participants perception, and should represent the entire dataset. They should approximately cover the range from worst to best quality to be expected in the test. It may contain about 5 clips.
-
Create gold clips for your test:
- Select a set of clips from your source clips of your dataset.
- Create a CSV file with a column
gold_srcthat contains the path to the selected source clips. - Run the script
create_gold_clips.py.
cd src\utilities python create_gold_clips.py ^ --input_csv YOUR_INPUT.csv ^ --test_method ccr ^ --output_dir YOUR_OUT_DIR
The script requires FFmpeg to be installed and available in your PATH. For each source clip, the script creates three gold clip pairs (equal, better, worse) with matched file sizes. The output CSV (
ccr_gold_clips.csv) is saved in the output directory. You can use the--num_workersoption to speed up processing with parallel workers.- Upload the gold clips to a cloud server and update the
gold_clips.csvfile with URLs, which should contain the following columns:
gold_clips_pvs: URL to the processed video clipgold_clips_src: URL to the corresponding reference video clipgold_clips_ans: the correct answer expected from the worker. Note that you should adjust the number based on the scale you are going to use (e.g. by 9-point-discrete scale, if the PVS has an excellent quality, the correct answer will be 9, whereas by 5-point_discrete scale, it will be 5).
see gold_clips.csv as an example).
Hint: Gold standard clips are used as a hidden quality control item in each session. It is expected that their answers are so obvious that all participants give the
gold_clips_ansrating (+/- 1 deviation is accepted). For this purpose, it is recommended to use clips with excellent (answer 5) or very bad (answer 1) quality. -
Create trapping stimuli set for your dataset.
-
Make a copy of sample configuration file
src\configurations\trappings.cfgand adapt it. See configuration of create_trapping_clips script for more information. -
Create a
tp_srcdirectory and add some clips from your dataset to it. Select clips in a way that- Covers fair distributions of clips
- Covers entire range of quality (some good, fair and bad ones)
-
Run
create_trapping_clips.py
cd src\utilities pip install -r requirements.txt python create_trapping_clips.py ^ --source tp_src ^ --des tp_out ^ --cfg your_config_file.cfg
- Trapping clips are stored in
tp_outdirectory. List of clips and their correct answer can be found intp_out\output_report.csv.
-
-
Upload your trapping clips in a cloud server and create
trapping_clips.csvfile which contains all URLs in a column namedtrapping_pvs, URLS to reference clips in columntrapping_srcand expected answer to each clip in a column namedtrapping_ans(see trapping_clips.csv as an example). -
Create your custom project by running the master script:
-
Make a copy of sample configuration file
src\configurations\master.cfgand adapt it. See master script configuration for more information. -
Run master script with all above-mentioned resources as input (following example is for ccr)
cd src python master_script.py ^ --project YOUR_PROJECT_NAME ^ --method dcr ^ --cfg your_configuration_file.cfg ^ --clips rating_clips.csv ^ --training_clips training_clips.csv ^ --gold_clips gold_clips.csv ^ --trapping_clips trapping_clips.csvNote: file paths are expected to be relative to the current working directory.
Optional flags:
--check_urls: Validates that all URLs in the clip, training, gold, and trapping CSV files are accessible.--create_local_test: Generates a local preview HTML file after the project is created, useful for testing before deployment.
-
Double check the outcome of the script. A folder should be created with YOUR_PROJECT_NAME in current working directory which contains:
YOUR_PROJECT_NAME_dcr.html: Customized HIT app to be used in Amazon Mechanical Turk (AMT).YOUR_PROJECT_NAME_publish_batch.csv: List of dynamic content to be used during publishing batch in AMT.YOUR_PROJECT_NAME_dcr_result_parser.cfg: Customized configuration file to be used byresult_parser.pyscript
-
Now, you are ready for Running the Crowdsourcing Test.