TextBoxes_plusplus icon indicating copy to clipboard operation
TextBoxes_plusplus copied to clipboard

opencv error when training mnist data

Open redflower2017 opened this issue 7 years ago • 1 comments

Hi, I got an error message while training my MNIST data. I'm sure all the training and testing images come in three channels(RGB), uint8. Also, I've set force_color into true in the transform_param(both train and test) and set gpus value in solver parameters into zero(as shown in below). I've specified my only one GPU to use in PyCaffe. Can anyone help me solving my problem? Thanks.

Error message : ![training_error](https://user-images.githubusercontent.com/16350625/45541988-281b5680-b843-11e8-8e49-0b548ef6d202.png) OpenCV Error: Assertion failed ((scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F)) in cvtColor, file /build/buildd/opencv-2.4.8+dfsg1/modules/imgproc/src/color.cpp, line 3959 terminate called after throwing an instance of 'cv::Exception' what(): /build/buildd/opencv-2.4.8+dfsg1/modules/imgproc/src/color.cpp:3959: error: (-215) (scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F) in function cvtColor

redflower2017 avatar Sep 14 '18 09:09 redflower2017

add 'force_color':True, to train and test transform_param solved my question

liujianisme avatar Jan 12 '21 03:01 liujianisme