RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2007780 - Add DNN support in opencv
Summary: Add DNN support in opencv
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2021-12-06
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: opencv
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.6
Assignee: Jiri Kucera
QA Contact: Evgeny Fedin
Šárka Jana
URL:
Whiteboard:
Depends On:
Blocks: 1991296
TreeView+ depends on / blocked
 
Reported: 2021-09-24 20:32 UTC by Troy Dawson
Modified: 2022-05-10 14:53 UTC (History)
6 users (show)

Fixed In Version: opencv-3.4.6-7.el8
Doc Type: Enhancement
Doc Text:
.The `dnn` and `text` modules are available in the `opencv` package The `dnn` module containing Deep Neural Networks for image classification inference and the `text` module for scene text detection and recognition are now available in the `opencv` package.
Clone Of:
Environment:
Last Closed: 2022-05-10 14:29:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-98182 0 None None None 2021-09-24 20:54:57 UTC
Red Hat Product Errata RHBA-2022:1958 0 None None None 2022-05-10 14:29:43 UTC

Description Troy Dawson 2021-09-24 20:32:49 UTC
Description of problem:
There are no dnn libraries in the RHEL8 version of opencv.
DNN (Deep Neural Networks) is one of the libraries of opencv.

It's not that the libraries weren't built for RHEL8, but they are removed after being built, due to dependency issues.
As of RHEL 8.5 (or possibly 8.6), all of the dependencies will now be in RHEL8.

Please rebuild opencv again for RHEL8, without removing the dnn libraries.

Version-Release number of selected component (if applicable):
opencv-3.4.6-6.el8

How reproducible:
100%

Steps to Reproduce:
1. mock -r epel-next-8-x86_64 --rebuild digikam-7.2.0-4.fc34.src.rpm
2.
3.

Actual results:
Fails with:

-- Could NOT find OpenCV (missing: dnn) (found version "3.4.6")
CMake Warning at core/cmake/modules/MacroOpenCV.cmake:22 (find_package):


Expected results:
It should find the dnn libraries and build correctly.

Additional info:
digikam uses the dnn library to do facial recognition.
We've tried building it without dnn and facial recognition, but it is considered a core library, and pretty much everything else fails without it.

Comment 1 Troy Dawson 2021-09-24 20:52:29 UTC
The following creates a same version opencv for RHEL8, but with the dnn libraries available.

diff --git a/opencv.spec b/opencv.spec
index d58e256..5459688 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -54,7 +54,7 @@
 
 Name:           opencv
 Version:        3.4.6
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Collection of algorithms for computer vision
 # This is normal three clause BSD.
 License:        BSD
@@ -212,16 +212,9 @@ to provide decent performance and stability.
 %setup -q -a1
 # we don't use pre-built contribs
 rm -r 3rdparty/
-# missing dependecies for dnn module in Fedora (protobuf-cpp)
-rm -r modules/dnn/
 
 %patch1 -p1 -b .install_3rdparty_licenses
 
-pushd %{name}_contrib-%{version}
-# missing dependecies for dnn_modern module in Fedora (tiny-dnn)
-#rm -r modules/dnn_modern/
-popd
-
 # fix dos end of lines
 #sed -i 's|\r||g'  samples/c/adaptiveskindetector.cpp
 
@@ -323,6 +316,7 @@ popd
 %{_datadir}/licenses/opencv3/
 %{_libdir}/libopencv_calib3d.so.%{abiver}*
 %{_libdir}/libopencv_core.so.%{abiver}*
+%{_libdir}/libopencv_dnn.so.%%{abiver}*
 %{_libdir}/libopencv_features2d.so.%{abiver}*
 %{_libdir}/libopencv_flann.so.%{abiver}*
 %{_libdir}/libopencv_highgui.so.%{abiver}*
@@ -359,8 +353,7 @@ popd
 %{_libdir}/libopencv_ccalib.so.%{abiver}*
 %{_libdir}/libopencv_cvv.so.%{abiver}*
 %{_libdir}/libopencv_datasets.so.%{abiver}*
-# Disabled because of missing dependency package in fedora (protobuf-cpp)
-#{_libdir}/libopencv_dnn.so.%%{abiver}*
+%{_libdir}/libopencv_dnn_objdetect.so.%%{abiver}*
 %{_libdir}/libopencv_dpm.so.%{abiver}*
 %{_libdir}/libopencv_face.so.%{abiver}*
 %{_libdir}/libopencv_freetype.so.%{abiver}*
@@ -377,8 +370,7 @@ popd
 %{_libdir}/libopencv_stereo.so.%{abiver}*
 %{_libdir}/libopencv_structured_light.so.%{abiver}*
 %{_libdir}/libopencv_surface_matching.so.%{abiver}*
-#Module opencv_text disabled because opencv_dnn dependency can't be resolved!
-#{_libdir}/libopencv_text.so.%%{abiver}*
+%{_libdir}/libopencv_text.so.%%{abiver}*
 %{_libdir}/libopencv_tracking.so.%{abiver}*
 %{_libdir}/libopencv_ximgproc.so.%{abiver}*
 %{_libdir}/libopencv_xobjdetect.so.%{abiver}*

Comment 13 Troy Dawson 2022-03-15 14:40:57 UTC
I have successfully build digikam with the new opencv in epel8-next (which uses centos stream 8 as it's buildroot).
So this is successful.
I realize that this will not be fully released until RHEL 8.6, but I am glad that I am able to test it now.
Thank you very much.

Comment 16 errata-xmlrpc 2022-05-10 14:29:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (opencv bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1958


Note You need to log in before you can comment on or make changes to this bug.