cnnimageretrieval-pytorch
cnnimageretrieval-pytorch copied to clipboard
how train on my own dataset?
thanks for sharing code. i wonder if i can train on my own dataset, and how should i prepare the pkl file?
The database pkl file is a dictionary, containing 'train'
and 'val'
parts, one used for training, the other for validation, respectively. Each one of them is a dictionary that should contain the following:
'cids'
: list of images with names given as content_id (cid)
. See cid2filename to understand how is cid
used to generate image filename.
'cluster'
: a cluster (3D model) id given for each image, used to for hard negative mining.
'qidxs'
and 'pidxs'
: query-positive image pairs given as indices pointing to a respective position in 'cids'
.
@shayxurui have you solve it?
no, i give up
So we can’t train this on our dataset... imagine i have plenty images an want tontrain this model to recognize them : i can’t?
So we can’t train this on our dataset... imagine i have plenty images an want tontrain this model to recognize them : i can’t?
What exactly is not clear in my response from earlier?
Each image needs to have a label: cluster, model, 3D model, type of object etc. In fact label can be anything, as long as all the images having the same label should be embedded close in the image representation space. Then, if you have that, selecting query-positive pairs is trivial, and selection of negative images is done on the fly, while training.
The database pkl file is a dictionary, containing
'train'
and'val'
parts, one used for training, the other for validation, respectively. Each one of them is a dictionary that should contain the following:
'cids'
: list of images with names given ascontent_id (cid)
. See cid2filename to understand how iscid
used to generate image filename.
'cluster'
: a cluster (3D model) id given for each image, used to for hard negative mining.
'qidxs'
and'pidxs'
: query-positive image pairs given as indices pointing to a respective position in'cids'
.
hi, I have a question about this cluster, I want to know the clustering is generate by the GPS distance given image or the feature similarity between the images