diff --git a/modules/dnn/include/opencv2/dnn/dnn.hpp b/modules/dnn/include/opencv2/dnn/dnn.hpp
index f65f503529..68e1994db7 100644
--- a/modules/dnn/include/opencv2/dnn/dnn.hpp
+++ b/modules/dnn/include/opencv2/dnn/dnn.hpp
@@ -644,6 +644,14 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
*/
CV_EXPORTS_W Net readNetFromDarknet(const String &cfgFile, const String &darknetModel = String());
+ /** @brief Reads a network model stored in Darknet model files.
+ * @param cfgFile file node to the .cfg file with text description of the network architecture.
+ * @param darknetModel file node to the .weights file with learned network.
+ * @returns Network object that ready to do forward, throw an exception in failure cases.
+ * @returns Net object.
+ */
+ CV_EXPORTS_W Net readNetFromDarknet(const FileNode &cfgFile, const FileNode &darknetModel = FileNode());
+
/** @brief Reads a network model stored in Caffe framework's format.
* @param prototxt path to the .prototxt file with text description of the network architecture.
* @param caffeModel path to the .caffemodel file with learned network.
diff --git a/modules/dnn/src/darknet/darknet_importer.cpp b/modules/dnn/src/darknet/darknet_importer.cpp
index 8bd64d099c..17506c2242 100644
--- a/modules/dnn/src/darknet/darknet_importer.cpp
+++ b/modules/dnn/src/darknet/darknet_importer.cpp
@@ -44,6 +44,7 @@
#include "../precomp.hpp"
#include
+#include
#include
#include
#include