<jupyter_start><jupyter_text>Apply Deep Examplar-based Video Corization (DEVC)<jupyter_code>%load_ext autoreload
%autoreload 2
import os
import sys
sys.path.append("../")
import numpy as np
from models.DEVC import DEVC<jupyter_output><empty_output><jupyter_text>Configure Options<jupyter_code>from models.DEVC.options.test_options import TestOptions
sys.argv = [sys.argv[0]]
opt = TestOptions().parse()<jupyter_output><empty_output><jupyter_text>Setup Models<jupyter_code>model = DEVC(pretrained=True)<jupyter_output><empty_output><jupyter_text>Setup Test File<jupyter_code>from utils import v2i

v2i.convert_video_to_frames("../test/input.mp4", "../test/frames")<jupyter_output><empty_output><jupyter_text>Run Model on Test File<jupyter_code>model.test("../test/frames/", "../test/output.mp4", opt)
from utils.util import apply_metric_to_video
from utils.metrics import *
apply_metric_to_video("../test/input.mp4", "../test/output.mp4", [PSNR, SSIM, LPIPS, cosine_similarity])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13803376365441908, 'fraction_numerical': 0.007944389275074478, 'mean_word_length': 8.247706422018348, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '456062', 'license': 'MIT', 'n_tokens_mistral': 375, 'n_tokens_neox': 370, 'n_words': 58, 'path': 'notebooks/DEVC.ipynb', 'repo_name': 'Vince-Ai/Colorizer', 'size': '1007'}