<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; : 3.4.1:</li>
<li>Operating System / Platform =&gt; :MacOS High Sierra 10.13.6:</li>
<li>Compiler =&gt; :Xcode 10.0:</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">command prompt : make -j2</p>
<p dir="auto">Scanning dependencies of target opencv_ximgproc<br>
[ 41%] Building CXX object modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/adaptive_manifold_filter_n.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/reshape_layer.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/resize_nearest_neighbor_layer.cpp.o<br>
[ 41%] Building CXX object modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/domain_transform.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/scale_layer.cpp.o<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/domain_transform.cpp:38:<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.hpp:292:<br>
/Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.inl.hpp:473:44: error: no member named 'type' in<br>
'cv::Vec&lt;float, 1&gt;'; did you mean 'time'?<br>
dst.create(guide.rows, guide.cols + 1, IDistVec::type);<br>
^~~~~~~~~~~~~~<br>
time<br>
/usr/include/time.h:117:8: note: 'time' declared here<br>
time_t time(time_t *);<br>
^<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/domain_transform.cpp:38:<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.hpp:292:<br>
/Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.inl.hpp:500:52: error: no member named 'type' in<br>
'cv::Vec&lt;float, 1&gt;'; did you mean 'time'?<br>
dist = getWExtendedMat(guide.rows, guide.cols, IDistVec::type, 1, 1);<br>
^~~~~~~~~~~~~~<br>
time<br>
/usr/include/time.h:117:8: note: 'time' declared here<br>
time_t time(time_t *);<br>
^<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/domain_transform.cpp:38:<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.hpp:292:<br>
/Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.inl.hpp:501:57: error: no member named 'type' in<br>
'cv::Vec&lt;float, 1&gt;'; did you mean 'time'?<br>
idist = getWExtendedMat(guide.rows, guide.cols + 1, IDistVec::type);<br>
^~~~~~~~~~~~~~<br>
time<br>
/usr/include/time.h:117:8: note: 'time' declared here<br>
time_t time(time_t *);<br>
^<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/domain_transform.cpp:38:<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.hpp:292:<br>
/Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.inl.hpp:538:54: error: no member named 'type' in<br>
'cv::Vec&lt;float, 1&gt;'; did you mean 'time'?<br>
dtf.a0distHor.create(guide.rows, guide.cols - 1, DistVec::type);<br>
^~~~~~~~~~~~~<br>
time<br>
/usr/include/time.h:117:8: note: 'time' declared here<br>
time_t time(time_t *);<br>
^<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/domain_transform.cpp:38:<br>
In file included from /Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.hpp:292:<br>
/Users/tarapaglino/opencv_contrib/modules/ximgproc/src/dtfilter_cpu.inl.hpp:568:55: error: no member named 'type' in<br>
'cv::Vec&lt;float, 1&gt;'; did you mean 'time'?<br>
dtf.a0distVert.create(guide.rows - 1, guide.cols, DistVec::type);<br>
^~~~~~~~~~~~~<br>
time<br>
/usr/include/time.h:117:8: note: 'time' declared here<br>
time_t time(time_t *);<br>
^<br>
5 errors generated.<br>
make[2]: *** [modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/domain_transform.cpp.o] Error 1<br>
make[1]: *** [modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/all] Error 2<br>
make[1]: *** Waiting for unfinished jobs....<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/shift_layer.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/slice_layer.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/softmax_layer.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/split_layer.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/nms.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/common.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/math_functions.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp.o<br>
[ 41%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/ocl4dnn_inner_product.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/ocl4dnn_lrn.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/ocl4dnn_pool.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/ocl4dnn_softmax.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/op_halide.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/op_inf_engine.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/tensorflow/tf_importer.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/tensorflow/tf_io.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/THDiskFile.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/THFile.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/THGeneral.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/torch_importer.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/opencl_kernels_dnn.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/layers/layers_common.avx.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/layers/layers_common.avx2.cpp.o<br>
[ 42%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/layers/layers_common.avx512_skx.cpp.o<br>
[ 42%] Linking CXX shared library ../../lib/libopencv_dnn.dylib<br>
[ 42%] Built target opencv_dnn<br>
make: *** [all] Error 2</p>
<ul dir="auto">
<li>Any ideas?<br>
--&gt;</li>
</ul>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 4.1.2 dev</li>
<li>Operating System / Platform =&gt; Mac OS X 64 Bit 10.15.1</li>
<li>Compiler =&gt; Python 3.6</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">Hello all, I recently retrained a model and wanted to run it using OpenCV's DNN module. However, when I try to run the file, I keep getting this error.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="File &quot;Stone.py&quot;, line 23, in &lt;module&gt;
    net = cv2.dnn.readNetFromTensorflow('/Users/Username/Skystone-Vision/SkystoneVision/PB-File/model.pb', '/Users/Username/Skystone-Vision/SkystoneVision/new_PBtxt/plswork.pbtxt')
cv2.error: OpenCV(4.1.2-dev) /Users/Username/opencv/modules/dnn/src/tensorflow/tf_importer.cpp:1495: error: (-215:Assertion failed) !haveConst || layer.input_size() == 2 in function 'populateNet'"><pre class="notranslate"><code class="notranslate">File "Stone.py", line 23, in &lt;module&gt;
    net = cv2.dnn.readNetFromTensorflow('/Users/Username/Skystone-Vision/SkystoneVision/PB-File/model.pb', '/Users/Username/Skystone-Vision/SkystoneVision/new_PBtxt/plswork.pbtxt')
cv2.error: OpenCV(4.1.2-dev) /Users/Username/opencv/modules/dnn/src/tensorflow/tf_importer.cpp:1495: error: (-215:Assertion failed) !haveConst || layer.input_size() == 2 in function 'populateNet'
</code></pre></div>
<p dir="auto">I do not know how to proceed next as I have no clue on how to fix this problem. Please help if you can. I will be attaching my checkpoint files below.</p>
<p dir="auto">Any help would be greatly appreciated. Thanks!</p>
<p dir="auto">The link to reproduce can be running the Stone.py and changing the directories inside the script to match where the .pb file and the .pbtxt file are located.<br>
<a href="https://drive.google.com/drive/folders/1C4SGBkQqsen7PVh8IlcyTM9r1VrLa_dE" rel="nofollow">https://drive.google.com/drive/folders/1C4SGBkQqsen7PVh8IlcyTM9r1VrLa_dE</a></p>