ncnet icon indicating copy to clipboard operation
ncnet copied to clipboard

A question above negative loss calculation

Open sunshineatnoon opened this issue 6 years ago • 1 comments

Hi, Thanks for this awesome work, I'm trying to train it on my own dataset, so I am exploring how to organize my data. I notice that for unmatched images, you calculate their matching loss by rolling a batch of images(https://github.com/ignacio-rocco/ncnet/blob/master/train.py#L137):

    batch['source_image']=batch['source_image'][np.roll(np.arange(b),-1),:] # roll

I don't quite get why moving each sample one position forward creates unmatched pairs, how do you organize your data? Also, is the set information in the csv files useful during training? Thanks!

sunshineatnoon avatar Dec 28 '18 02:12 sunshineatnoon

I also have this question. I didn't see how rolling by one position forward guarantee the images are from different sets which is how negative is defined. By visualizing the sets numbers inside a batch, if seems true that mosts pairs will go to different sets if you roll the order by 1 forward. But still if the several consecutive pairs have the same set number. Do you simply ignored this case?

I am looking forward to hearing from your reply!!! Thanks!

GrumpyZhou avatar Mar 01 '19 07:03 GrumpyZhou