function [X,Y] = pairsToLabels(pairs, instance_matrix)
    imgs1 = [pairs.img1];      
    imgs2 = [pairs.img2];

    keymat = [[imgs1.classId] [imgs2.classId]; [imgs1.id] [imgs2.id]];
    [ids, idsndx] = unique(keymat','rows');

    X = instance_matrix(:,idsndx);
    Y = ids(:,1)';
end
zhunzhong07
github-repos/MATLAB/zhunzhong07-IDE-baseline-Market-1501/IDE-baseline-Market-1501-8be027b5e45adce1d8ea381cc5a17ec20ed521e5/market_evaluation/KISSME/toolbox/helper/pairsToLabels.m
IDE-baseline-Market-1501
github-repos/MATLAB/zhunzhong07-IDE-baseline-Market-1501
8be027b5e45adce1d8ea381cc5a17ec20ed521e5