MobileNet-SSD icon indicating copy to clipboard operation
MobileNet-SSD copied to clipboard

train one model for black and white + RGB images

Open AbhimanyuAryan opened this issue 4 years ago • 3 comments

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

AbhimanyuAryan avatar Aug 07 '19 04:08 AbhimanyuAryan

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 avatar Aug 19 '19 14:08 mentezar

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.

mentezar avatar Aug 22 '19 15:08 mentezar

@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?

AbhimanyuAryan avatar Sep 03 '19 09:09 AbhimanyuAryan