gnes.preprocessor.helper module

gnes.preprocessor.helper.block_descriptor(image: numpy.ndarray, descriptor_fn: Callable, num_blocks: int = 3) → numpy.ndarray[source]
gnes.preprocessor.helper.canny_edge(image: numpy.ndarray, **kwargs) → numpy.ndarray[source]
gnes.preprocessor.helper.check_motion(prev_dists: List[float], cur_dist: float, motion_threshold: float = 0.75)[source]

Returns a boolean value to decide if the peak is due to a motion

gnes.preprocessor.helper.compare_descriptor(descriptor1: numpy.ndarray, descriptor2: numpy.ndarray, metric: str = 'chisqr') → float[source]
gnes.preprocessor.helper.compare_ecr(descriptors: List[np.ndarray], dilate_rate: int = 5, neigh_avg: int = 2) → List[float][source]
gnes.preprocessor.helper.compute_descriptor(image: numpy.ndarray, method: str = 'rgb_histogram', **kwargs) → numpy.array[source]
gnes.preprocessor.helper.detect_peak_boundary(distances: List[float], method: str = 'kmeans', **kwargs) → List[int][source]
gnes.preprocessor.helper.get_all_subarea(img)[source]
gnes.preprocessor.helper.get_audio(buffer_data, sample_rate, interval, duration) → List[numpy.ndarray][source]
gnes.preprocessor.helper.get_gif(images: numpy.ndarray, fps=10)[source]
gnes.preprocessor.helper.get_video_length(video_path)[source]
gnes.preprocessor.helper.get_video_length_from_raw(buffer_data)[source]
gnes.preprocessor.helper.hsv_histogram(image: numpy.ndarray) → numpy.ndarray[source]
gnes.preprocessor.helper.kmeans_algo(distances: List[float], **kwargs) → List[int][source]
gnes.preprocessor.helper.motion_algo(distances: List[float], **kwargs) → List[int][source]
gnes.preprocessor.helper.phash_descriptor(image: numpy.ndarray)[source]
gnes.preprocessor.helper.pyramid_descriptor(image: numpy.ndarray, descriptor_fn: Callable, max_level: int = 2) → numpy.ndarray[source]
gnes.preprocessor.helper.rgb_histogram(image: numpy.ndarray) → numpy.ndarray[source]
gnes.preprocessor.helper.split_mp4_random(video_path, avg_length, max_clip_second=10)[source]
gnes.preprocessor.helper.split_video_frames(buffer_data: bytes, splitter: str = '__split__')[source]
gnes.preprocessor.helper.thre_algo(distances: List[float], **kwargs) → List[int][source]
gnes.preprocessor.helper.torch_transform(img)[source]