<jupyter_start><jupyter_text>Qualitative Evaluation Example<jupyter_code>%matplotlib inline

import random
import numpy as np
import matplotlib.pyplot as plt
import os
import cv2
import torch
import dense_correspondence_manipulation.utils.utils as utils
utils.add_dense_correspondence_to_python_path()

import dense_correspondence
from dense_correspondence.evaluation.evaluation import *
import dense_correspondence.correspondence_tools.correspondence_plotter as correspondence_plotter
from dense_correspondence.dataset.dense_correspondence_dataset_masked import ImageType
%%javascript
IPython.OutputArea.auto_scroll_threshold = 9999;
config_filename = os.path.join(utils.getDenseCorrespondenceSourceDir(), 'config', 
                               'dense_correspondence', 'evaluation', 'evaluation.yaml')
config = utils.getDictFromYamlFilename(config_filename)
default_config = utils.get_defaults_config()

# utils.set_cuda_visible_devices([0])
dce = DenseCorrespondenceEvaluation(config)
DCE = DenseCorrespondenceEvaluation

network_name = "rope_2021_11_04_16_46_05"
dcn = dce.load_network_from_config(network_name)
dataset = dcn.load_training_dataset()
DenseCorrespondenceEvaluation.evaluate_network_qualitative(dcn, dataset=dataset, randomize=True)<jupyter_output>Using SpartanDataset:
   - in train mode
   - number of scenes 10
   - total images:     577


-----------Train Data Evaluation----------------
Image pair (468, 848)
{'fraction_non_alphanumeric': 0.0837404047452896, 'fraction_numerical': 0.021632937892533146, 'mean_word_length': 6.17, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '56850', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 461, 'n_tokens_neox': 435, 'n_words': 83, 'path': 'dense_correspondence/evaluation/evaluation_qualitative_tutorial.ipynb', 'repo_name': 'WangYixuan12/pytorch-dense-correspondence', 'size': '1433'}