A non-transitory, computer-readable medium storing program code that, when executed by a computer system, performs a method for generating training data for training a machine-learning model for use in re-identification, the method comprising:
- obtaining media data, the media data comprising a plurality of samples representing a person, an animal or an object;
- processing the media data to identify tuples of samples that represent the same person, animal or object;
- and
- generating the training data based on the identified tuples of samples that represent the same person, animal or object.