chuanqi305 / MobileNet-SSD

Caffe implementation of Google MobileNet SSD detection network, with pretrained weights on VOC0712 and mAP=0.727.
MIT License
2.04k stars 1.18k forks source link

train one model for black and white + RGB images #166

Open AbhimanyuAryan opened 5 years ago

AbhimanyuAryan commented 5 years ago

So, while training black and white images we have pass. Color force: true in model configuration.

I want to train the model on both BLACK & WHITE + RGB Images ....how do I do that?

I don't want to train two separate models for same task ie. black and white & colored image detection

mentezar commented 5 years ago

you cannot, as of different channel dimension: 1 for grayscale and 3 for color (rgb/bgr).

It's better to train two different models, otherwise you can convert you grayscale images to color (rgb/brg) (so they have 3 channels) and treat them like they was colored.

mentezar commented 5 years ago

there is also a parameter inside the transform_param section of train prototxt. So you can pass grayscale image to SSD network (it automatically converts your grayscale image to color propagating your single channel to 3 channels). Set:
force_color: true

IMPORTANT If you pass grayscale images remember to turn off all color distortion aumentations.

AbhimanyuAryan commented 5 years ago

@mentezar color distortion augmentation where? You mean distort_param?

They are brightness_prob: 0.5 etc etc

Should I turn all of them to 0.0?