How to use the esper.identity.faces_to_tiled_img function in esper

To help you get started, we’ve selected a few esper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scanner-research / esper-tv / app / esper / identity_clusters.py View on Github external
def _get_cluster_images(clusters, no_crop, n, c):
    cluster_images = [None] * len(clusters)
    for cluster_id, face_ids in clusters.items():
        im = faces_to_tiled_img(
            Face.objects.filter(id__in=face_ids).order_by('?')[:n],
            no_crop,
            cols=c
        )
        cluster_images[cluster_id] = im
    return cluster_images
github scanner-research / esper-tv / app / esper / identity_clusters.py View on Github external
def _get_cluster_images_fxn(clusters, n):
        cluster_images = {} #defining the cluster_images dict
        for cluster_id, face_ids in clusters.items():
            cluster_images[cluster_id] = {}
            for i in range(0, n):
                im = faces_to_tiled_img(
                    Face.objects.filter(id__in=face_ids).order_by('?')[:1],
                    False,
                    cols=1)
                cluster_images[cluster_id][i] = im
        return cluster_images
github scanner-research / esper-tv / app / esper / identity_clusters.py View on Github external
def _get_random_image(face_ids): #new cluster_images
        im = faces_to_tiled_img(
            Face.objects.filter(id__in=face_ids).order_by('?')[:1],
            False,
            cols=1
        )
        return im 
    def _get_cluster_images_fxn(clusters, n):