ptran / idla-person-reid

dlib implementation of the "Improved Deep Learning Architecture for Person Re-Identification"
31 stars 11 forks source link

Query about the output matrix in Testing code #5

Closed arehmanAzam closed 6 years ago

arehmanAzam commented 6 years ago

@ptran516 i have a query about the testing code. When i run the line dlib::matrix output = dlib::mat(tnet(img_pairs.begin(), img_pairs.end())); in line 279 of cuhk03.cpp It gives me 2D matrix giving scores. I couldn't understand this output. Can you please explain ??

ptran commented 6 years ago

@arehmanAzam tnet's output is the softmax response for each input image pair. This matrix is R x 2, where R is the number of image pairs and 2 are the softmax response nodes. By applying dlib::mat to it, it transforms the dlib::tensor output to a dlib::matrix, which is much easier to work with. This is captured by the output variable.

arehmanAzam commented 6 years ago

@ptran516 So in output matrix ,at 0th column we get similarity score and at 1 clolumn we get difference score right ??

ptran commented 6 years ago

@arehmanAzam I think I flipped the labels (0 = negative, 1 = positive) so that the 0th column is the difference score and the 1st is the similarity score. That's kind of unfortunate.

arehmanAzam commented 6 years ago

@ptran516 thanks for your input. Your project is helping me alot.

ptran commented 6 years ago

Closing this issue since it should be resolved