lucasjinreal / kitti-ssd

Train your own data using SSD in a more clear and simple way(not include source code)
103 stars 44 forks source link

opencv error after converted to lmdb #4

Open xperzy opened 7 years ago

xperzy commented 7 years ago

Hello,

I have converted lmdb using your code without any errors, however when I start train the model, it shows error as following:

OpenCV Error: Assertion failed ((scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F)) in cvtColor, file ...

I have checked the code in ssd caffe, this error occurs when calling caffe::AdjustSaturation() where the cv::cvtColor is called to convert the bgr to hsv colorspace.

I have tried to converted VOC using your code, it is totally fine, but when I tried other dataset (such as COCO ), it always failed.

Have you met similar problem?

Thanks.

lucasjinreal commented 7 years ago

This maybe caused by OpenCV cvColor method, you may check the params which from what space to what, for instance, BGR_TO_RGB, this only work on bgr format image convert into rgb. Check datasets like coco in which format stored.

geonseoks commented 6 years ago

Set force_color to true in the transform_param in test.prototxt and train.prototxt

transform_param { mean_value: 104 mean_value: 117 mean_value: 123 force_color: true