jpeyre / unrel

Code for the paper : "Weakly-supervised learning of visual relations", ICCV17
http://www.di.ens.fr/willow/research/unrel/
Other
40 stars 4 forks source link

Training on dataset with new objects #1

Open singhanj13 opened 6 years ago

singhanj13 commented 6 years ago

I want to use your training code for my project, but I have a set of objects which is not present in the Unrel or VRD Datasets. How can I use your code after i have run object detection on my own dataset?

jpeyre commented 6 years ago

Hi singhanj13,

To train on another dataset, create a new folder your-dataset/train/candidates in the ./data folder with the same architecture and information as in vrd-dataset/train/candidates folder :

  1. Your object detector returns candidate objects : store the candidates in a structure "objects.mat", the object scores in "objectscores.mat"
  2. Compute the appearance features for each candidate object (for instance you can use the features from your object detector and apply pca to reduce dimensionality)
  3. Form the candidate pairs and store them in "pairs.mat"
  4. Compute the spatial features using our script ./preprocessing/compute_spatial_features.m (you can use our pre-computed GMM model, or re-train your own model)
  5. Put the groundtruth annotations in folder your-dataset/train/annotated
  6. In the demo script, change opts.dataset='your-dataset' and call train(opts)

You can look at README and/or download the pre-computed data "preproc_data.zip" on the project webpage (http://www.di.ens.fr/willow/research/unrel/release/preproc_data.zip) to check the format of the .mat