@@ -426,15 +426,6 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
426
426
void forward (std::vector<std::vector<Mat> >& outputBlobs,
427
427
const std::vector<String>& outBlobNames);
428
428
429
- // TODO:
430
- /* * @brief Optimized forward.
431
- * @warning Not implemented yet.
432
- * @details Makes forward only those layers which weren't changed after previous forward().
433
- */
434
- void forwardOpt (LayerId toLayer);
435
- /* * @overload */
436
- void forwardOpt (const std::vector<LayerId> &toLayers);
437
-
438
429
/* *
439
430
* @brief Compile Halide layers.
440
431
* @param[in] scheduler Path to YAML file with scheduling directives.
@@ -609,38 +600,18 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
609
600
Ptr<Impl> impl;
610
601
};
611
602
612
- /* *
613
- * @deprecated Deprecated as external interface. Will be for internal needs only.
614
- * @brief Small interface class for loading trained serialized models of different dnn-frameworks. */
615
- class CV_EXPORTS_W Importer : public Algorithm
616
- {
617
- public:
618
-
619
- /* * @brief Adds loaded layers into the @p net and sets connections between them. */
620
- CV_DEPRECATED CV_WRAP virtual void populateNet (Net net) = 0;
621
-
622
- virtual ~Importer ();
623
- };
624
-
625
603
/* * @brief Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files.
626
604
* @param cfgFile path to the .cfg file with text description of the network architecture.
627
605
* @param darknetModel path to the .weights file with learned network.
628
606
* @returns Network object that ready to do forward, throw an exception in failure cases.
629
- * @details This is shortcut consisting from DarknetImporter and Net::populateNet calls .
607
+ * @returns Net object .
630
608
*/
631
609
CV_EXPORTS_W Net readNetFromDarknet (const String &cfgFile, const String &darknetModel = String());
632
610
633
- /* *
634
- * @deprecated Use @ref readNetFromCaffe instead.
635
- * @brief Creates the importer of <a href="http://caffe.berkeleyvision.org">Caffe</a> framework network.
636
- * @param prototxt path to the .prototxt file with text description of the network architecture.
637
- * @param caffeModel path to the .caffemodel file with learned network.
638
- * @returns Pointer to the created importer, NULL in failure cases.
639
- */
640
- CV_DEPRECATED CV_EXPORTS_W Ptr<Importer> createCaffeImporter (const String &prototxt, const String &caffeModel = String());
641
-
642
- /* * @brief Reads a network model stored in Caffe model files.
643
- * @details This is shortcut consisting from createCaffeImporter and Net::populateNet calls.
611
+ /* * @brief Reads a network model stored in <a href="http://caffe.berkeleyvision.org">Caffe</a> framework's format.
612
+ * @param prototxt path to the .prototxt file with text description of the network architecture.
613
+ * @param caffeModel path to the .caffemodel file with learned network.
614
+ * @returns Net object.
644
615
*/
645
616
CV_EXPORTS_W Net readNetFromCaffe (const String &prototxt, const String &caffeModel = String());
646
617
@@ -651,16 +622,21 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
651
622
* @param lenProto length of bufferProto
652
623
* @param bufferModel buffer containing the content of the .caffemodel file
653
624
* @param lenModel length of bufferModel
625
+ * @returns Net object.
654
626
*/
655
627
CV_EXPORTS Net readNetFromCaffe (const char *bufferProto, size_t lenProto,
656
628
const char *bufferModel = NULL , size_t lenModel = 0 );
657
629
658
- /* * @brief Reads a network model stored in Tensorflow model file.
659
- * @details This is shortcut consisting from createTensorflowImporter and Net::populateNet calls.
630
+ /* * @brief Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.
631
+ * @param model path to the .pb file with binary protobuf description of the network architecture
632
+ * @param config path to the .pbtxt file that contains text graph definition in protobuf format.
633
+ * Resulting Net object is built by text graph using weights from a binary one that
634
+ * let us make it more flexible.
635
+ * @returns Net object.
660
636
*/
661
637
CV_EXPORTS_W Net readNetFromTensorflow (const String &model, const String &config = String());
662
638
663
- /* * @brief Reads a network model stored in Tensorflow model in memory .
639
+ /* * @brief Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format .
664
640
* @details This is an overloaded member function, provided for convenience.
665
641
* It differs from the above function only in what argument(s) it accepts.
666
642
* @param bufferModel buffer containing the content of the pb file
@@ -671,27 +647,11 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
671
647
CV_EXPORTS Net readNetFromTensorflow (const char *bufferModel, size_t lenModel,
672
648
const char *bufferConfig = NULL , size_t lenConfig = 0 );
673
649
674
- /* * @brief Reads a network model stored in Torch model file.
675
- * @details This is shortcut consisting from createTorchImporter and Net::populateNet calls.
676
- */
677
- CV_EXPORTS_W Net readNetFromTorch (const String &model, bool isBinary = true );
678
-
679
650
/* *
680
- * @deprecated Use @ref readNetFromTensorflow instead.
681
- * @brief Creates the importer of <a href="http://www.tensorflow.org">TensorFlow</a> framework network.
682
- * @param model path to the .pb file with binary protobuf description of the network architecture.
683
- * @returns Pointer to the created importer, NULL in failure cases.
684
- */
685
- CV_DEPRECATED CV_EXPORTS_W Ptr<Importer> createTensorflowImporter (const String &model);
686
-
687
- /* *
688
- * @deprecated Use @ref readNetFromTorch instead.
689
- * @brief Creates the importer of <a href="http://torch.ch">Torch7</a> framework network.
690
- * @param filename path to the file, dumped from Torch by using torch.save() function.
651
+ * @brief Reads a network model stored in <a href="http://torch.ch">Torch7</a> framework's format.
652
+ * @param model path to the file, dumped from Torch by using torch.save() function.
691
653
* @param isBinary specifies whether the network was serialized in ascii mode or binary.
692
- * @returns Pointer to the created importer, NULL in failure cases.
693
- *
694
- * @warning Torch7 importer is experimental now, you need explicitly set CMake `opencv_dnn_BUILD_TORCH_IMPORTER` flag to compile its.
654
+ * @returns Net object.
695
655
*
696
656
* @note Ascii mode of Torch serializer is more preferable, because binary mode extensively use `long` type of C language,
697
657
* which has various bit-length on different systems.
@@ -712,10 +672,10 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
712
672
*
713
673
* Also some equivalents of these classes from cunn, cudnn, and fbcunn may be successfully imported.
714
674
*/
715
- CV_DEPRECATED CV_EXPORTS_W Ptr<Importer> createTorchImporter (const String &filename , bool isBinary = true );
675
+ CV_EXPORTS_W Net readNetFromTorch (const String &model , bool isBinary = true );
716
676
717
677
/* * @brief Loads blob which was serialized as torch.Tensor object of Torch7 framework.
718
- * @warning This function has the same limitations as createTorchImporter ().
678
+ * @warning This function has the same limitations as readNetFromTorch ().
719
679
*/
720
680
CV_EXPORTS_W Mat readTorchBlob (const String &filename, bool isBinary = true );
721
681
/* * @brief Creates 4-dimensional blob from image. Optionally resizes and crops @p image from center,
0 commit comments