kanezaki / pytorch-rotationnet

BSD 2-Clause "Simplified" License
80 stars 19 forks source link

How to test? #3

Closed TJJTJJTJJ closed 5 years ago

TJJTJJTJJ commented 5 years ago

In your code about evaluation, batch_size must be multiplication of the number of views, then get output and scores. For example, in case (iii), nview=160, batchsize=160. output should be shape (25600x12). Scores should be shape, (16x12x1), it means that in 16 view-rotations, 160 pictures belong to which class together.

    for j in range(vcand.shape[0]):
        for k in range(vcand.shape[1]):
            scores[ j ] = scores[ j ] + output_[ vcand[ j ][ k ] * nview + k ]

In the process of test, I maybe just some pictures like M'=100 pictures that be of the same object. And nview=160, output_ should be shape of (16000x12), it means that every picture belongs to which class in every view. But how do I get scores and j-max. Because 100 pictures is not continues, only in order, for example (0,1,3,4,5,...,100) or (0,1,2,3,...99). but I don't know which views they are. How do the rest process of test?

kanezaki commented 5 years ago

Our method is available only when the relative poses of test images are known. For example, if you captured three images where the second image is 22.5 degrees forward from the first image and the third image is 45 degrees forward from the second image, then the images should be indexed as (0, 1, 3). Then you would get 3x160x12 output values. An easy way to proceed is to create a 160x160x12 "output2" which has zero values, and then insert the output values as “output2[0] = output[0]; output2[1] = output[1]; output2[3] = output[2];”. (In our paper, we used LSD-SLAM to calculate relative poses of test images.)