SYMBOL INDEX (254 symbols across 31 files) FILE: build.py function build (line 7) | def build(setup_kwargs): FILE: perception/approximate_deduplication/__init__.py class ClusterAssignment (line 21) | class ClusterAssignment(typing_extensions.TypedDict): function build_index (line 26) | def build_index( function compute_euclidean_pairwise_duplicates_approx (line 85) | def compute_euclidean_pairwise_duplicates_approx( function pairs_to_clusters (line 201) | def pairs_to_clusters( FILE: perception/approximate_deduplication/_graph_backend.py class GraphBackend (line 6) | class GraphBackend(ABC): method build_graph (line 8) | def build_graph( method connected_components (line 13) | def connected_components(self, graph: typing.Any) -> list[list[int]]: ... method communities (line 16) | def communities( method maximal_cliques (line 21) | def maximal_cliques( class NetworkitGraphBackend (line 29) | class NetworkitGraphBackend(GraphBackend): method __init__ (line 30) | def __init__(self): method build_graph (line 35) | def build_graph( method connected_components (line 43) | def connected_components(self, graph: typing.Any) -> list[list[int]]: method communities (line 48) | def communities(self, graph: typing.Any, component: list[int]) -> list... method maximal_cliques (line 59) | def maximal_cliques( class NetworkxGraphBackend (line 84) | class NetworkxGraphBackend(GraphBackend): method __init__ (line 85) | def __init__(self): method build_graph (line 90) | def build_graph( method connected_components (line 98) | def connected_components(self, graph: typing.Any) -> list[list[int]]: method communities (line 101) | def communities(self, graph: typing.Any, component: list[int]) -> list... method maximal_cliques (line 110) | def maximal_cliques( function get_graph_backend (line 135) | def get_graph_backend() -> GraphBackend: FILE: perception/approximate_deduplication/debug.py function vizualize_pair (line 15) | def vizualize_pair( function viz_match_data (line 89) | def viz_match_data( function viz_brute_force (line 194) | def viz_brute_force(features_1, features_2, img1, img2, ratio: float): FILE: perception/approximate_deduplication/index.py class QueryInput (line 13) | class QueryInput(typing_extensions.TypedDict): class QueryMatch (line 18) | class QueryMatch(typing_extensions.TypedDict): class TuningFailure (line 23) | class TuningFailure(Exception): class QueryDecodingFailure (line 27) | class QueryDecodingFailure(Exception): function build_query (line 31) | def build_query(table, ids, paramstyle, columns): function query_by_id (line 44) | def query_by_id(con, table, ids, paramstyle, extra_columns=None) -> pd.D... class ApproximateNearestNeighbors (line 73) | class ApproximateNearestNeighbors: method __init__ (line 88) | def __init__( method from_database (line 120) | def from_database( method query_by_id (line 229) | def query_by_id( method string_to_vector (line 255) | def string_to_vector(self, s: str, hash_format="base64") -> np.ndarray: method vector_to_string (line 266) | def vector_to_string(self, vector, hash_format="base64") -> str | None: method search (line 276) | def search( method tune (line 340) | def tune(self, n_query=100, min_recall=99, max_noise=3): method save (line 403) | def save(self, filepath): method set_nprobe (line 411) | def set_nprobe(self, nprobe) -> int: method nlist (line 421) | def nlist(self): method nprobe (line 426) | def nprobe(self): method ntotal (line 431) | def ntotal(self): FILE: perception/approximate_deduplication/serve.py function is_similarity_valid (line 16) | def is_similarity_valid(data, index: ApproximateNearestNeighbors): function similarity (line 34) | async def similarity(request): function get_logger (line 84) | def get_logger(name, log_level): function serve (line 96) | async def serve( FILE: perception/benchmarking/common.py function create_mask (line 32) | def create_mask(transformed_guids, noop_guids): function compute_threshold_precision_recall (line 67) | def compute_threshold_precision_recall(pos, neg, precision_threshold=99.9): class Filterable (line 100) | class Filterable(ABC): method __init__ (line 104) | def __init__(self, df): method categories (line 111) | def categories(self): method filter (line 115) | def filter(self, **kwargs): class Saveable (line 131) | class Saveable(Filterable): method load (line 133) | def load( method save (line 210) | def save(self, path_to_zip_or_directory): class BenchmarkHashes (line 280) | class BenchmarkHashes(Filterable): method __init__ (line 310) | def __init__(self, df: pd.DataFrame): method __add__ (line 314) | def __add__(self, other): method __radd__ (line 317) | def __radd__(self, other): method load (line 321) | def load(cls, filepath: str): method save (line 324) | def save(self, filepath): method compute_metrics (line 327) | def compute_metrics( method show_histograms (line 449) | def show_histograms(self, grouping=None, precision_threshold=99.9, **k... method compute_threshold_recall (line 544) | def compute_threshold_recall( class BenchmarkDataset (line 605) | class BenchmarkDataset(Saveable): method from_tuples (line 617) | def from_tuples(cls, files: list[tuple[str, str]]): method transform (line 629) | def transform(self, transforms, storage_dir, errors): class BenchmarkTransforms (line 633) | class BenchmarkTransforms(Saveable): method compute_hashes (line 652) | def compute_hashes(self, hashers, max_workers): FILE: perception/benchmarking/image.py class BenchmarkImageTransforms (line 19) | class BenchmarkImageTransforms(BenchmarkTransforms): method compute_hashes (line 20) | def compute_hashes( class BenchmarkImageDataset (line 85) | class BenchmarkImageDataset(BenchmarkDataset): method deduplicate (line 86) | def deduplicate( method transform (line 120) | def transform( FILE: perception/benchmarking/image_transforms.py function apply_watermark (line 5) | def apply_watermark(watermark, alpha: float = 1.0, size: float = 1.0): FILE: perception/benchmarking/video.py function _process_row (line 14) | def _process_row(row, hashers, framerates): class BenchmarkVideoDataset (line 68) | class BenchmarkVideoDataset(BenchmarkDataset): method transform (line 69) | def transform( class BenchmarkVideoTransforms (line 163) | class BenchmarkVideoTransforms(BenchmarkTransforms): method compute_hashes (line 173) | def compute_hashes( FILE: perception/benchmarking/video_transforms.py function probe (line 9) | def probe(filepath): function sanitize_output_filepath (line 14) | def sanitize_output_filepath(input_filepath, output_filepath, output_ext... function get_simple_transform (line 29) | def get_simple_transform( function get_slideshow_transform (line 111) | def get_slideshow_transform( function get_black_frame_padding_transform (line 162) | def get_black_frame_padding_transform(duration_s=0, duration_pct=0): FILE: perception/hashers/hasher.py class Hasher (line 14) | class Hasher(ABC): method string_to_vector (line 36) | def string_to_vector(self, hash_string: str, hash_format: str = "base6... method vector_to_string (line 50) | def vector_to_string( method compute_distance (line 61) | def compute_distance( method _compute_distance (line 106) | def _compute_distance(self, vector1, vector2): method compute_parallel (line 110) | def compute_parallel( class ImageHasher (line 174) | class ImageHasher(Hasher): method _compute (line 176) | def _compute(self, image: np.ndarray) -> np.ndarray: method compute_isometric_from_hash (line 185) | def compute_isometric_from_hash(self, hash_string_or_vector, hash_form... method compute_isometric (line 213) | def compute_isometric(self, image: tools.ImageInputType): method compute (line 231) | def compute( method compute_with_quality (line 257) | def compute_with_quality( method _compute_with_quality (line 285) | def _compute_with_quality(self, image: np.ndarray) -> tuple[np.ndarray... class VideoHasher (line 289) | class VideoHasher(Hasher): method process_frame (line 295) | def process_frame( method hash_from_final_state (line 314) | def hash_from_final_state(self, state: dict) -> np.ndarray: method compute (line 322) | def compute( FILE: perception/hashers/image/average.py class AverageHash (line 7) | class AverageHash(ImageHasher): method __init__ (line 16) | def __init__(self, hash_size=8): method _compute (line 21) | def _compute(self, image): method _compute_isometric_from_hash (line 29) | def _compute_isometric_from_hash(self, vector): FILE: perception/hashers/image/dhash.py class DHash (line 6) | class DHash(ImageHasher): method __init__ (line 15) | def __init__(self, hash_size=8): method _compute (line 20) | def _compute(self, image): FILE: perception/hashers/image/opencv.py class OpenCVHasher (line 7) | class OpenCVHasher(ImageHasher): method __init__ (line 10) | def __init__(self): class MarrHildreth (line 17) | class MarrHildreth(OpenCVHasher): method __init__ (line 25) | def __init__(self): method _compute (line 29) | def _compute(self, image): class ColorMoment (line 33) | class ColorMoment(OpenCVHasher): method __init__ (line 41) | def __init__(self): method _compute (line 45) | def _compute(self, image): class BlockMean (line 49) | class BlockMean(OpenCVHasher): method __init__ (line 57) | def __init__(self): method _compute (line 61) | def _compute(self, image): FILE: perception/hashers/image/pdq.py class PDQHash (line 6) | class PDQHash(ImageHasher): method _compute (line 15) | def _compute(self, image): method _compute_with_quality (line 18) | def _compute_with_quality(self, image): method _compute_isometric (line 22) | def _compute_isometric(self, image): class PDQHashF (line 28) | class PDQHashF(PDQHash): method _compute (line 33) | def _compute(self, image): FILE: perception/hashers/image/phash.py class PHash (line 9) | class PHash(ImageHasher): method __init__ (line 27) | def __init__( method _compute_dct (line 42) | def _compute_dct(self, image): method _dct_to_hash (line 54) | def _dct_to_hash(self, dct): method _compute (line 60) | def _compute(self, image): method _compute_isometric (line 64) | def _compute_isometric(self, image): class PHashF (line 73) | class PHashF(PHash): method _dct_to_hash (line 81) | def _dct_to_hash(self, dct): class PHashU8 (line 90) | class PHashU8(PHash): method _dct_to_hash (line 100) | def _dct_to_hash(self, dct): FILE: perception/hashers/image/wavelet.py class WaveletHash (line 8) | class WaveletHash(ImageHasher): method __init__ (line 17) | def __init__(self, hash_size=8, image_scale=None, mode="haar"): method _compute (line 31) | def _compute(self, image): FILE: perception/hashers/tools.py function get_ffprobe (line 56) | def get_ffprobe(): function get_ffmpeg (line 60) | def get_ffmpeg(): function compute_quality (line 64) | def compute_quality(image) -> int: function compute_md5 (line 79) | def compute_md5(filepath) -> str: function get_string_length (line 90) | def get_string_length(hash_length: int, dtype: str, hash_format="hex") -... function vector_to_string (line 110) | def vector_to_string(vector: np.ndarray, dtype: str, hash_format: str) -... function string_to_vector (line 140) | def string_to_vector( function hex_to_b64 (line 180) | def hex_to_b64( function b64_to_hex (line 204) | def b64_to_hex( function to_image_array (line 228) | def to_image_array(image: ImageInputType, require_color=True) -> np.ndar... function get_common_framerates (line 243) | def get_common_framerates(id_rates: dict): function get_isometric_transforms (line 316) | def get_isometric_transforms(image: ImageInputType, require_color=True) ... function get_isometric_dct_transforms (line 330) | def get_isometric_dct_transforms(dct: np.ndarray): function read (line 352) | def read(filepath_or_buffer: ImageInputType, timeout=None) -> np.ndarray: function _get_keyframes (line 392) | def _get_keyframes(filepath): function get_video_properties (line 425) | def get_video_properties(filepath): function read_video_to_generator_ffmpeg (line 454) | def read_video_to_generator_ffmpeg( function read_video_to_generator (line 655) | def read_video_to_generator( function read_video_into_queue (line 775) | def read_video_into_queue(*args, video_queue, terminate, func, **kwargs): function read_video (line 787) | def read_video( function compute_synchronized_video_hashes (line 887) | def compute_synchronized_video_hashes( function unletterbox (line 971) | def unletterbox( function unletterbox_crop (line 1136) | def unletterbox_crop( FILE: perception/hashers/video/framewise.py class FramewiseHasher (line 7) | class FramewiseHasher(VideoHasher): method __init__ (line 13) | def __init__( method process_frame (line 33) | def process_frame(self, frame, frame_index, frame_timestamp, state=None): method compute_batches (line 60) | def compute_batches( method hash_from_final_state (line 99) | def hash_from_final_state(self, state): FILE: perception/hashers/video/tmk.py class TMKL2 (line 11) | class TMKL2(VideoHasher): method __init__ (line 17) | def __init__( method process_frame (line 70) | def process_frame(self, frame, frame_index, frame_timestamp, state=None): method hash_from_final_state (line 77) | def hash_from_final_state(self, state): method _compute_distance (line 94) | def _compute_distance(self, vector1, vector2): method _score_pair (line 103) | def _score_pair(self, fv_a, fv_b, offsets=None, normalization="matrix"): class TMKL1 (line 171) | class TMKL1(VideoHasher): method __init__ (line 174) | def __init__( method process_frame (line 194) | def process_frame(self, frame, frame_index, frame_timestamp, state=None): method hash_from_final_state (line 211) | def hash_from_final_state(self, state): FILE: perception/local_descriptor_deduplication.py class Descriptors (line 34) | class Descriptors(typing_extensions.TypedDict): class MatchStats (line 43) | class MatchStats(typing_extensions.TypedDict): class LocalHasher (line 54) | class LocalHasher(ABC): method __init__ (line 61) | def __init__( method compute (line 79) | def compute(self, image) -> tuple[np.ndarray, np.ndarray]: method validate_match (line 82) | def validate_match( class SIFT (line 250) | class SIFT(LocalHasher): method __init__ (line 253) | def __init__( class AKAZE (line 264) | class AKAZE(LocalHasher): method __init__ (line 267) | def __init__( function load_and_preprocess (line 279) | def load_and_preprocess(filepath, max_size=DEFAULT_MAX_SIZE, grayscale=T... function generate_image_descriptors (line 308) | def generate_image_descriptors( function build_reference_df (line 363) | def build_reference_df( function hasher_name (line 419) | def hasher_name(df: pd.DataFrame) -> str: function check_hasher (line 423) | def check_hasher(df1: pd.DataFrame, df2: pd.DataFrame): function compute_pairs (line 429) | def compute_pairs( function compute_area (line 490) | def compute_area(box): function compute_intersection (line 500) | def compute_intersection(kps, filter_arr): function compute_minimum_intersection (line 517) | def compute_minimum_intersection(kp1, kp2, filter_arr1, filter_arr2): function deduplicate_sift_dfs (line 532) | def deduplicate_sift_dfs(*args, **kwargs): function deduplicate_dfs (line 538) | def deduplicate_dfs( function deduplicate (line 640) | def deduplicate( FILE: perception/testing/__init__.py function get_low_detail_image (line 18) | def get_low_detail_image(): function test_opencv_hasher (line 74) | def test_opencv_hasher(hasher: hashers.ImageHasher, image1: str, image2:... function hash_dicts_to_df (line 92) | def hash_dicts_to_df(hash_dicts, returns_multiple): function test_hasher_parallelization (line 108) | def test_hasher_parallelization(hasher, test_filepaths): function test_video_hasher_integrity (line 129) | def test_video_hasher_integrity( function test_image_hasher_integrity (line 135) | def test_image_hasher_integrity( FILE: perception/tools.py function _multiple_hashes_for_ids (line 26) | def _multiple_hashes_for_ids(hashes: list[tuple[str, str | np.ndarray]]): function deduplicate_hashes (line 37) | def deduplicate_hashes( function deduplicate (line 160) | def deduplicate( class SaferMatcher (line 229) | class SaferMatcher: method __init__ (line 268) | def __init__( method match (line 319) | def match( FILE: perception/utils.py function flatten (line 1) | def flatten(list_of_lists): FILE: tests/test_approximate_deduplication.py function get_cluster_members (line 4) | def get_cluster_members(assignments): function test_pairs_to_clusters_component_strictness (line 11) | def test_pairs_to_clusters_component_strictness(): function test_pairs_to_clusters_community_strictness (line 21) | def test_pairs_to_clusters_community_strictness(): function test_pairs_to_clusters_clique_strictness (line 31) | def test_pairs_to_clusters_clique_strictness(): FILE: tests/test_benchmarking.py function test_deduplicate (line 20) | def test_deduplicate(): function test_bad_dataset (line 32) | def test_bad_dataset(): function test_benchmark_dataset (line 52) | def test_benchmark_dataset(): function test_benchmark_transforms (line 71) | def test_benchmark_transforms(): function convert_hash_string_to_vector (line 97) | def convert_hash_string_to_vector(hash_string): function test_video_benchmark_dataset (line 102) | def test_video_benchmark_dataset(): function test_euclidean_extension (line 187) | def test_euclidean_extension(): FILE: tests/test_hashers.py function test_image_hashing_common (line 28) | def test_image_hashing_common( function test_video_hashing_common (line 39) | def test_video_hashing_common(): function test_video_reading (line 49) | def test_video_reading(): function test_common_framerate (line 63) | def test_common_framerate(): function test_synchronized_hashing (line 81) | def test_synchronized_hashing(): function test_hex_b64_conversion (line 107) | def test_hex_b64_conversion(): FILE: tests/test_local_descriptor_deduplication.py function test_deduplication (line 32) | def test_deduplication(hasher): function test_deduplication_across_sets (line 81) | def test_deduplication_across_sets(hasher): function test_validation_for_overlapping_case (line 117) | def test_validation_for_overlapping_case(hasher): function test_handling_bad_file_case (line 141) | def test_handling_bad_file_case(caplog, hasher): function test_handling_hasher_mismatch (line 183) | def test_handling_hasher_mismatch(): function test_viz_pair (line 200) | def test_viz_pair(): function test_viz_pair_symmetry (line 242) | def test_viz_pair_symmetry(): FILE: tests/test_tmk.py function test_tmk_parity (line 15) | def test_tmk_parity(): FILE: tests/test_tools.py function test_deduplicate (line 12) | def test_deduplicate(): function test_deduplicate_u8 (line 32) | def test_deduplicate_u8(): function test_deduplicate_hashes_multiple (line 54) | def test_deduplicate_hashes_multiple(): function test_compute_euclidean_pairwise_duplicates (line 82) | def test_compute_euclidean_pairwise_duplicates(): function test_api_is_over_https (line 146) | def test_api_is_over_https(): function test_unletterbox (line 162) | def test_unletterbox(): function test_unletterbox_crop (line 175) | def test_unletterbox_crop(): function test_unletterbox_crop_meaningful_pixels (line 185) | def test_unletterbox_crop_meaningful_pixels(): function test_unletterbox_color (line 202) | def test_unletterbox_color(): function test_unletterbox_aspect_ratio (line 226) | def test_unletterbox_aspect_ratio(): function test_unletterbox_noblackbars (line 251) | def test_unletterbox_noblackbars(): function test_ffmpeg_video (line 263) | def test_ffmpeg_video(): function test_videos_with_extra_channels (line 286) | def test_videos_with_extra_channels(): function test_image_input_types (line 303) | def test_image_input_types():