1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- from ipfml import processing, metrics, utils
- from modules.utils.config import *
- from transformation_functions import svd_reconstruction
- from PIL import Image
- from skimage import color
- from sklearn.decomposition import FastICA
- from sklearn.decomposition import IncrementalPCA
- from sklearn.decomposition import TruncatedSVD
- from numpy.linalg import svd as lin_svd
- from scipy.signal import medfilt2d, wiener, cwt
- import pywt
- import numpy as np
- _scenes_names_prefix = '_scenes_names'
- _scenes_indices_prefix = '_scenes_indices'
- # store all variables from current module context
- context_vars = vars()
- def get_renderer_scenes_indices(renderer_name):
- if renderer_name not in renderer_choices:
- raise ValueError("Unknown renderer name")
- if renderer_name == 'all':
- return scenes_indices
- else:
- return context_vars[renderer_name + _scenes_indices_prefix]
- def get_renderer_scenes_names(renderer_name):
- if renderer_name not in renderer_choices:
- raise ValueError("Unknown renderer name")
- if renderer_name == 'all':
- return scenes_names
- else:
- return context_vars[renderer_name + _scenes_names_prefix]
|