view-finding-network
view-finding-network copied to clipboard
How to trian a model use own images datase
Hi, thank you so much for sharing your code! I have some questions and hope you could help me.
I try to use my images dataset to train a model,but I was puzzled to the file dataset.pkl
. I don't know how to create the dataset.pkl.Could you tell me what information the file contains and how to make own dataset ?
It will be great if you can help me, thank you a lot.
Hey, thank you for your interest in our research! Please take a look at the file create_dbs.py, it has a command line interface that can be used directly to create a database from a folder with images and should be reasonably easy to understand. The resulting database can be used for training/validation directly.
Hi,
dataset.pkl
contains the crop info described in the paper and is required in create_dbs.py
. If you want to create your own crops, please read the guidelines in the paper. Store the crops in a python list of dict and save it with pickle.
Here is an example (the first element in dataset.pkl
)
{'crop_type': 'border',
'crop_scale': 0.5,
'photo_id': 17704422191,
'url': 'https://farm6.staticflickr.com/5326/17704422191_400d428d48_c.jpg',
'crop': [15, 28, 391, 264],
'original': [0, 0, 800, 534]}
Only crop
and url
fields are used in create_dbs.py
. Note that create_dbs.py
only uses the filename of the url
field, so you can simply put the paths of your own images in this field.
Hi , thank you for your help! But I got a wrong. I run this pre-trained model model-wo-spp
is ok, but try to run other pre-trained model model-spp-max
with an err :InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [9216,1000] rhs shape= [12544,1000], So what should I change the paramete ?