opened
dustsigns
username_0
##### System information (version)
- OpenCV => master
- Operating System / Platform => Ubuntu 16.04
- Compiler => g++ 5.4.0

##### Detailed description

When building OpenCV, tinydnn is downloaded even when no dnn modules are enabled. This is especially annoying on machines with slow or no internet connections that are just for building.

##### Steps to reproduce

Building OpenCV like this

`cmake -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-3.4.1/modules -D BUILD_LIST=calib3d,features2d,flann,highgui,imgcodecs,imgproc,ml,objdetect,sfm,stereo,video,videoio,viz,xfeatures2 -D BUILD_ITT=OFF -D WITH_1394=OFF -D WITH_GSTREAMER=OFF -D WITH_IPP=OFF -D WITH_JASPER=OFF -D WITH_WEBP=OFF -D WITH_OPENEXR=OFF -D WITH_PVAPI=OFF -D WITH_GIGEAPI=OFF -D WITH_QT=ON -D WITH_TIFF=OFF -D WITH_OPENCL=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PACKAGE=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D BUILD_FAT_JAVA_LIB=OFF -D ENABLE_PRECOMPILED_HEADERS=OFF -D CMAKE_BUILD_TYPE=RELEASE ../opencv-3.4.1/`

downloads tinydnn:

```
[..]
-- Protobuf:   NO
-- Glog:   YES
-- tiny-dnn: Download: v1.0.0a3.tar.gz
-- Looking for tiny_dnn.h
-- Looking for tiny_dnn.h - found
-- Found tiny-dnn in: /home/stud/OpenCV/build/3rdparty/tinydnn/tiny-dnn-1.0.0a3
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
[..]
```

The `cmake` output at the end shows that no dnn modules are built:

```
--   OpenCV modules:
--     To be built:                 calib3d core features2d flann highgui imgcodecs imgproc ml objdetect sfm stereo video videoio viz xfeatures2d
--     Disabled:                    js world
--     Disabled by dependency:      aruco bgsegm bioinspired ccalib cvv datasets dnn dnn_objdetect dpm face fuzzy hdf hfs img_hash java_bindings_generator line_descriptor optflow phase_unwrapping photo plot python_bindings_generator reg rgbd saliency shape stitching structured_light superres surface_matching text tracking videostab ximgproc xobjdetect xphoto
--     Unavailable:                 cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev dnn_modern freetype java matlab ovis python2 python3 ts
```

The download seems to be specified in the `CMakeLists.txt` file in `opencv_contrib-3.4.1/modules/dnn_modern`.
tinydnn is downloaded even when it is disabled
issue
created
alalek
username_1
This dependency is removed (with dnn_modern modules from opencv_contrib repository).
comment
closed
alalek
username_1
issue