weiliu89 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
4.77k stars 1.67k forks source link

training SSD on a new dataset #242

Closed zhenxing9968 closed 5 years ago

zhenxing9968 commented 8 years ago

Hi, @weiliu89 ,I wan't training SSD on a new dataset ,but my data length(about 200) and width(about 50) are not equal. So i wan't change the resize and intput size length=200,resize width=50, and change network structure. Can I not use the pre-training file(VGG_ILSVRC_16_layers_fc_reduced.caffemodel)?

weiliu89 commented 8 years ago

Are you talking about keeping the training image's aspect ratio?

zhenxing9968 commented 8 years ago

@weiliu89 yes. I'd like to adjust the structure of network according to the size of my data,and worry that this pre-training file will not go wrong

vj-1988 commented 8 years ago

I was able to finetune VGG_ILSVRC_16_layers_fc_reduced.caffemodel using images of random dimensions (crawled from web) without changing the train_val.prototxt for SSD300 and I am still able to get correct detections on my dataset. But please note that the smallest side of the training images were larger than 300 pixels.

Supersak80 commented 8 years ago

@vj-1988 Hi Vijay, would you be able to give some more details on how you formatted your data and image annotations to train SSD on a new dataset?

vj-1988 commented 8 years ago

@Supersak80 : I am using this tool to annotate my dataset. This tool is quite helpful in annotating our dataset to pascalvoc format.

https://github.com/tzutalin/labelImg

Basically I am mimicking the pascalvoc dataset with my own so that I would be able to train using the scripts provided by the author.

After annotating the data, replace the Images in JPEGImages folder and all the xmls in annotations folder. ssd

Then follow the usual steps to train pascal VOC with SSD.

vj-1988 commented 8 years ago

@Supersak80 : Also make sure you modify the labelmap_voc.prototxt that corresponds to the custom dataset. You would also have to make changes to ssd_pascal.py later.

linux-devil commented 6 years ago

I am assuming we dont have to resize our training data , that will be automatically taken care of. Even size of jpeg images in VOC varies , my new data set is of different sizes