Skip to content

Identities

Introduction

An identity is a unique instance of a certain class of object. Identities allow BrainFrame to recognise a pre-defined specific person in a group of people, or a specific car in a parking lot. To use this feature, the user must upload one or more images or precomputed vectors of that unique instance. BrainFrame will pick out differentiating features in that instance for later use during recognition.

Identities can span multiple classes of object. For example, a person identity might be described by the person's face and by their gait.

Identities are added to BrainFrame in bulk using a specially organized directory. This directory includes child directories for each identity the user wants to add to BrainFrame. These child directories are in the format "unique_id (nickname)", where the unique ID is a differentiating string, and the nickname is a friendly name to display the identity as. These child directories contain one or more other directories that contain images or precomputed vectors of the identifiable object. The name of the directory defines the class of what is in the image, so if the identity is for a person and we have pictures of their face, the directory would be called "face".

An image should be of only a single instance of the class it is being encoded for. Most common image formats are supported, like JPEG and PNG.

Precomputed vectors are arrays of floating point values in a JSON file. These are used when the encoded vector of a class is already known. For example, DTags have their vector value printed on the tag so they can be registered through this method. For most class types, images are preferred.

An example of this format is shown below. In this example, we are creating three identities with pictures of their faces:

$ tree brainframe-identities/
brainframe-identities/
├── employee000000 (John Cena)
│   └── face
│       ├── 0001_01.jpg
│       ├── 0002_01.jpg
│       └── 0003_01.jpg
├── employee000001 (Bob Suruncle)
│   └── face
│       ├── 0001_01.jpg
│       ├── 0002_01.jpg
│       ├── 0003_01.jpg
│       ├── 0004_01.jpg
│       ├── 0005_01.jpg
│       └── 0006_01.jpg
└── employee000002 (Stacy Sgotigoenon)
    └── face
        ├── 0001_01.jpg
        ├── 0002_01.jpg
        ├── 0003_01.jpg
        ├── 0004_01.jpg
        ├── 0005_01.jpg
        ├── 0006_01.jpg
        └── 0007_02.jpg

Once you have this directory structure created, you're ready to add it using the UI.

Adding Identities

To add new identities, start by clicking the "Identity Configuration" button in the toolbar.

The "Identity Configuration" window displays what identities are currently uploaded. On the right is a grid view of all the identities in the database. On the left is a list of encoding classes that are available through currently loading plugins as well as those of any encoding currently in the database. Clicking on the encoding class will filter the grid of identities to show only those encoded with that class. There is also a search tool at the top left that can be used to search by unique names or nicknames of identities.

To add more identities, click the floating action button at the bottom right of the window.

Clicking the Add Identities button will bring up a directory selection dialog. Use the folder button to select the path to the identities directory. If desired, you can also type the path manually in the text box.

Wait for the identities to finish uploading using the progress bar that appears at the bottom as an indicator.

If there is an error with the directory structure, a dialog will pop up with the error. If any errors occurred for any of an identity's encodings, they will be displayed in a separate window as a tree view.

Uploading the same directory twice will not result in duplicates, so it is safe to make any necessary modifications to the data and upload the entire directory again.

Once the identities are uploaded, you will see them in the Identity Configuration window.