Spatial-Re-Scaling icon indicating copy to clipboard operation
Spatial-Re-Scaling copied to clipboard

How does the "separate_camera_set" option work?

Open MuadDev opened this issue 5 years ago • 1 comments

In file:

https://github.com/HRanWang/Spatial-Attention/blob/master/reid/evaluation_metrics/ranking.py

There is a function:

def cmc(...)

With the option:

separate_camera_set

But how does this option work?? Because it enables the execution of line 70:

69 | if separate_camera_set:
70 |   valid &= (gallery_cams[indices[i]] != query_cams[i])

However, on line 66 and 67 is the following code:

66 |  valid = ((gallery_ids[indices[i]] != query_ids[i]) |
67 |               (gallery_cams[indices[i]] != query_cams[i]))

In my view line 67 and line 70 do exactly the same, so setting option "separate_camera_set" to true or false seems to have no effect. As the code in line 67 will be executed regardless whether the "separate_camera_set" is true or false, and has exactly the same effect..

Am I missing something? Or is this a bug? Or something else?

MuadDev avatar Sep 27 '19 11:09 MuadDev

Or does line 70 negates the effect of the condition on line 66?

MuadDev avatar Sep 27 '19 11:09 MuadDev