ROC SDK  2.4.0
Scalable Face Recognition Software
roc-metadata

Extract metadata from a gallery.

Options

Option Meaning
-k <string> Extract only values for the specified Metadata Key
-t Output full templates instead of metadata only
-p <string> See Metadata Person ID
-w <object> See Metadata Write
-x <file> See Metadata Write

Metadata Key

If the -k option is specified, only the value for the provided key will be extracted.

Metadata Person ID

If the -p option is specified, the PersonID value for each template will be changed based on the the value of the provided key. Each unique string value for the provided key will be mapped to a distinct integer PersonID, or roc_uuid_get_null if the key is missing or empty.

Metadata Write

If the -w option is specified, the metadata for each template will incorporate the provided JSON object. If the -x option is specified, the metadata for each template will incorporate the provided JSON object file.

Examples

Show help
Print application usage and supported arguments.
$ roc-metadata -h 
Extract metadata
Write the metadata of each template in gallery.t to metadata.json.
$ roc-metadata gallery.t metadata.json 
Extract metadata to stdout
Print the metadata of each template in gallery.t to stdout.
$ roc-metadata gallery.t > metadata.json 
Extract metadata from stdin
Print the metadata of each template in stdin to stdout.
$ cat gallery.t | roc-metadata > metadata.json 
Extract metadata value
Write the value for the metadata key Width for each template in faces.t to face_widths.txt.
$ roc-metadata -k Width faces.t face_widths.txt 
Overwrite metadata value
Overwrite the value for the metadata key Name to value George for each template in faces.t to george.t.
$ roc-metadata -w '{ "Name": "George" }' -t faces.t george.t 
Change each template's person ID based on a metadata value
Assign a person ID based on the value of metadata key Name for each template in faces.t to idfaces.t.
$ roc-metadata -p Name -t faces.t idfaces.t