-
Notifications
You must be signed in to change notification settings - Fork 850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\layers\convolution_layer.cpp:396: error: (-2:Unspecified error) Number of input channels should be multiple of 3 but got 4 in function 'cv::dnn::ConvolutionLayerImpl::getMemoryShapes' #1011
Comments
Use jpeg, not png |
我猜测是因为png带alpha通道(rgba),通道数是4因此报错。换成jpg就没事了。 |
问题依旧存在,还是报error: OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\layers\convolution_layer.cpp:396: error: (-2:Unspecified error) Number of input channels should be multiple of 3 but got 4 in function 'cv::dnn::ConvolutionLayerImpl::getMemoryShapes'错误,但是只要把“自动面部焦点剪裁”关掉就能正常出图
|
降级到 opencv-python==4.7.0.72, 升级到 4.10.84 不会报错但是没效果。 |
版本升级为4.10.0.84之后还是老问题,啥都不显示就自动结束了,连日志都没有 |
我中秋刚接触,那时候训练的,的确也就那样。 |
(Translated using DeepL)
Expected behaviour
Normal output.
Actual behaviour
After Auto Focus Cropping is enabled
Click the "Generate" button
error: OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\layers\convolution_layer.cpp:396: error: (-2:Unspecified error) Number of input channels should be multiple of 3 but got 4 in function 'cv::dnn::ConvolutionLayerImpl::getMemoryShapes'
Steps to reproduce
Issue submission checklist
opencv-python
Version 4.10.0.84 also doesn't work and doesn't report any error messages
The text was updated successfully, but these errors were encountered: